Skip to content

feat(ocs): 4 more authoring atoms + verification doc#389

Merged
jjackson merged 1 commit into
mainfrom
emdash/ocs-vw0t6
May 21, 2026
Merged

feat(ocs): 4 more authoring atoms + verification doc#389
jjackson merged 1 commit into
mainfrom
emdash/ocs-vw0t6

Conversation

@jjackson
Copy link
Copy Markdown
Owner

Summary

Completes the 5-atom OCS authoring batch started in PR #386. Together these atoms let ACE construct a full Connect Interviews-style Dynamic Router Bot from scratch — no human UI clicks.

4 new atoms, all verified end-to-end against live OCS:

  • `ocs_add_chatbot_event` — multi-form combined POST to attach timeout events.
  • `ocs_add_custom_action` — OpenAPI-schema-driven; scrapes the actions table to recover the new id (the create view doesn't expose it).
  • `ocs_link_action_to_node` — appends `<action_id>:<operation_id>` to a node's `params.custom_actions`.
  • (`ocs_create_chatbot` + `ocs_add_pipeline_node` were in feat(connect-interviews): schema + 3 atoms for V1 automation #386.)

Stub bot structurally complete: experiment 12213, pipeline 5981 = Start → StaticRouterNode → LLM (linked to action 35:postSessionCompletion) → End, plus a 24hr timeout event.

Verification doc

`docs/connect-interviews/ocs-verification.md` was added after Jon flagged "every assumption you're making in OCS should be verified in the code." I cloned OCS source locally and went through every claim. Key corrections to the original `ocs-probe-report.md`:

  • Custom action URL is `/a//actions/`, not `/custom-actions/`
  • CustomActionForm fields are OpenAPI-driven, not simple webhook config
  • Events CANNOT directly fire custom actions — `ACTION_PARAMS_FORMS` has no such key. The Connect Interviews tech doc's "24hr fires custom action" requires `pipeline_start` action_type pointing at a secondary pipeline.
  • `DynamicRouterNode` doesn't exist server-side — team's "Dynamic Router Bot" maps to OCS `StaticRouterNode`.
  • Pipeline-save validates AFTER commit (200 + errors in body, state persists). Callers must clean up partial state.

Open architectural question

The "two pipelines per bot" architecture in my V1 schema is inferred from the tech doc + OCS source — I have no visibility into the team's actual production bot. Flagged in the verification doc. When access lands (bot export, screenshot, or OCS team membership), the schema may need adjustment.

Test plan

  • `npx tsx scripts/probe-ocs-add-chatbot-event.ts --commit`
  • `npx tsx scripts/probe-ocs-add-custom-action.ts --commit`
  • `npx tsx scripts/probe-ocs-link-action-to-node.ts --commit`
  • Round-tripped against ACE stub bot in connect-ace OCS team
  • Integration tests deferred until full atom matrix is in

🤖 Generated with Claude Code

Completes the 5-atom OCS authoring batch (1 was in PR #386). Together
these atoms let ACE construct a full Connect Interviews Dynamic Router
Bot from scratch, no human UI clicks.

New atoms (all verified end-to-end against live OCS):
  - ocs_add_chatbot_event — POST events/timeout/new/ with the THREE
    combined forms (TimeoutTriggerForm + EventActionForm + action-params).
    Verified: attached 24hr timeout event to stub bot (action_type=log).
  - ocs_add_custom_action — POST /a/<team>/actions/new/ (NOT
    /custom-actions/ as the original probe report said). OpenAPI-schema-
    driven, not webhook config. Scrapes /actions/table/ to recover the
    new action_id since the 302 redirect goes to the team-manage page
    with no id in the Location. Verified: created action 35 with a stub
    schema for HQ session-completion posting.
  - ocs_link_action_to_node — appends "<action_id>:<operation_id>" to a
    pipeline node's data.params.custom_actions. String format verified
    against apps/custom_actions/form_utils.py:make_model_id. Idempotent.
    Verified: wired action 35:postSessionCompletion to LLM node in
    pipeline 5981.

Verification doc (docs/connect-interviews/ocs-verification.md) corrects
multiple wrong claims from the original ocs-probe-report.md:
  - custom action URL is /a/<team>/actions/, not /custom-actions/
  - CustomActionForm fields are OpenAPI-driven (name, server_url,
    api_schema, +optional description/prompt/auth_provider/healthcheck_path)
    NOT the simple-webhook fields the probe report claimed
  - Events cannot directly fire custom_actions — ACTION_PARAMS_FORMS only
    has {log, send_message_to_bot, end_conversation, schedule_trigger,
    pipeline_start}. The tech doc's "24hr fires custom action" pattern
    requires a secondary pipeline + action_type=pipeline_start.
  - DynamicRouterNode doesn't exist — use StaticRouterNode (route_key +
    keywords against participant_data)
  - Pipeline-save validates AFTER commit (200 + errors in body but state
    persists); FlowNode needs both top-level type + data.type + data.id.

Stub bot now structurally complete:
  - experiment 12213 (ACE Interviews Stub Template) in team connect-ace
  - pipeline 5981: Start → StaticRouterNode-8f9a7 → LLM (custom_actions=
    ["35:postSessionCompletion"]) → End
  - 24hr timeout event attached
  - action 35 (session-completion API stub)

Tasks #3 and #13 → completed. PR builds on top of #386 (merged).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jjackson jjackson enabled auto-merge May 21, 2026 23:40
@jjackson jjackson merged commit 5e170c9 into main May 21, 2026
2 checks passed
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.

1 participant