kasnode

package
v0.17.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

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

View Source
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"
)
View Source
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

View Source
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

func EmbeddedNodeHash(r io.Reader) (string, error)

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

func EmbeddedNodePath(dataHome, home string) string

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

func Exec(environ, args []string) error

Exec replaces the process with the node LaunchVar names, Flags, then args. It returns only on failure.

func FileSHA256

func FileSHA256(path string) (string, error)

FileSHA256 returns the lowercase hex sha256 of the file at path.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL