New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@opentag/runner

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentag/runner

Executor contracts and built-in runner adapters for OpenTag.

latest
npmnpm
Version
0.10.0
Version published
Maintainers
2
Created
Source

@opentag/runner

Executor contracts and the generic ACP host for OpenTag.

Use this package when building a local daemon, hosted runner, or custom executor that consumes OpenTag runs.

Install

pnpm add @opentag/runner

Exports

  • ExecutorAdapter: interface every executor implements.
  • createEchoExecutor: smoke-test executor that echoes the normalized command.
  • createAcpAgentExecutor: generic stdio ACP host for an ACP launch definition.
  • createBuiltInAcpExecutors: built-in launch profiles for pinned Codex, Claude, and OpenCode packages plus installed Cursor, Hermes, and OpenClaw ACP commands.
  • builtInAcpAgentDefinitions: the data-only built-in definitions and Registry provenance where a pinned Registry package is used.
  • createAcpExecutor: lower-level generic stdio ACP host for an internal integration manifest.
  • Git helpers such as createRunBranch, changedFiles, and branchNameForRun.
  • Command helpers such as nodeCommandRunner and assertCommandSucceeded.
  • Built-in and generic ACP executors expose an optional capability contract so setup, doctor, status, and service surfaces can report profile, cancellation, hook-completion, progress-event, approval-boundary, prompt/context trust gates, workspace isolation, ACP session-cwd conformance, secret, and completion-signal support honestly.

Example

import type { ExecutorAdapter } from "@opentag/runner";

export const executor: ExecutorAdapter = {
  id: "my-agent",
  displayName: "My Agent",
  capability: {
    id: "my-agent",
    invocation: "spawn",
    supportsProfile: false,
    supportsStreaming: false,
    supportsCancel: false,
    supportsHookCompletion: false,
    progressEvents: "audit",
    approvalMode: "opentag_policy",
    contextAccess: ["context_packet", "context_pointers", "workspace"],
    promptAssembly: "executor_adapter",
    writeAccess: "workspace",
    conversationAccess: "request",
    promptMutation: "none",
    rawContextAccess: false,
    writeActionAccess: "none",
    workspaceIsolation: "branch",
    requiredSecrets: [],
    completionSignals: [
      {
        type: "process_exit",
        required: true,
        description: "The process exits after producing the final result."
      }
    ]
  },
  async canRun() {
    return { ready: true };
  },
  async run(input, sink) {
    await sink.emit({
      type: "executor.started",
      message: `Running ${input.command.rawText}`,
      at: new Date().toISOString()
    });

    return {
      conclusion: "success",
      summary: "Handled by my-agent"
    };
  },
  async cancel() {
    return;
  }
};

Safety Notes

Codex, Claude Code, Cursor, OpenCode, Hermes, and OpenClaw run through the same generic ACP host. Codex, Claude, and OpenCode use exact package versions through npx; Cursor uses its installed native ACP command; Hermes uses its configured local command and profile; OpenClaw uses its installed Gateway ACP bridge. OpenCode launches in pure mode so external plugins cannot pollute the strict ACP stdout stream. The generic ACP host passes the attempt workspace as the ACP session cwd, scrubs the child environment, and terminates the adapter process group when a run is cancelled. OpenClaw declares supportsCancel: false: OpenTag requests cancellation and stops its local bridge, but does not attest termination of Gateway-owned tool subprocesses.

Stability

ExecutorAdapter is public API. Add optional fields rather than changing required method signatures.

Keywords

opentag

FAQs

Package last updated on 17 Aug 2026

Related posts