Expand description
Shim generation.
A shim is a stand-in for a tool’s executable, placed in the shims dir (which
the user puts on PATH). Invoking it dispatches to the active version via the
osdk-shim launcher.
- Unix: a symlink from
shims/<name>to theosdk-shimbinary. The launcher inspects argv[0] to learn which tool to run. - Windows: no symlink (privilege). We emit
shims/<name>.cmdand an extension-less bash wrappershims/<name>so cmd.exe/PowerShell and Git-Bash both work, each invokingosdk-shim.exe.
Structs§
- Validated
Dynamic Install - One persisted dynamic install whose complete identity has been checked against the active request. Callers keep this value through path and executable selection so security-sensitive inventory data is not reloaded.
Functions§
- configured_
and_ installed_ dynamic_ ids - Dynamic backend ids relevant to lifecycle operations that survive restarts: configured ids plus anything found on disk through inventory scanning.
- configured_
dynamic_ ids - Dynamic backend ids referenced by the current config. Persisted install manifests intentionally never own aliases or configuration keys.
- dynamic_
bin_ ownership - Deterministic manifest-backed bin ownership used after a process restart,
even when the dynamic backend implementation itself does not expose
bin_namesyet. - dynamic_
request_ from_ config - Resolve a dynamic backend request from the merged config, supporting both a
direct dynamic backend key (
"npm:@scope/pkg" = "1.2.3") and an indirection key whose value is the dynamic request (tool.ni = "npm:@scope/pkg@1.2.3"). - find_
shim_ binary - Locate the installed
osdk-shimbinary. It is expected to sit next to theosdkbinary (same dir). Falls back to the shims dir. - generate_
shim - Generate a shim named
namein the shims dir pointing atosdk_shim_bin. - remove_
managed_ shim - Remove a shim only when it has osdk’s generated shape. This lets
reshimreconcile obsolete routing aliases without deleting unrelated files that a user may have placed in the shims directory. - remove_
shim - Remove a shim by name (all its platform variants).
- routed_
bin_ names - Executable names that should route through the shim for an installed backend version. These are deliberately separate from backend ownership: Node does not own npm/npx, but its bundled launchers still need routing shims so Node-only activations cannot bypass package-registry preflight.
- scan_
dynamic_ installs - Scan all persisted dynamic-tool manifests under the installs tree.
- selected_
dynamic_ install_ identity - validated_
dynamic_ install - Load the selected dynamic install and require it to prove the same backend,
exact version, and public option identity as the configured request. Legacy
.osdk-tool.jsonand missing inventories are discoverable elsewhere, but cannot authorize PATH exposure or execution.