GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: T3-run workflows and reviewed task graphs for every provider by SwiggitySwerve · Pull Request #26673 · pingdotgg/t3code

feat: T3-run workflows and reviewed task graphs for every provider #26673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SwiggitySwerve wants to merge 202 commits into pingdotgg:main from SwiggitySwerve:upstream-sync/rebase-ce66aab

Uh oh!

There was an error while loading. Please reload this page.

Closed

feat: T3-run workflows and reviewed task graphs for every provider #26673

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
5c9c186
test(server): read the delegated-task replay fixture by file path so …
SwiggitySwerve Oct 22, 2026
a1d9d1c
fix(server): a task cancelled while it waits on its delegated tasks r…
SwiggitySwerve Oct 22, 2026
4096169
feat(mcp): agents start many delegated tasks in one delegate_tasks call
SwiggitySwerve Oct 22, 2026
abe77db
feat(mcp): task_wait waits for any or all of a batch of delegated tasks
SwiggitySwerve Oct 22, 2026
86e4941
feat(mcp): delegated tasks can return a json result checked against a…
SwiggitySwerve Oct 22, 2026
336f91e
refactor(mcp): check delegated json results with ajv
SwiggitySwerve Oct 22, 2026
df1aa74
feat(server): delegated tasks over a running limit wait for a free slot
SwiggitySwerve Oct 22, 2026
ec25bb0
fix(mcp): a delegated task waiting for a slot reports queued, not run…
SwiggitySwerve Oct 22, 2026
c20a435
docs(orchestration): describe batch delegation, task_wait, structured…
SwiggitySwerve Oct 22, 2026
a85a944
chore(contracts): keep the batch and running-limit constants module-l…
SwiggitySwerve Oct 22, 2026
6cdcf64
fix(server): a restart keeps delegated tasks that wait for a running …
SwiggitySwerve Oct 22, 2026
a3369fd
fix(server): task_status reports a stopped task as cancelled before i…
SwiggitySwerve Oct 22, 2026
8a1ba5b
feat(server): Orchestrator V2 owns T3-run workflow rows
SwiggitySwerve Oct 22, 2026
99fea38
feat(server): workflow_start, workflow_status and workflow_stop for e…
SwiggitySwerve Oct 22, 2026
89c3aee
fix(server): stop a provider turn that starts after Stop settled its run
SwiggitySwerve Oct 22, 2026
b3d1435
feat(server): mark runs that a server restart cancelled
SwiggitySwerve Oct 22, 2026
637ffff
feat(server): T3 workflows resume after a restart and retry, restart …
SwiggitySwerve Oct 22, 2026
c68b406
refactor(shared): one owner for the stored workflow script format
SwiggitySwerve Oct 22, 2026
c3f642d
feat(web): show T3-run workflows with phases, agents, script and Stop
SwiggitySwerve Oct 22, 2026
9da395f
fix: restore characters garbled by a PowerShell round trip
SwiggitySwerve Oct 22, 2026
e5ef95f
fix(server): three workflow script bugs found by an ultracode review …
SwiggitySwerve Oct 22, 2026
e8d3637
feat: ultracode for every provider
SwiggitySwerve Oct 22, 2026
9000543
feat(server): checked results and file scopes for workflow agents
SwiggitySwerve Oct 22, 2026
f0a59e2
feat(server): declared input and output files for workflow agents
SwiggitySwerve Oct 22, 2026
926d44c
feat(server): reviewed dependency graphs on the workflow runner
SwiggitySwerve Oct 22, 2026
52f6ecf
docs: graph_review and graph_start, attempt deadlines and report results
SwiggitySwerve Oct 22, 2026
17c920e
test(server): graph resume after restart and token budget
SwiggitySwerve Oct 22, 2026
9cee7f5
fix(server): keep ultracode out of delegated and workflow children
SwiggitySwerve Oct 22, 2026
968bc84
fix(server): cap a failed workflow's result
SwiggitySwerve Oct 22, 2026
07b7536
fix(server): say "review not found" when graph_start has no review re…
SwiggitySwerve Oct 22, 2026
4c438a4
fix(server)!: scope workflow members and account for cumulative usage
SwiggitySwerve Oct 22, 2026
8e25d31
perf(server): take a workflow member's result when its turn completes
SwiggitySwerve Oct 23, 2026
1a4c8fd
docs(orchestration): measured workflow costs and next design steps
SwiggitySwerve Oct 23, 2026
11227af
fix(server): workflow review findings: keys, schema results, stop, qu…
SwiggitySwerve Oct 23, 2026
ead173b
fix(server): judge keys and prompts, and deadlines after admission
SwiggitySwerve Oct 23, 2026
2433689
feat(contracts): workflow plan, node outcomes and graph node keys
SwiggitySwerve Oct 23, 2026
12c05ea
feat(server): graph workflows carry their plan and node outcomes
SwiggitySwerve Oct 23, 2026
0232a02
feat(server): graph driver records every node's outcome and tags its …
SwiggitySwerve Oct 23, 2026
8b90ac9
feat(client-runtime): derive each graph node's state for the workflow…
SwiggitySwerve Oct 23, 2026
1263dde
feat(web): show graph workflows as wave columns of node cards
SwiggitySwerve Oct 23, 2026
a3afd9a
feat(web): dependency lines and related-node highlighting on the wave…
SwiggitySwerve Oct 23, 2026
6d7a79e
fix(web): route dependency lines that skip a wave between cards
SwiggitySwerve Oct 23, 2026
3c9f430
fix(web): don't show the coordinator's provider on nodes that have no…
SwiggitySwerve Oct 23, 2026
254808a
test(workflows): freeze independently checked acceptance scenarios
SwiggitySwerve Oct 23, 2026
ce6b895
test(workflows): cover provider admission and concurrent runs
SwiggitySwerve Oct 23, 2026
b2f7f6a
feat(workflows): freeze worker defaults for review and restart
SwiggitySwerve Oct 24, 2026
91b353d
feat(workflows): add named agent presets and worker defaults
SwiggitySwerve Oct 24, 2026
98aac19
fix(workflows): make node outcomes and checker ownership readable
SwiggitySwerve Oct 24, 2026
bbee7cf
feat(workflows): preserve attempt history and execution totals
SwiggitySwerve Oct 24, 2026
6888827
feat(workflows): scale workflow updates to 150 nodes and add a budget…
SwiggitySwerve Oct 24, 2026
39873fd
fix(workflows): stop the runner on a workflow stop and freeze reviewe…
SwiggitySwerve Oct 24, 2026
4918eb3
fix(web): show live progress in threads started from a draft
SwiggitySwerve Oct 24, 2026
0ad0aaf
fix(web): hide workflow scripts from the timeline
SwiggitySwerve Oct 24, 2026
11a4b1b
test(workflows): add isolated QA lane and faithful visual fixtures
SwiggitySwerve Oct 24, 2026
0362775
fix(server): retain per-turn notes when delivering context
SwiggitySwerve Oct 24, 2026
50cfde0
test(workflows): verify graph review visibility and detail limits
SwiggitySwerve Oct 24, 2026
5898f05
feat(workflows): detect intent and freeze reviewed model preferences
SwiggitySwerve Oct 24, 2026
857ae32
feat(workflows): guide typed requests into graph review
SwiggitySwerve Oct 24, 2026
e947da6
feat(workflows): require client approval for triggered runs
SwiggitySwerve Oct 25, 2026
7249202
fix(workflows): isolate schema caches and reject over-capacity graphs
SwiggitySwerve Oct 25, 2026
7b04f12
fix(workflows): retain completion and stop retry ownership
SwiggitySwerve Oct 25, 2026
b249618
fix(workflows): align thread find with visible workflow text
SwiggitySwerve Oct 25, 2026
6f57529
fix(mobile): show workflow status and preserve stop retries
SwiggitySwerve Oct 25, 2026
482c6cb
fix(workflows): read the ultracode keyword only from user-typed text
SwiggitySwerve Oct 26, 2026
25dca37
feat(workflow): bound child handoffs and keep graph provenance
SwiggitySwerve Oct 26, 2026
f3c20cb
feat(workflow): minimal member context, fan-out guidance and graph_re…
SwiggitySwerve Oct 26, 2026
6241c9c
feat(workflows): add t3_worktree_remove for a finished member's worktree
SwiggitySwerve Oct 26, 2026
26fc5e1
fix(workflows): price the graph_review token advisory by provider driver
SwiggitySwerve Oct 26, 2026
54a02de
fix(workflows): adapt to upstream lint, effect and test-harness rules
SwiggitySwerve Oct 26, 2026
c98c4a6
refactor(workflows): move agent attempts and checks out of the runner
SwiggitySwerve Oct 26, 2026
082ddc1
fix(workflows): ask again before a process check starts its command
SwiggitySwerve Oct 26, 2026
5d36ffa
fix(orchestration): hold a prepared workspace child for a free runnin…
SwiggitySwerve Oct 26, 2026
5451887
fix(workflows): bound and delimit the result a checker judges
SwiggitySwerve Oct 26, 2026
64a98e0
fix(workflows): keep Stop while a stopped workflow's members still run
SwiggitySwerve Oct 26, 2026
764dff5
feat(workflows): approve or dismiss a reviewed workflow graph from a …
SwiggitySwerve Oct 26, 2026
7add249
fix(workflows): carry a review's approval data apart from its tool re…
SwiggitySwerve Oct 26, 2026
9d01da1
fix(workflows): give a checker a file it can read for a long answer
SwiggitySwerve Oct 26, 2026
ff3f328
fix(workflows): size the suggested budget so the last node can still …
SwiggitySwerve Oct 26, 2026
5975ef3
fix(workflows): a steer that asks for a workflow plans first and need…
SwiggitySwerve Oct 26, 2026
b15d7c1
fix(workflows): graph_review reports every problem at once and shows …
SwiggitySwerve Oct 26, 2026
e0e8be4
fix(workflows): name a finished node by its label in the progress text
SwiggitySwerve Oct 26, 2026
08f7330
fix(web): name a workflow's Lineage row for the workflow
SwiggitySwerve Oct 26, 2026
de17ee0
fix(web): name each workflow node card by its full label and state
SwiggitySwerve Oct 26, 2026
f4ddae1
chore(web): keep a fixture constant private
SwiggitySwerve Oct 26, 2026
b77bbea
test(web): cover keyboard reach of a workflow block inside the timeline
SwiggitySwerve Oct 26, 2026
03aff4f
fix(workflows): keep a checker's answer file out of the user's checkout
SwiggitySwerve Oct 26, 2026
202d0a1
fix(workflows): keep a live checker's answer file out of the age sweep
SwiggitySwerve Oct 26, 2026
b32153c
test(mobile): stub the workflow review card in the file preview test
SwiggitySwerve Oct 26, 2026
75a56a7
fix(web): place workflow settings in upstream's regrouped settings
SwiggitySwerve Oct 27, 2026
dbd1958
test: adapt workflow tests to upstream and guard the MCP wrappers
SwiggitySwerve Oct 27, 2026
40c50c6
fix(server): keep a parent run that settles while a workflow completes
SwiggitySwerve Oct 27, 2026
830cf02
test(server): a workflow steer promoted into a compaction plans first
SwiggitySwerve Oct 27, 2026
51a1c96
feat(web): rebuild the Agent presets page in the regrouped settings s…
SwiggitySwerve Oct 27, 2026
90f54f5
test(server): drop the duplicate MCP wrapper guard
SwiggitySwerve Oct 28, 2026
0211403
feat(web): size workflow node cards from their text and polish workfl…
SwiggitySwerve Oct 28, 2026
6cbbf83
feat(web): show status words on workflow agent rows, a failure band o…
SwiggitySwerve Oct 28, 2026
68684eb
feat(web): fit workflow node cards to narrow screens, fade cut-off sc…
SwiggitySwerve Oct 28, 2026
d5d7182
feat(web): drop the avatar from node cards for a status dot, strength…
SwiggitySwerve Oct 28, 2026
5a496ca
feat(web): share one status dot and word across workflow agent rows a…
SwiggitySwerve Oct 28, 2026
9e5bb56
fix(web): keep Stop and status rows neutral, restore group agent coun…
SwiggitySwerve Oct 28, 2026
acaac53
style(web): satisfy lint and format for the workflow UI polish
SwiggitySwerve Oct 28, 2026
cafd0e4
feat(web): fit three waves in the chat column and fix workflow status…
SwiggitySwerve Oct 28, 2026
c58a3df
fix(web): make Delete red again with the destructive-outline variant
SwiggitySwerve Oct 28, 2026
d920b43
feat(web): hold narrow Lineage rows together, give unstarted nodes di…
SwiggitySwerve Oct 28, 2026
9ba6ab4
test(web): pin the red Delete button
SwiggitySwerve Oct 28, 2026
384d21e
test(web): pin the narrow Lineage unit drop
SwiggitySwerve Oct 28, 2026
8ad9199
feat(web): keep narrow Lineage metadata, name what the sidebar needs …
SwiggitySwerve Oct 28, 2026
807265a
fix(web): keep failed sidebar badges, state a node's failure once and…
SwiggitySwerve Oct 28, 2026
dd72982
test(server): leave a delegated run that waits for a running slot to …
SwiggitySwerve Oct 28, 2026
b9124fb
chore(web): regenerate the route tree with the Agent presets route
SwiggitySwerve Oct 28, 2026
3fd97e5
fix: adapt the replayed workflow code and tests to upstream's current…
SwiggitySwerve Oct 28, 2026
8dfc581
style: format the files touched by the replay
SwiggitySwerve Oct 28, 2026
6de290d
fix: satisfy upstream's lint on the replayed workflow code
SwiggitySwerve Oct 28, 2026
3fa9e37
chore: un-export helpers the removed in-memory store no longer shares
SwiggitySwerve Oct 28, 2026
0dffe4b
chore(server): record the workflow tools in the agent context budget
SwiggitySwerve Oct 28, 2026
e92b20e
test: fix replayed workflow tests that upstream's changes broke
SwiggitySwerve Oct 28, 2026
26280b1
fix(web): use upstream's provider instance helper in the Agent preset…
SwiggitySwerve Oct 28, 2026
3f51f5f
chore(server): refresh the agent context budget for upstream 125b61954d
SwiggitySwerve Oct 28, 2026
974f3a4
fix(web): name the worker presets settings page Workflow
SwiggitySwerve Oct 28, 2026
1ab33f3
test(web): let the workflow block test's atom stub apply selectors
SwiggitySwerve Oct 28, 2026
ca86d57
fix(web): keep the Workflow settings route inside the settings layout
SwiggitySwerve Oct 28, 2026
54c6d40
fix(server): budget the resume preflight with the turn's workflow or …
SwiggitySwerve Oct 28, 2026
67b7dac
fix(server): read the turn trigger settings once and hand them to run…
SwiggitySwerve Oct 28, 2026
a7c5d21
chore(server): refresh the agent context budget for upstream be6ff17f51
SwiggitySwerve Oct 28, 2026
55f46ed
style(mobile): format the Agent sheet's workflow stop
SwiggitySwerve Oct 28, 2026
459598c
test(mobile): stub the workflow group's layout parts in the Agents sh…
SwiggitySwerve Oct 28, 2026
73a1430
test(mobile): give the sheet test's rows the fields upstream's group …
SwiggitySwerve Oct 28, 2026
26c1354
test(mobile): match upstream's workflow status labels in the sheet test
SwiggitySwerve Oct 28, 2026
d69792c
fix(web): drop the agent unit from a narrow Lineage panel's phase count
SwiggitySwerve Oct 28, 2026
c530dff
Merge branch 'main' into upstream-sync/rebase-ce66aab
SwiggitySwerve Oct 28, 2026
a1d4ee3
feat(workflows): gate agent tools and context behind an opt-in setting
SwiggitySwerve Oct 28, 2026
e3b1edd
test(workflows): opt fan-out fixtures into workflow capabilities
SwiggitySwerve Oct 28, 2026
fbfda15
fix(orchestration): fail rejected admissions so delegated tasks can p…
SwiggitySwerve Oct 28, 2026
30c5e4c
fix(mcp): reject unsupported destinations before starting a task batch
SwiggitySwerve Oct 28, 2026
506f2b7
refactor(providers): apply model-family orchestration instructions
SwiggitySwerve Oct 28, 2026
8c4e0aa
fix(web): show queued and background work in folder dots
SwiggitySwerve Oct 28, 2026
06b413b
fix(provider): preserve server workflow approval instructions
SwiggitySwerve Oct 28, 2026
7261dbc
fix(server): reject workflow stops on deleted threads
SwiggitySwerve Oct 28, 2026
3da3a10
fix(mcp): gate explicit preview capabilities on browser access
SwiggitySwerve Oct 28, 2026
38c72eb
fix(qa): preserve non-ASCII paths in encoding checks
SwiggitySwerve Oct 28, 2026
4abc4a9
test(web): scope workflow spies and explain router exclusions
SwiggitySwerve Oct 28, 2026
605fb02
perf(server): filter workflow fallback reads by subagent
SwiggitySwerve Oct 28, 2026
5c47a51
test(web): add a four-stage workflow fixture for screenshots
SwiggitySwerve Oct 28, 2026
4db0fcb
fix(web): stabilize workflow permission atom fixtures
SwiggitySwerve Oct 28, 2026
5357f71
Merge branch 'main' into upstream-sync/rebase-ce66aab
SwiggitySwerve Oct 28, 2026
e822872
fix(workflows): keep tools and turn notes tied to issued credentials
SwiggitySwerve Oct 28, 2026
8e9447e
fix(orchestration): retry admission failures without rejected receipts
SwiggitySwerve Oct 28, 2026
97bc685
fix(opencode): select orchestration instructions for each turn model
SwiggitySwerve Oct 28, 2026
ebb590a
Merge remote-tracking branch 'origin/upstream-sync/rebase-ce66aab' in…
SwiggitySwerve Oct 28, 2026
a7fb6e4
fix(workflows): preserve capability across live-session credential ro…
SwiggitySwerve Oct 28, 2026
79e7bb5
fix(orchestration): retry delegated admission with bounded backoff
SwiggitySwerve Oct 28, 2026
581b929
test(server): enable workflow capabilities in workflow scenarios
SwiggitySwerve Oct 29, 2026
a20b7ff
fix(server): fail closed while workflow capability is unknown
SwiggitySwerve Oct 29, 2026
dc71f14
fix(server): wait for workflow member work before publishing results
SwiggitySwerve Oct 29, 2026
ede7977
fix(server): require explicit workflow membership for provider instru…
SwiggitySwerve Oct 29, 2026
e0dc5f1
chore: merge upstream main after workflow review fixes
SwiggitySwerve Oct 29, 2026
a690587
refactor(server): compile the workflow approval error guard once
SwiggitySwerve Oct 29, 2026
f06a82b
test(server): supply explicit workflow session state in runtime fixtures
SwiggitySwerve Oct 29, 2026
48e76f7
fix(server): reject regex keywords in result schemas
SwiggitySwerve Oct 29, 2026
95e9654
fix(shared): avoid backtracking across workflow block comments
SwiggitySwerve Oct 29, 2026
4e56a6d
fix(provider-core): preserve automated message origins for ultracode
SwiggitySwerve Oct 29, 2026
c3ac6e2
test(server): remove polling from workspace lease ordering proof
SwiggitySwerve Oct 29, 2026
bf1941f
docs: mark workflow member context restrictions as shipped
SwiggitySwerve Oct 29, 2026
230f6ac
fix(server): distinguish schema keywords from property names
SwiggitySwerve Oct 29, 2026
4c750b4
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
16e165c
fix(server): hold workflow results until pending work settles
SwiggitySwerve Oct 29, 2026
8bbea3d
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
df2adc0
fix(server): close workflow Date clock escapes
SwiggitySwerve Oct 29, 2026
96a1b42
fix(server): bound and sequence full workflow updates
SwiggitySwerve Oct 29, 2026
33d6dde
fix(server): tolerate absent thread find creation sources
SwiggitySwerve Oct 29, 2026
dc12f96
fix(server): retry rejected workflow approval notifications
SwiggitySwerve Oct 29, 2026
c1c2736
docs(orchestration): correct Ultracode settings location
SwiggitySwerve Oct 29, 2026
94b0a04
docs(orchestration): describe current workflow timeline
SwiggitySwerve Oct 29, 2026
5007b85
fix(web): match workflow region label to its heading
SwiggitySwerve Oct 29, 2026
1c98d6a
fix(qa): normalize CRLF lines in encoding scans
SwiggitySwerve Oct 29, 2026
801ac84
fix(client-runtime): retain applied sequence on resync
SwiggitySwerve Oct 29, 2026
f1844c3
docs(orchestration): rewrap workflow timeline paragraph
SwiggitySwerve Oct 29, 2026
f2c0cb5
fix(server): construct workflow Dates without the script's iterator
SwiggitySwerve Oct 29, 2026
44a52fd
fix(server): retry approval notifications on a fixed id sequence
SwiggitySwerve Oct 29, 2026
50a55bf
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
05c0172
chore(server): satisfy lint rules in workflow approval retry
SwiggitySwerve Oct 29, 2026
78b0241
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
9a1fcae
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
414fe20
fix(web): share themed progress bar styling
SwiggitySwerve Oct 29, 2026
088ab32
fix(web): share workflow scroll fade styling
SwiggitySwerve Oct 29, 2026
fe113c4
fix(web): enlarge workflow content text
SwiggitySwerve Oct 29, 2026
d01ca25
fix(web): unify sidebar attention status labels
SwiggitySwerve Oct 29, 2026
07cfa25
style(web): keep relative imports in order in WorkflowOpeningBlock
SwiggitySwerve Oct 29, 2026
bbea7c9
fix(web): size the horizontal scrollbar lane its fade keeps opaque
SwiggitySwerve Oct 29, 2026
30ba89c
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
b649fe9
fix(server): settle workers when judge startup fails
SwiggitySwerve Oct 29, 2026
000464b
fix(server): admit workspace children after waiting updates
SwiggitySwerve Oct 29, 2026
93a98c6
fix(shared): preserve cleared workflow lifecycle fields
SwiggitySwerve Oct 29, 2026
c528ea4
fix(web): count workflows before their first agent thread
SwiggitySwerve Oct 29, 2026
9705641
test(server): await delegated analytics drain without a timeout
SwiggitySwerve Oct 29, 2026
7f8224f
test(web): remove scrollbar declaration mirror
SwiggitySwerve Oct 29, 2026
65528dd
fix(server): do not remember a workflow request read without workflows
SwiggitySwerve Oct 29, 2026
a28431c
Merge branch 'main' into upstream-sync/rebase-ce66aab
SwiggitySwerve Oct 29, 2026
c2cf7e6
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
25463e5
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
47e97f8
Merge remote-tracking branch 'upstream/main' into integrate/round1
SwiggitySwerve Oct 29, 2026
bf33dcf
chore: merge upstream fixes into workflow branch
SwiggitySwerve Oct 29, 2026
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
feat(server): workflow_start, workflow_status and workflow_stop for e…
…very provider

