Commit b408c6d
committed
Add integrations CLI and workflows step-delete
Integrations
------------
- integrations list / get <provider>: catalog browsing
- integrations connections list [--provider]: list active connections
- integrations connect <provider>: API-key connection (Claude, OpenAI, etc.).
Prompts for the key (hidden) by default, accepts --api-key, supports
--user-connection for user-scoped connections.
- integrations oauth status <provider>: shows OAuth client setup state
- integrations oauth configure <provider>: stores OAuth client_id + secret
for a tenant. --use-social-sign-in flags it for social login.
- integrations oauth callback-url: prints the dashboard callback URL users
need to add to their OAuth app's redirect URLs (the URL is also surfaced
by oauth status / shown after a successful configure).
- integrations oauth connect <provider>: full browser OAuth dance — binds a
local listener on http://localhost:8745/callback, opens the browser,
captures the code, exchanges for a connection.
- integrations test <id> / enable <id> / disable <id> / disconnect <id>:
connection lifecycle.
- integrations execute <provider> <operation>: runs an integration operation
(e.g. claude generate-text). Inputs via repeated --input k=v or --inputs
'<json>'. Output is the response's content field, or full JSON with --json.
Workflows
---------
- workflows step-delete <workflow_id> <step_id>: deletes a step. Detects
inbound links and warns before the delete. If the API rejects with a 500
(FK constraint when other steps still reference the target), translates
the error into a clear message listing the offending steps and the
step-link commands needed to fix them.
Tests
-----
- tests/IntegrationsTests.cs: 17 tests covering all integration client
methods, snake_case wire format on POST/PUT bodies (the bug we hit during
development), and IntegrationsCallbackUrl / DashboardUrl derivation.
- tests/AnythinkClientExtendedTests.cs: DeleteWorkflowStepAsync happy path
plus 500 propagation for the FK-violation case.
- All 211 tests pass.
Verified end-to-end against staging:
- Slack OAuth dance: configure -> connect -> connection created with bot token
- Slack send-message via integrations execute (response received in channel)
- step-delete: deleted 3 orphans on workflow 36 (workout_completed_points)
using the new command. Verified the FK-violation error translation by
attempting to delete a step with inbound links.1 parent feece9b commit b408c6d
8 files changed
Lines changed: 1687 additions & 1 deletion
File tree
- src
- Client
- Commands
- Models
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
467 | 468 | | |
468 | 469 | | |
469 | 470 | | |
470 | | - | |
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
503 | 584 | | |
504 | 585 | | |
505 | 586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
15 | 29 | | |
16 | 30 | | |
17 | 31 | | |
| |||
106 | 120 | | |
107 | 121 | | |
108 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
109 | 126 | | |
110 | 127 | | |
111 | 128 | | |
| |||
275 | 292 | | |
276 | 293 | | |
277 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
278 | 337 | | |
279 | 338 | | |
280 | 339 | | |
| |||
0 commit comments