let oci = import "schemas/lib/integration/oci_artifact_format.ncl" in

# IntegrationMode declaration — the orchestration this artifact represents.
# Consumers subscribe via `prvng integration subscribe <mode-id>` which pulls
# this declaration and the domains_used dependencies, then scaffolds a
# cabling file for them to bind workspace-specific values.

{
  id          = "<my-mode-id>",
  participant = "<my-participant>",
  version     = "0.1.0",
  description = "<one-line summary>",
  direction   = 'outbound,            # outbound | inbound | bidirectional
  trigger     = 'manual,              # manual | scheduled | event

  # Domains this mode consumes. Each entry pins a version + media type.
  # The cabling file consumers write will provide values matching each domain's
  # contract.ncl shape.
  domains_used = [
    "secret-delivery:0.1.0",
    "<your-other-domain>:0.1.0",
  ],

  # Steps the mode executes. Each step receives the assembled context (bindings
  # from the cabling file) via stdin or argv.
  steps = [
    {
      id          = "step-1",
      description = "<what this step does>",
      invocation  = {
        method = 'stdin_context,
        binary = {
          source = 'cargo_install,
          name   = "<binary-name>",
          version = "0.1.0",
          cargo_crate = "<crate-name>",
        },
        args = [],
        env  = {},
      } | oci.Invocation,
    },
  ],
}
