Capability first · transport second

SystemToolRegistry.js

Registers validated command builders and constructs command strings without executing them.

SDK 0.5.18Runtime 0.8.12Protocol arcane/1
On this page

Overview

Registers validated command builders and constructs command strings without executing them.

  • Artifact
    SystemToolRegistry.js · esm
  • Classification
    public first party
  • Availability
    Cross-host
  • Normalization
    Fully normalized definitions/quoting.

Import and lifecycle

JavaScript
import * as module from '/arcane/modules/SystemToolRegistry.js';

Pure registry and command-string construction; it never executes a command.

Application-facing behavior: default registry, quoteArgument(), register/list/get/build APIs.

Protocol and host implementation

In-process only This detail does not widen the application-facing API or grant authority.

Exports, signatures, parameters, and results

BindingFormDeclaration or signatureParameter syntax
defaultdefault · classclass SystemToolRegistry
quoteArgumentfunctionfunction quoteArgument(value)value
CallableKindExact public signatureParameter syntax
quoteArgumentexported-functionfunction quoteArgument(value)value
MemberKindExact public declarationParameter syntax
SystemToolRegistry.constructorconstructorconstructor(definitions=[])definitions=[]
SystemToolRegistry.registermethodregister(definition={})definition={}
SystemToolRegistry.listmethodlist()
SystemToolRegistry.getmethodget(id)id
SystemToolRegistry.buildmethodbuild(id,args=[])id,args=[]

Parameter meanings and results

quoteArgument(value) returns a conditionally quoted string. new SystemToolRegistry(definitions); register({id,label?,description?,usage?,command:string|builder}); list(); get(id); build(id,args) returns a trimmed command string.

Events, side effects, and errors

Source-literal CustomEvent dispatches

No source-literal CustomEvent dispatch is part of this artifact.

Lifecycle and event flow

This artifact has no additional documented lifecycle event flow.

Direct coded failures

This artifact directly assigns no stable coded failure.

Exported Error subclasses

This artifact exports no Error subclass.

Documented failure behavior

  • TypeError for duplicate/invalid id, missing builder, or empty built command.
  • RangeError for unknown tool.
  • Builder errors propagate.

Availability and capabilities

Cross-host. Fully normalized definitions/quoting.

None. A caller that executes the string separately owns terminal.execute or other execution authority.

Contract example

JavaScript
import Registry,{quoteArgument} from '/arcane/modules/SystemToolRegistry.js';

const tools = new Registry([{
    id:'echo',
    command:args => 'echo ' + args.map(quoteArgument).join(' ')
}]);
console.log(tools.build('echo',['hello world']));

No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.