Skip to content

feat: add workflow discovery and execution#40

Open
shhac wants to merge 1 commit intostablyai:mainfrom
shhac:paul/feat-workflows
Open

feat: add workflow discovery and execution#40
shhac wants to merge 1 commit intostablyai:mainfrom
shhac:paul/feat-workflows

Conversation

@shhac
Copy link
Contributor

@shhac shhac commented Feb 23, 2026

Summary

  • Adds workflow command with list, preview, get, and run subcommands
  • Discover workflows bookmarked or featured in a channel
  • Preview trigger metadata, get workflow definitions including form fields/steps
  • Trip workflow triggers programmatically

Form submission via --field (RTM WebSocket) will follow in a separate PR.

New files

  • src/cli/workflow-command.ts — CLI command registration
  • src/slack/workflows.ts — workflow discovery, preview, schema, and trigger APIs

Usage

# List workflows in a channel
agent-slack workflow list #channel

# Preview trigger metadata (no side effects)
agent-slack workflow preview <trigger-id>

# Get workflow schema (form fields + steps)
agent-slack workflow get <trigger-or-workflow-id>

# Trip a trigger
agent-slack workflow run <trigger-id> --channel #channel

Test plan

  • Lint, fmt, typecheck clean
  • Manual: trip-only verified against live workspace

@shhac shhac force-pushed the paul/feat-workflows branch from 649743a to 6231744 Compare March 6, 2026 15:14
@AmethystLiang
Copy link
Contributor

Thx for the PR. Hopefully either one of me or @nwparker can help get it in today.

@shhac shhac force-pushed the paul/feat-workflows branch from 969f54c to 3e5d200 Compare March 9, 2026 00:58
@shhac
Copy link
Contributor Author

shhac commented Mar 9, 2026

Looks like I pushed this with the wrong base last time 🙈 have rebased onto stablyai:main

@AmethystLiang
Copy link
Contributor

I like the overall direction here. workflow list / preview / get / plain run all feel pretty useful and consistent with the rest of the CLI.

The one part I’m less sure about is form submission via --field. It feels like a meaningfully different level of surface area / maintenance burden from the rest of the PR, and I’m not sure we need to take that on in the first pass.

Would you be open to scoping this PR to:

  • workflow list
  • workflow preview
  • workflow get
  • workflow run without --field

and then doing form submission as a follow-up once we’ve had a chance to prove out exactly what we want to support there?

That feels like a very easy version to land, still adds real value, and keeps us from overcommitting on workflow-form support before we know how robust we want it to be.

@shhac
Copy link
Contributor Author

shhac commented Mar 12, 2026

@AmethystLiang I like your suggestion to narrow the scope of a single PR, splitting the concerns.

I'll take a look into how to split it neatly, if that's doable along the lines you're asking about.

I don't think any other slack tool I've seen has managed to successfully do the form submission style of slack workflow, so adding this functionality would give this cli a unique feature.
(One of the reasons why it is hard is probably the undocumented nature and webhook requirements which was the only way I found to do it based on my investigation)

@shhac shhac force-pushed the paul/feat-workflows branch from 3e5d200 to a17585e Compare March 12, 2026 21:26
@shhac shhac changed the title feat: add workflow discovery, execution, and form submission feat: add workflow discovery and execution Mar 12, 2026
@shhac
Copy link
Contributor Author

shhac commented Mar 12, 2026

@AmethystLiang have split the code
The second half is now on shhac:paul/feat-workflow-fields (I'll open the follow-up PR after this one lands)

@shhac shhac force-pushed the paul/feat-workflows branch 3 times, most recently from 97359c7 to 37184b8 Compare March 19, 2026 13:55
Add `workflow` command with subcommands:
- `list` — discover workflows bookmarked in a channel
- `preview` — get trigger metadata
- `get` — get workflow definition including form fields
- `run` — trip a workflow trigger
@shhac shhac force-pushed the paul/feat-workflows branch from 37184b8 to e1c8c4d Compare March 23, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants