@ai-workbench/employee-tools
v0.1.0
Published
Employee six-tool execution and MCP endpoint; caller-owned lifetime, shell and diagnostics.
Readme
@ai-workbench/employee-tools 0.1.0
The accepted employee six-tool executor and Unix-stream MCP endpoint extracted from codex-remote. Node >=24.13.1; the MCP endpoint retains its existing macOS and /usr/bin/nc availability checks. The workspace is a separately packable runtime package, with no DSH, X, L, N, or host-adapter dependency.
Exports:
EMPLOYEE_TOOL_NAMES,EMPLOYEE_MCP_TOOLS: the original Read/Write/Edit/Glob/Grep/Bash names, schemas and Chinese descriptions, unchanged.createEmployeeTools(options, runtime): returns the originalcall(name, input, requestSignal?, observer?)andclose(cause?). Options require explicit cwd, shell, uid, maxBytes, killGraceMs, validate, detail; rgPath/runShell/closeDiagnostics retain their original optional meanings.Bashrequires the caller'srunShell; there is no local-shell or host fallback.openEmployeeMcp(options, runtime): starts the existing private Unix socket MCP server.contextsupplies cwd/shell/uid, lifetimesignalandclose(cause);routing(socketPath)lets the caller describe that existing endpoint without putting SSH, device selection or DSH leases in this package. The result is{routing, signal, close}.EmployeeSocketTransport(socket, maxBytes, runtime, observeClose?): original newline MCP JSON transport, with the same UTF8, size and cancellation behavior.- Structural port types from
ports: caller-owned shell, diagnostics, context, and errors.runtime={NeedError,closeCode}must contain the caller's existing error constructor and classifier; the package does not replace its error identity or logging state.
activeSignal: () => AbortSignal | undefined is required for MCP. It is called on every tools/call, never cached when opening the server. Without a live accepted turn, the original EMPLOYEE_NO_ACTIVE_TURN error is returned without execution. Each admitted call combines active-turn, MCP-request, transport, and context signals. DSH supplies its existing activeSignal getter; another caller supplies its current connection/run signal. The package creates no model loop, approvals, network identity, ACL, retries, reconnects, or new timeouts.
The optional structural bridge port retains the existing D31 hooks (tools, isBridge, call); stable X passes none. It does not implement or select a bridge. The package's module-level mutation queues remain shared across executor instances. Observer capture, first-close state, cleanup order, error text, MCP server version 0.8.14 and schema behavior are retained.
Default Grep uses the same retained rg binaries, manifest, notices and license bytes under this package's helpers/ripgrep. Size/SHA256/execute-bit checks remain; there is no reverse lookup of remote-agent or PATH fallback. Supplied rgPath keeps its original semantics.
From the repository root, after npm ci --ignore-scripts:
npm run build
npm run pack:employee-tools -- /absolute/new/artifact-directoryThere are no install, prepare or publish lifecycle hooks. The tgz carries compiled JS/declarations and retained helpers/licenses; TypeScript, tests, source, credentials and X are not required by an installed consumer. Publishing is a separate orchestrator action from a neutral directory with controlled npm configuration; U1 does not publish or change deployed aw.6/aw.9.