workflow_start runs a Claude Code Workflow-format script (meta, args, agent,
parallel, pipeline, phase, log) in a QuickJS sandbox, one module per run, with no
clock, randomness, filesystem or network, a 256 MB memory cap and a 10 s
synchronous slice. Each agent() call is an ordinary delegated task under the
workflow, keyed by a hash of its content and occurrence so a re-run maps calls
back to the same tasks; at most 1,000 agents per workflow and 4,096 items per
parallel or pipeline call. The caller gets one completion notice when the script
ends. workflow_stop and task_cancel on a workflow id stop the script and its agents.

Adds quickjs-emscripten 0.32.0 (approved). DelegateTasks.integration.test.ts is
merged into AgentFanout.integration.test.ts, which shares one harness for batch
delegation and workflows.
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@SwiggitySwerve
SwiggitySwerve committed Oct 28, 2026
commit 99fea38cfc8d1d2fb6ffe859a7b0961740faa302

There are no files selected for viewing

1 change: 1 addition & 0 deletions 1 apps/server/package.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"node-pty": "^1.2.0-beta.15",
"playwright-core": "1.60.0",
"proper-lockfile": "4.1.2",
"quickjs-emscripten": "0.32.0",
"saxes": "6.0.0",
"stream-chain": "^4.2.5",
"stream-json": "3.6.0",
Expand Down
303 changes: 299 additions & 4 deletions 303 ...src/mcp/DelegateTasks.integration.test.ts → ...r/src/mcp/AgentFanout.integration.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
import * as NodeServices from "@effect/platform-node/NodeServices";
import { describe, expect, it } from "@effect/vitest";
import * as NodeServices from "@effect/platform-node/NodeServices";
import {
CommandId,
EventId,
EnvironmentId,
MessageId,
OrchestratorMcpDelegateTasksResult,
OrchestratorMcpTaskWaitResult,
OrchestratorMcpWorkflowResult,
ProjectId,
ProviderDriverKind,
ProviderInstanceId,
type ServerProvider,
ThreadId,
} from "@t3tools/contracts";
import type * as ProviderAdapter from "@t3tools/provider-core/server/ProviderAdapter";
import * as DateTime from "effect/DateTime";
import * as Effect from "effect/Effect";
import * as Fiber from "effect/Fiber";
import * as Layer from "effect/Layer";
import * as Option from "effect/Option";
import * as Schema from "effect/Schema";
import * as Stream from "effect/Stream";
import { McpSchema, McpServer } from "effect/ai";

