CH-J Toolsserver management over SSH
Menu
All guides and articles →

Matrix API: unified server management across operating systems

How CH-J Tools maps logical operations to fixed system implementations. The difference between catalog, runtime, module API and truly validated support.

One operation, different system designs

Managing accounts or reading metrics has a common user meaning but different implementation on Linux and Windows. Matrix in CH-J Tools links a named operation to a system profile, the corresponding script and the necessary arguments. This way, the user interface does not have to compose an arbitrary remote command for each distribution.

This article is based on a distributed source snapshot of the 0.1.3 desktop release. It distinguishes the actual runtime from historical drafts in the working notes. It is not a public REST service to which any server would automatically accept HTTP requests. Nor is it the protocol of the Matrix chat network of the same name.

The catalog of operations describes the meaning and conditions

An operation record can include identifier, inputs, outputs, permissions, risks, source implementation, and OS status. Examples include users.list or ssh.platform.detect. This information helps to link a single purpose to a specific implementation and test record. However, the record needs to be continuously checked against the actual code.

Metadata is not an automatic guarantee of all properties. Some items may have incomplete fields or a state implemented without a live test. Therefore, decisions about the security of a change must respect the authorization path, validation, and actual implementation. A low risk label alone is not a substitute for verifying what the operation does on a specific system.

The runtime is bound to a specific build

In a verified desktop source, the runtime catalog is compiled into a binary from the Matrix data. The Core service names the operation and the runtime selects an available binding. The implementation does not take arbitrary command text from the same user form as the system script. Such separation limits the scope for accidental or fraudulent change of the meaning of the operation.

Fixed script and user arguments have different roles. Arguments must undergo appropriate validation and indentation; security does not come from simply moving a string to JSON. Furthermore, sensitive data should not end up in the log. Consider security features throughout the chain from module input to remote execution.

System profile and availability

The runtime selects the Windows or POSIX-compliant branch and can reject the operation without an available binding. There is also a fallback to the Debian profile in the given source for unrecognized POSIX environments. This is an implementation-specific decision, not evidence of universal support for every Unix. An unknown system needs special consideration and testing.

The availability check must also take into account operations without a remote script, such as some SFTP paths. After SSH is established, a tool, permission, or expected service manager may not be available yet. Distinguish an unsupported platform from an operational error and from an authorization denial. Each state should convey different information to the user.

Matrix and module APIs are not interchangeable layers

The module API provides an interface between an extension or user interface and the application core. Matrix is primarily concerned with the selection and recording of system operations. These are related but distinct contracts. The module API version number alone does not describe all target distributions or SSH library algorithms.

Similarly, a mobile application may use the related catalog and shared system knowledge, but does not automatically have all the desktop modules. Provide support for a specific product and release. The existence of a definition in the broader source tree is not, by itself, evidence that the corresponding action in the interface is available to the mobile user.

How to verify the correctness of a new operation

Start with a concrete meaning and return contract. For each OS, verify the implementation, arguments, permissions, and error behavior. Supplement the parser unit test with a controlled execution in the corresponding recoverable image. For mutation, verify the actual resulting state and return option, not just the script's zero return code.

Include missing tools, different output language, and unsupported environments. If the operation uses fallback, note this. Tie the test result to a build and date so that a later script change is not hidden behind a historical PASS. The matrix is intended to be a clear record, not a way to declare an unverified item done.

Benefit for administrators

  • A logical operation has a single meaning.
  • The system design is traceable and assembly-related.
  • Arguments, justifications and risks are assessed separately.
  • Unavailable and unverified cases are visible.
  • The test confirms the actual result on a specific platform.

A well-managed Matrix layer simplifies the development of a common interface without pretending that the operating systems are the same. It helps the administrator understand what the client will do and what has already been verified. Its value is this connection between meaning, implementation, and proof, not the sheer number of items in the catalog.

Frequently asked questions

Is it a public HTTP API running on every server?

No. The article describes the internal operating layer of a specific desktop edition.

Is Matrix the same as the module API?

No. The layers are related, but have a different contract and purpose.

Does fallback guarantee full support for an unknown POSIX system?

No. It is a specific implementation path that requires self-assessment and verification.

Detailed documentation

CH-J Tools: public source release snapshots →

OpenSSH: remote startup and transfer →

Biometric unlock and security →

All tutorials by category →