Documentation
¶
Overview ¶
Package kasnode runs kiro-cli's agent server on its own bundled Node.js with the high throughput flags. kiro-cli starts that node from KIRO_KAS_NODE_PATH when it is set, so marotte points the variable at its own binary, which re-executes the real node with Flags ahead of kiro-cli's arguments (Exec).
Index ¶
Constants ¶
const ( // NodePathVar is read by kiro-cli (undocumented; it sits beside KIRO_KAS_SERVER_PATH in the binary) and names // the node it runs the agent server on. While it is set, kiro-cli does not extract its embedded node. NodePathVar = "KIRO_KAS_NODE_PATH" // LaunchVar carries the real node's path to the re-executed marotte binary; its presence selects Exec. LaunchVar = "MAROTTE_KAS_NODE" )
const ValidatedNodeVersion = "v22.23.4"
ValidatedNodeVersion is the Node.js Flags were measured on, the one kiro-cli 2.37.1 and 3.0.0 bundle. A kiro-cli bump that bundles another fails internal/kascap's TestBundledNodeIsValidated; re-run the tuning harness on the new Node before changing it.
Variables ¶
var Flags = []string{"--experimental-async-context-frame", "--max-semi-space-size=64"}
Flags go on node's argv, never in NODE_OPTIONS: NODE_OPTIONS reaches every program the agent runs, and Node 24 and later refuse --experimental-async-context-frame there. Validated on Node v22.23.4 only.
Functions ¶
func EmbeddedNodeHash ¶
EmbeddedNodeHash returns the sha256 of the node kiro-cli embeds: in 3.0.0 its 64 lowercase hex digits sit immediately before the first NodePathVar string. An absence is errNoNodeHash.
func EmbeddedNodePath ¶
EmbeddedNodePath is where kiro-cli extracts the node it runs the agent server on: its data dir is $XDG_DATA_HOME/kiro-cli, else $HOME/.local/share/kiro-cli. "" when neither is set. The node's sha256 is written beside it, in node.sha256.
func Exec ¶
Exec replaces the process with the node LaunchVar names, Flags, then args. It returns only on failure.
func FileSHA256 ¶
FileSHA256 returns the lowercase hex sha256 of the file at path.
Types ¶
This section is empty.