import * as ServerSecretStore from "../auth/ServerSecretStore.ts";
import { CodexProviderCapabilitiesV2 } from "../orchestration-v2/Adapters/CodexAdapterV2.ts";
import * as CommandReceiptStore from "../orchestration-v2/CommandReceiptStore.ts";
import * as EventSink from "../orchestration-v2/EventSink.ts";
import * as Orchestrator from "../orchestration-v2/Orchestrator.ts";
import * as ProviderAdapterRegistry from "../orchestration-v2/ProviderAdapterRegistry.ts";
import * as ThreadLaunchService from "../orchestration-v2/ThreadLaunchService.ts";
Expand Down Expand Up @@ -144,9 +149,6 @@ const invoke = (name: string, args: Record<string, unknown>) =>
);
});

const decodeStarted = Schema.decodeUnknownEffect(OrchestratorMcpDelegateTasksResult);
const decodeWait = Schema.decodeUnknownEffect(OrchestratorMcpTaskWaitResult);

const errorText = (result: McpSchema.CallToolResult) =>
result.content.map((part) => ("text" in part ? part.text : "")).join("");

Expand Down Expand Up @@ -187,6 +189,58 @@ const childTasks = Effect.gen(function* () {
);
});

/** Finishes a delegated child's run as if its provider replied with `text`. */
const completeChild = (childThreadId: ThreadId, text: string) =>
Effect.gen(function* () {
const orchestrator = yield* Orchestrator.OrchestratorV2;
const sink = yield* EventSink.EventSinkV2;
const child = yield* orchestrator.getThreadProjection(childThreadId);
const run = child.runs.at(-1)!;
const now = yield* DateTime.now;
yield* sink.commitCommand({
commandId: CommandId.make(`command:test-complete:${run.id}`),
threadId: childThreadId,
commandType: "test.complete",
acceptedAt: now,
effects: [],
events: [
{
id: EventId.make(`event:test-reply:${run.id}`),
type: "message.updated",
threadId: childThreadId,
runId: run.id,
occurredAt: now,
payload: {
id: MessageId.make(`message:test-reply:${run.id}`),
threadId: childThreadId,
runId: run.id,
nodeId: run.rootNodeId,
role: "assistant",
text,
attachments: [],
streaming: false,
createdBy: "agent",
creationSource: "provider",
createdAt: now,
updatedAt: now,
},
},
{
id: EventId.make(`event:test-complete:${run.id}`),
type: "run.updated",
threadId: childThreadId,
runId: run.id,
occurredAt: now,
payload: { ...run, status: "completed", startedAt: now, completedAt: now },
},
],
});
});

