xiaoju
cfe4543d39
refactor!: remove deprecated Agent types, introduce Adapter-first API
...
BREAKING CHANGES:
- Remove AgentFn, AgentFnResult, AgentBinding from workflow-protocol
- Remove wrapAgentAsAdapter from workflow-util-agent
- workflowAsAgent → workflowAdapter (old name kept as deprecated re-export)
New APIs:
- createTextAdapter(producer) — bridges text-producing functions to AdapterFn
- TextProducerFn, TextAdapterResult types
- workflowAdapter() — direct AdapterFn for child workflow delegation
All agent packages (cursor, hermes, llm) now return AdapterFn directly,
no wrapping needed. Bundle entries simplified accordingly.
小橘 🍊 (NEKO Team)
2026-05-13 08:03:27 +00:00
xiaoju
399b967c59
refactor: reduce cognitive complexity in dispatch.ts and shell-exec.ts
...
- Extract helpers from promptSecret/onData (32→~4)
- Extract sub-functions from collectInteractiveSetup (36→~8)
- Extract classifyExecError from shell-exec handler (17→~3)
- Replace all non-null assertions with safe .at() access
0 biome errors, 0 warnings.
2026-05-13 07:37:47 +00:00
xiaoju
061926b86a
chore: fix all biome lint errors
...
- Auto-fix string concatenation → template literals
- Remove unused imports
- Prefix unused function with underscore
- Format fixes across multiple files
2026-05-13 07:26:11 +00:00
xiaoju
acb0ebed97
chore: add @types/node for node:* module declarations
2026-05-13 07:21:43 +00:00
xiaoju
d5d7be6100
chore: add files field to all packages, bump to 0.3.16
...
Excludes tsconfig.json and source files from published packages.
Fixes TypeScript errors when consuming packages via bun.
2026-05-13 07:19:49 +00:00
xiaoju
1566a43395
chore: bump all packages to 0.3.15
2026-05-13 07:04:12 +00:00
xiaoju
afbde4573a
chore: add bunfig.toml to gitignore (contains registry token)
2026-05-13 06:55:16 +00:00
xiaoju
63e447fc3d
chore: unify npm registry to uncaged org
...
publish-all.sh now targets the same org as .npmrc.
小橘 🍊
2026-05-13 06:49:30 +00:00
xiaoju
34fcbf29cb
chore: bump workflow-util and workflow-util-agent to 0.3.14
...
小橘 🍊
2026-05-13 06:12:29 +00:00
xiaoju
256799fcfd
chore: bump workflow-util and workflow-util-agent to 0.3.12
...
小橘 🍊
2026-05-13 06:04:53 +00:00
xiaoju
21cf3db111
feat(util): extract requireEnv/optionalEnv to workflow-util
...
- requireEnv(name, message) — throws with custom error message
- optionalEnv(name, fallback?) — returns fallback or null
- Update develop and solve-issue bundle entries to use shared helpers
- Remove inline requireEnv/optionalEnv and wrapAgentAsAdapter usage
- Add tests for both functions
小橘 🍊
2026-05-13 06:02:17 +00:00
xiaomo
ed38543db4
Merge pull request 'docs(skill): add authoring pitfalls to skill author topic' ( #231 ) from fix/skill-author-pitfalls into main
2026-05-13 03:59:50 +00:00
xiaomo
78771fbebc
Merge pull request 'fix(publish-all): regenerate lockfile before pack' ( #230 ) from fix/publish-lockfile-regen into main
2026-05-13 03:59:42 +00:00
xiaoju
c15f58bdeb
docs(skill): add authoring pitfalls to skill author topic
...
Add ModeratorTable syntax, AdapterFn/AdapterBinding types, lazy init
pattern, bundle import restrictions, and descriptor requirements.
Knowledge from smoke test discoveries — these are the most common
mistakes when writing workflow bundles.
小橘 <xiaoju@shazhou.work >
2026-05-13 03:57:49 +00:00
xiaoju
6d4bf108bb
fix(publish-all): regenerate lockfile before pack
...
After bumping versions, bun pm pack reads the old bun.lock and resolves
workspace:* to stale versions. Now deletes bun.lock and runs bun install
before the pack loop to ensure correct resolution.
小橘 <xiaoju@shazhou.work >
2026-05-13 03:52:10 +00:00
xingyue
5b7c9b844b
fix(engine): abort signal races gen.next() to fix flaky kill test ( #209 )
...
Root cause: executeThread awaited gen.next() without racing against
the abort signal. When a workflow bundle awaited a long setTimeout
between yields, the engine could not respond to kill until the
Promise resolved — causing the kill test to flake when the thread
completed before kill arrived.
Fix: Promise.race gen.next() with an abort listener so kill takes
effect immediately, even mid-yield. Also move the bundle's delay
to after the first yield (between planner and coder) to ensure the
thread is killable while running.
Closes #209
2026-05-13 11:31:40 +08:00
xiaoju
f0d1bb9ae8
chore: bump all to 0.3.11
...
小橘 🍊
2026-05-13 03:28:33 +00:00
xiaoju
04cfd33f99
chore: bump all to 0.3.10 (regenerate lockfile)
...
小橘 🍊
2026-05-13 03:27:05 +00:00
xiaoju
a8c00f169b
chore: bump all packages to 0.3.9 (fix workspace:* dep resolution)
...
小橘 🍊
2026-05-13 03:25:50 +00:00
xiaoju
c4d34530e8
chore: bump cli-workflow 0.3.8 (fix gateway dep resolution)
...
小橘 🍊
2026-05-13 03:23:09 +00:00
xiaoju
90a410c00a
chore: bump cli-workflow to 0.3.7 (fix gateway dep version)
...
小橘 🍊
2026-05-13 03:21:34 +00:00
xiaoju
6276ca5a4a
chore: publish workflow-gateway (remove private flag)
...
小橘 🍊
2026-05-13 03:20:33 +00:00
xiaoju
8e63f99eb6
chore: bump all public packages to 0.3.6
...
小橘 🍊
2026-05-13 03:18:25 +00:00
xiaomo
9ca70bbb69
Merge pull request 'feat: minimal tool set for workflow-agent-react ( #222 Phase 3)' ( #229 ) from feat/222-tools-smoke-test-phase3 into main
2026-05-13 03:16:37 +00:00
xiaomo
ed1f38c7da
Merge pull request 'refactor(dashboard): side-by-side graph + cards layout' ( #215 ) from refactor/thread-detail-side-by-side-layout into main
2026-05-13 03:06:35 +00:00
xiaomo
1664d68b50
Merge pull request 'feat: WS request proxy — Phase 2 ( #210 )' ( #214 ) from feat/210-ws-gateway-phase2 into main
2026-05-13 03:06:29 +00:00
xingyue
1871ef31b4
refactor(dashboard): replace vertical layout with side-by-side graph+cards
...
Change thread-detail from vertical (graph on top, cards below) to a
side-by-side layout:
- Left panel (280px, sticky): workflow graph, always visible
- Right panel (flex-1, scrollable): record cards
- Remove collapsible GraphPanel wrapper
- Graph acts as navigation (click node → scroll to card)
Refs: workflow thread 06F1NX4C9ET6HPXJAH7CWWF8MR
2026-05-13 11:05:03 +08:00
xingyue
ec3c97b200
feat: WS request proxy — Gateway proxies HTTP via WebSocket ( #210 Phase 2)
...
- Add ws-protocol.ts with WsRequest/WsResponse types + parsers
- AgentSocket DO: proxy POST handler, pending request map, 30s timeout
- /api/agents/:agent/* routes through DO WS when connected, falls back to HTTP
- ws-client handles incoming WsRequest, fetches local serve, returns WsResponse
- startGatewayWsClient accepts localPort for request handling
Testing: #213
2026-05-13 11:05:03 +08:00
xingyue
18e3dc7603
feat: WebSocket reverse-connection gateway Phase 1 ( #210 )
...
- Add AgentSocket Durable Object (holds one WS per agent name)
- Add /ws/connect route with GATEWAY_SECRET auth
- Add ws-client.ts with auto-reconnect (exponential backoff 1s-30s)
- serve defaults to WS mode (no cloudflared needed)
- Keep --tunnel-url and --no-tunnel as fallback options
- Endpoints list merges KV heartbeat + DO WebSocket status
Testing: #211
2026-05-13 11:05:03 +08:00
xiaoju
fc229cac79
test: add tool handler unit tests ( #222 )
2026-05-13 02:57:47 +00:00
xiaoju
ec555b43d1
feat: add minimal tool set (read/write/patch/shell) to workflow-agent-react ( #222 )
2026-05-13 02:57:47 +00:00
xiaomo
c8de86d7c9
Merge pull request 'feat: workflow-agent-react + wrapAgentAsAdapter shared + childThread support ( #222 Phase 2)' ( #226 ) from feat/222-react-adapter-phase2 into main
2026-05-13 02:51:07 +00:00
xiaoju
bd110b76e1
chore: remove accidental self-referencing symlinks
...
小橘 🍊
2026-05-13 02:44:24 +00:00
xiaoju
dc10ccceaa
test: add react adapter unit tests ( #222 )
...
小橘 🍊
2026-05-13 02:40:22 +00:00
xiaoju
c040a90a8f
feat: add @uncaged/workflow-agent-react package ( #222 )
2026-05-13 02:38:38 +00:00
xiaoju
ec4599a230
refactor: extract wrapAgentAsAdapter to util-agent, support childThread in RoleFn ( #222 )
2026-05-13 02:37:32 +00:00
xiaomo
1f4bd3f431
Merge pull request 'feat(protocol): AdapterFn replaces AgentBinding in createWorkflow ( #222 Phase 1)' ( #224 ) from feat/222-adapter-fn-phase1 into main
2026-05-13 02:30:29 +00:00
xiaoju
bebf4aad45
feat(protocol): add AdapterFn/RoleFn/AdapterBinding, refactor createWorkflow to use AdapterBinding ( #222 )
...
- Add RoleFn<T>, AdapterFn, AdapterBinding types to workflow-protocol
- Mark AgentFn, AgentFnResult, AgentBinding as @deprecated
- Refactor createWorkflow to accept AdapterBinding instead of AgentBinding
- Adapter returns typed meta directly — no more extract call in workflow loop
- Add buildThreadInput (ThreadContext-based), keep buildAgentPrompt as deprecated wrapper
- Update template bundle-entries to wrap AgentFn as AdapterFn
- Update solve-issue tests to use AdapterFn directly
2026-05-13 02:27:36 +00:00
xiaoju
11ba185fef
docs: RFC v3 — react adapter as thin wrapper over reactor
...
小橘 🍊
2026-05-13 02:19:12 +00:00
xiaoju
730340d123
docs: RFC v2 — AdapterFn replaces AgentFn, schema-aware resolve
...
小橘 🍊
2026-05-13 02:15:21 +00:00
xiaoju
c848216396
docs: RFC for workflow-agent-react package
...
小橘 🍊
2026-05-13 01:55:14 +00:00
xingyue
2698e0a6cb
fix(setup): add GLM international endpoint (api.z.ai)
2026-05-13 09:52:07 +08:00
xingyue
47f2b1a128
fix(setup): address code review issues ( #221 )
...
- Fix resolve variable shadowing in promptSecret (rename to fulfill)
- Fix readline leak on invalid choice (close before returning err)
- Remove Anthropic/Gemini from presets (not OpenAI-compatible)
- Fix GLM URL: api.z.ai → open.bigmodel.cn
- Restore terminal raw mode before process.exit on Ctrl+C
- Add debug logging to fetchAvailableModels failures
- Add comment explaining DashScope-specific model filter patterns
- Move PresetProvider and CmdSetupSuccess types to types.ts per convention
2026-05-13 09:43:57 +08:00
xingyue
0c02cb7574
chore: publish v0.3.5
...
小橘 <xiaoju@shazhou.work >
2026-05-13 09:34:41 +08:00
xingyue
320810ec25
fix(cli-workflow): workspace path accepts relative/absolute paths with retry
...
- cmdInitWorkspace now resolves full paths via resolve() instead of
requiring a single segment name
- mkdir uses recursive: true for nested paths (e.g. ./a/b/workflows)
- Setup interactive prompt retries on existing directory instead of exiting
- Update tests: nested paths are now valid, add accepts-nested-path test
2026-05-13 09:30:41 +08:00
xingyue
91f585c534
feat(cli-workflow): numbered model selection in setup
...
- Show available models with numbered labels in multi-column layout
- User can pick by number or type model name directly
- Print selected model with arrow confirmation
2026-05-13 09:25:00 +08:00
xingyue
299ff126d9
feat(cli-workflow): preset provider selection in setup
...
- Add providers.yaml with 18 preset providers (international + China + local)
- Add preset-providers.ts to load and cache YAML presets
- Refactor interactive setup to show numbered provider list
- Only prompt for manual name/URL when choosing Custom
- YAML-driven: add new providers without code changes
2026-05-13 09:19:30 +08:00
xingyue
931eb81458
fix(setup): default workspace to ./workflows when left empty
...
Enter = use default ./workflows. Type 'skip' to skip.
2026-05-12 22:32:01 +08:00
xingyue
c604d1f600
fix(setup): simplify model prompt — just ask for model name
...
Provider is already known from the first step, so prompt simply
asks 'Default model:' and auto-prepends provider/ prefix.
2026-05-12 22:28:35 +08:00
xingyue
20bcc65f61
fix(setup): auto-prefix provider on model input
...
Users can now type bare model names (e.g. 'qwen-plus') or paste
model IDs with vendor prefixes (e.g. 'MiniMax/MiniMax-M2.7') —
the provider prefix is normalised automatically.
2026-05-12 22:27:07 +08:00