Skip to content

feat: add the production interface manifest - #432

Merged
neubig merged 2 commits into
mainfrom
hieptl/oss-5801
Aug 1, 2026
Merged

feat: add the production interface manifest#432
neubig merged 2 commits into
mainfrom
hieptl/oss-5801

Conversation

@hieptl

@hieptl hieptl commented Jul 31, 2026

Copy link
Copy Markdown
Contributor
  • A human has tested these changes.

Why

Promotes extension-owned data into the production Automation interface. The merged setup contract (#423) deliberately modeled only the per-entry setup block, so every domain-level fact — routes, navigation, page copy, the settable attributes, the import/export envelope, endpoint paths, the proven/responder groupings — still lived hardcoded in Agent Canvas. This PR gives those facts one extension-owned home, stated once at the domain level rather than eight times per entry, and adds the assisted fallback the acceptance criteria require for deployments that cannot run direct setup.

Summary

  • Add automations/interface.json (the production interface manifest) and automations/interface.schema.json (its strict contract), exported as AUTOMATION_INTERFACE with full typings from ./automations and the root entry, plus package exports entries for both files.
  • Allow an optional message on mode:"direct" setup entries — the seed for the fallback conversation offered when a deployment's capabilities preclude the direct path — and add fallback messages to github-pr-reviewer and github-repo-monitor.
  • Document the interface manifest in automations/README.md (ownership rules, trust boundary, deviation-table updates) and add tests/test_interface_manifest.py (12 tests: schema validity, manifest conformance, mutation rejections, catalog cross-references, fallback messages, node export smoke).

Issue Number

Resolves #421

How to Test

  1. uv sync --group test
  2. uv run --group test pytest tests/ -q — 512 passed, 6 skipped, including the new tests/test_interface_manifest.py.
  3. node --input-type=module -e "import('./automations/index.js').then(m => console.log(m.AUTOMATION_INTERFACE.routes))" prints the three routes.
  4. npm run build:automationsautomations/catalog-index.js is unchanged (the two manifest edits are content-only).

Video/Screenshots

Not applicable — data/contract change; the pytest run above is the verification.

Notes

  • No version bump in this PR: release-please owns it.
  • Agent Canvas consumes AUTOMATION_INTERFACE defensively (absent → host defaults), so this releases independently of the Canvas PR.
  • The contract fixtures pin /v1/preset/prompt; a future change to endpoints.createPrompt must regenerate them in the same release (noted in the README section).

@hieptl hieptl self-assigned this Jul 31, 2026
@github-actions github-actions Bot added the type: feat A new feature label Jul 31, 2026
@hieptl
hieptl requested a review from neubig July 31, 2026 11:44
Comment thread automations/interface.schema.json
Comment thread automations/interface.schema.json Outdated
{ "pattern": "^[^{}]*\\{id\\}[^{}]*$" }
]
},
"editField": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these... properties or attributes of an automation? Or "variables" for the user to fill in or to select?

If so, could we name this "attributes" or "variables"?

It's a UI-specific concern that it happens to be represented on agent-canvas side by an edit field. If the agent uses this interface via API, "editField" seems a bit of an awkward fit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these represent attributes of an automation—the keys are the runtime model properties themselves—I renamed the $defs.editField definition to attribute and added the following description: "How one settable attribute is offered: a semantic input type, user-visible copy, and value constraints."

I also updated the corresponding TypeScript types for consistency:

  • AutomationEditField*AutomationAttribute*
  • AutomationEditablePropertyAutomationAttributeName
  • AutomationInterfaceEditAutomationInterfaceAttributes

These changes were applied in both automations/index.d.ts and the root index.d.ts re-exports.

Thank you very much! 🙏

Comment thread automations/interface.schema.json Outdated
"pattern": "^https://docs\\.openhands\\.dev/[A-Za-z0-9/._-]*$"
},
"edit": {
"description": "The edit dialog: which Automation properties it offers, keyed by the property each field edits. The closed key set is the editable surface of the runtime model; schedule is a semantic type whose frequency/weekday/time composite the host owns, like the setup form's cron type.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I'm reading, "edit" and "editable" means "input", right? Input from the user. What if we say, idk, like:

"variables": {
  "description": "The input for an Automation: which variables it offers, keyed by the variable the user or agent can send. The closed key set is the input surface of the runtime model; schedule ..."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I reframed it to represent the input surface exactly as discussed, with one terminology change: I used attributes (your other suggestion) instead of variables. In this package, variables already refers to the setup form's {{form.<name>}} template variables, whereas these represent something different—the runtime model's own properties, which can be updated on an existing automation.

The block is now a top-level attributes map keyed by the runtime model property. It is described as the input surface, while leaving the presentation up to the client—for example, Canvas may render an edit dialog, whereas an agent may provide the values through the API. I also moved the previous dialog title into pages, alongside the rest of the page identity copy.

Thank you very much! 🙏

Comment thread automations/interface.schema.json Outdated

@enyst enyst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! It clarifies a lot and seems to allow us to play with Automations better, even design a new UI for them on the basis of this lot of structured information.

I left a few comments inline, basically on the "edit fields": those don't sound like domain-level Automation definition, they're particular UI-specific, that is, they belong on agent-canvas side. Agent-canvas can choose edit fields for receiving input. But the Automation is not made of edit fields, it seems to me, it would be made of inputs, or variables.

If I may put this differently, if I take a step back and imagine the agents working with Automations (they don't necessarily use canvas), it would nice for them to have a clean and explicit domain structure. That will include inputs, it seems to me.

@hieptl
hieptl requested a review from enyst July 31, 2026 18:22
@hieptl

hieptl commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Hello @enyst,

I've updated the code based on your feedback. When you have a chance, could you please take another look at the pull request?

Thank you very much! 🙏

@neubig neubig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@enyst enyst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious how easy will the agent work with it now. We'll see 😅

Thank you!

@neubig
neubig merged commit f3e8bf7 into main Aug 1, 2026
9 checks passed
@neubig
neubig deleted the hieptl/oss-5801 branch August 1, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship the extension-owned Automation interface

3 participants