const decodeStarted = Schema.decodeUnknownEffect(OrchestratorMcpDelegateTasksResult);
const decodeWait = Schema.decodeUnknownEffect(OrchestratorMcpTaskWaitResult);
const decodeWorkflow = Schema.decodeUnknownEffect(OrchestratorMcpWorkflowResult);

describe("delegate_tasks", () => {
it.effect("starts every task in one call, in request order, and retries without duplicates", () =>
Effect.gen(function* () {
Expand Down Expand Up @@ -365,3 +419,244 @@ describe("delegate_tasks over the running limit", () => {
}).pipe(Effect.provide(makeLayerTest(2))),
);
});

/**
* Answers every agent a workflow starts, as its provider would, with `reply(prompt)`.
* Agents whose reply is undefined are left running.
*/
const answerWorkflowAgents = (reply: (prompt: string) => string | undefined) =>
Effect.gen(function* () {
const orchestrator = yield* Orchestrator.OrchestratorV2;
const answered = new Set<string>();
return yield* orchestrator
.streamStoredEventsFrom({
threadId: parentThreadId,
afterSequence: 0,
eventType: "subagent.updated",
})
.pipe(
Stream.runForEach((stored) =>
Effect.gen(function* () {
if (stored.event.type !== "subagent.updated") return;
const task = stored.event.payload;
if (
task.childThreadId === null ||
task.status !== "running" ||
answered.has(task.id) ||
!String(task.parentNodeId).startsWith("workflow:")
)
return;
const text = reply(task.prompt);
if (text === undefined) return;
answered.add(task.id);
yield* completeChild(task.childThreadId, text);
}),
),
Effect.forkChild,
);
});

const awaitWorkflowEnd = (workflowId: string) =>
Effect.gen(function* () {
const orchestrator = yield* Orchestrator.OrchestratorV2;
yield* orchestrator
.streamStoredEventsFrom({
threadId: parentThreadId,
afterSequence: 0,
eventType: "subagent.updated",
})
.pipe(
Stream.filter(
(stored) =>
stored.event.type === "subagent.updated" &&
stored.event.payload.id === workflowId &&
stored.event.payload.status !== "running",
),
Stream.runHead,
);
return yield* decodeWorkflow(
(yield* invoke("workflow_status", { workflowId })).structuredContent,
);
});

const startWorkflow = (script: string, args?: unknown) =>
Effect.gen(function* () {
const result = yield* invoke("workflow_start", {
script,
title: "Test workflow",
...(args === undefined ? {} : { args }),
});
return yield* decodeWorkflow(result.structuredContent);
});

describe("workflow_start", () => {
it.effect("runs phases of parallel and pipelined agents and wakes the caller once", () =>
Effect.gen(function* () {
yield* startParent;
yield* answerWorkflowAgents((prompt) => `done(${prompt})`);
const started = yield* startWorkflow(
`export const meta = { name: "review", phases: [{ title: "Scan" }, { title: "Review" }] }
const scanned = await parallel(args.files.map((file) => () => agent("scan " + file, { label: file, phase: "Scan" })))
log("scanned", scanned.length)
const reviewed = await pipeline(scanned, (text) => agent("review " + text, { label: "review", phase: "Review" }))
return { scanned, reviewed }`,
{ files: ["a", "b", "c"] },
);
expect(started.status).toBe("running");
const ended = yield* awaitWorkflowEnd(started.workflowId);
expect(ended).toMatchObject({
status: "completed",
name: "review",
phases: ["Scan", "Review"],
});
expect(JSON.parse(ended.result!)).toEqual({
scanned: ["done(scan a)", "done(scan b)", "done(scan c)"],
reviewed: [
"done(review done(scan a))",
"done(review done(scan b))",
"done(review done(scan c))",
],
});
expect(ended.agents).toHaveLength(6);
expect(new Set(ended.agents.map((agent) => agent.status))).toEqual(new Set(["completed"]));
expect(ended.agents.filter((agent) => agent.phase === "Review")).toHaveLength(3);

const orchestrator = yield* Orchestrator.OrchestratorV2;
const parent = yield* orchestrator.getThreadProjection(parentThreadId);
const members = parent.subagents.filter((task) => task.parentNodeId === started.workflowId);
expect(members).toHaveLength(6);
expect(new Set(members.map((task) => task.completionDelivery?.state))).toEqual(
new Set(["disposed"]),
);
// One timeline item for the workflow, none for its members.
expect(
parent.turnItems
.filter((item) => item.type === "subagent")
.map((item) => item.type === "subagent" && item.subagentId),
).toEqual([started.workflowId]);
const deliveries = parent.runs.flatMap(
(run) => run.delegatedCompletion?.delivery?.taskIds ?? [],
);
expect(deliveries).toEqual([started.workflowId]);
}).pipe(Effect.provide(layerTest)),
);

it.effect("returns structured results for agents given a schema", () =>
Effect.gen(function* () {
yield* startParent;
yield* answerWorkflowAgents(() => 'Counted.\n```json\n{"lines": 42}\n```');
const started = yield* startWorkflow(
`const counted = await agent("count lines", { schema: { type: "object", required: ["lines"], properties: { lines: { type: "integer" } } } })
return counted.lines + 1`,
);
const ended = yield* awaitWorkflowEnd(started.workflowId);
expect(ended).toMatchObject({ status: "completed", result: "43" });
}).pipe(Effect.provide(layerTest)),
);

it.effect("reports a script error as a failed workflow", () =>
Effect.gen(function* () {
yield* startParent;
const started = yield* startWorkflow('if (!args) throw new Error("args are required")');
const ended = yield* awaitWorkflowEnd(started.workflowId);
expect(ended.status).toBe("failed");
expect(ended.result).toContain("args are required");
}).pipe(Effect.provide(layerTest)),
);

it.effect("refuses a script that does not compile and starts nothing", () =>
Effect.gen(function* () {
yield* startParent;
const result = yield* invoke("workflow_start", { script: "const = 1" });
expect(result.isError).toBe(true);
expect(errorText(result)).toContain("does not compile");
expect(yield* childTasks).toHaveLength(0);
}).pipe(Effect.provide(layerTest)),
);

it.effect.each(["workflow_stop", "task_cancel"] as const)(
"%s stops the script and every running agent, with no completion wake",
(tool) =>
Effect.gen(function* () {
yield* startParent;
yield* answerWorkflowAgents((prompt) => (prompt === "quick" ? "quick done" : undefined));
const started = yield* startWorkflow(
'await agent("quick")\nreturn await parallel([() => agent("slow one"), () => agent("slow two")])',
);
const orchestrator = yield* Orchestrator.OrchestratorV2;
yield* orchestrator
.streamStoredEventsFrom({
threadId: parentThreadId,
afterSequence: 0,
eventType: "subagent.updated",
})
.pipe(
Stream.filter(
(stored) =>
stored.event.type === "subagent.updated" &&
stored.event.payload.prompt === "slow two" &&
stored.event.payload.status === "running",
),
Stream.runHead,
);
yield* invoke(
tool,
tool === "workflow_stop"
? { workflowId: started.workflowId }
: { taskId: started.workflowId },
);
const ended = yield* decodeWorkflow(
(yield* invoke("workflow_status", { workflowId: started.workflowId })).structuredContent,
);
expect(ended.status).toBe("cancelled");
const parent = yield* orchestrator.getThreadProjection(parentThreadId);
const slow = parent.subagents.filter((task) => task.prompt.startsWith("slow"));
expect(slow).toHaveLength(2);
for (const task of slow) {
const child = yield* orchestrator.getThreadProjection(task.childThreadId!);
expect(child.runs.at(-1)?.status).toBe("interrupted");
}
expect(
parent.runs.flatMap((run) => run.delegatedCompletion?.delivery?.taskIds ?? []),
).toEqual([]);
const refused = yield* invoke("workflow_stop", { workflowId: started.workflowId });
expect(refused.isError).not.toBe(true);
}).pipe(Effect.provide(layerTest)),
);
it.effect("stopping the calling thread stops its workflow and the workflow's agents", () =>
Effect.gen(function* () {
yield* startParent;
const started = yield* startWorkflow('return await agent("slow")');
const orchestrator = yield* Orchestrator.OrchestratorV2;
const threads = yield* ThreadManagementService.ThreadManagementService;
const member = yield* orchestrator
.streamStoredEventsFrom({
threadId: parentThreadId,
afterSequence: 0,
eventType: "subagent.updated",
})
.pipe(
Stream.filter(
(stored) =>
stored.event.type === "subagent.updated" &&
stored.event.payload.prompt === "slow" &&
stored.event.payload.childThreadId !== null,
),
Stream.runHead,
);
const commandId = CommandId.make("command:stop-workflow-caller");
yield* orchestrator.dispatch({ type: "thread.stop", commandId, threadId: parentThreadId });
yield* threads.stopDelegatedTasks({ threadId: parentThreadId, commandId });
// The caller's own turn stopped too, so its MCP calls are refused; read the row.
const workflow = (yield* orchestrator.getThreadProjection(parentThreadId)).subagents.find(
(task) => task.id === started.workflowId,
);
expect(workflow).toMatchObject({ status: "cancelled", result: "Workflow stopped." });
const event = Option.getOrThrow(member).event;
const childThreadId = event.type === "subagent.updated" ? event.payload.childThreadId! : null;
expect((yield* orchestrator.getThreadProjection(childThreadId!)).runs.at(-1)?.status).toBe(
"interrupted",
);
}).pipe(Effect.provide(layerTest)),
);
});
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.