ιαηδαπα

platform

installer

Windows-first runtime for packaging and running the Iandara platform through a governed executable.

como usar

ver todas as 48 tarefas
  • task installer:install.verifyVerify the current local runtime install
  • task installer:ion.keygen.protectedGenerate an OS-protected (DPAPI) ION signing key for production release use
  • task installer:ion.smokeValidate signed ION v3 pack and verify flow
  • task installer:msix.bootstrap.smokeValidate first-launch MSIX bootstrap through the installed iandara.exe alias
  • task installer:msix.install.currentInstall the currently built signed MSIX package for the current Windows user
  • task installer:msix.install.smokeValidate the signed MSIX install/status/uninstall cycle
  • task installer:msix.smokeValidate MSIX/AppContainer layout and ION plan generation
  • task installer:msix.uninstallUninstall the Iandara Runtime MSIX package from the current Windows user
  • task installer:packagePackage the Iandara runtime payload as ION
  • task installer:package.msixPackage the signed release as an MSIX layout and optional .msix
  • task installer:package.msix.signedBuild, sign and verify the MSIX package with a local trusted development certificate
  • task installer:package.portableBuild a single-file portable executable with the signed release embedded
  • task installer:package.portable.smokeValidate the portable executable build/extract/verify round-trip
  • task installer:package.releasePackage the runnable Windows release layout
  • task installer:package.release.signedPackage signed release layout with signed platform payload and toolchain bundles
  • task installer:package.signing.smokeValidate signed release payload packaging and verification
  • task installer:package.verifyVerify the runnable Windows release layout checksums
  • task installer:package.verify.signedVerify signed release layout and require every ION artifact signature
  • task installer:policy.smokeValidate policy loading and task gateway integration
  • task installer:proxy.smokeValidate local HTTP proxy log/block modes
  • task installer:releaseBuild and package the Iandara runtime release artifacts
  • task installer:release.prdBuild a production-signed Windows installer release
  • task installer:release.rcBuild and validate a Windows release-candidate installer
  • task installer:release.signed.fullBuild complete signed Windows release with official toolchain bundles
  • task installer:runtime.smokeValidate runtime path resolution for local and MSIX package-aware modes
  • task installer:smokeRun installer smoke checks
  • task installer:test.audit.unitRun focused audit unit tests
  • task installer:test.ionstore.unitRun focused ION store unit tests
  • task installer:test.runtime-sandbox.unitRun focused runtime sandbox integration unit tests
  • task installer:test.sandboxRun sandbox provider smoke checks
  • task installer:test.sandbox.unitRun focused sandbox unit tests
  • task installer:test.update.unitRun focused update unit tests
  • task installer:toolchain.bootstrapInstall bootstrap runtime toolchains from locked ION bundles
  • task installer:toolchain.installInstall runtime toolchains from locked ION bundles
  • task installer:toolchain.listList runtime-managed and PATH toolchains
  • task installer:toolchain.packagePackage a local toolchain directory as ION
  • task installer:toolchain.vendorDownload, verify, install and package official Windows toolchains as ION
  • task installer:toolchain.vendor.signedDownload, verify and package official Windows toolchains as signed ION
  • task installer:uninstallRemove the local/portable Iandara runtime install
  • task installer:update.applyApply a signed runtime update with backup and audit
  • task installer:update.checkVerify and plan a signed runtime update
  • task installer:wfp.smokeValidate Windows Firewall/WFP rule planning as ION

documentação

Windows-first runtime for packaging and running the Iandara platform through a governed executable.

The target product is iandara.exe: a signed launcher that prepares the local runtime, exposes only the Iandara command surface, executes work through sandbox providers, and persists every boundary crossing as .ion.

How It Works: Installer → Exe → Terminal → User

This is the conceptual journey, independent of any particular version or artifact. Every other section of this document is reference detail for one of these four stages.

1. Installer

There is no separate installer wizard. A signed release (binaries, manifests, policies, the platform payload, toolchain bundles) is carried by one of two shapes:

  • MSIX package (Iandara.Runtime) — a Windows package identity with an App Execution Alias, installed through Add-AppxPackage (see MSIX And AppContainer).
  • Portable single-file executable — the same release layout zipped and appended to iandara.exe itself, so one .exe is the whole distributable with nothing to unpack first (see Portable Single-File Executable).

Either way, "installing" is not a distinct program — it is the first thing iandara.exe does when it runs.

2. Exe

Whichever shape delivered it, running iandara.exe with no arguments (or, under MSIX, launching the alias) walks the same launcher sequence:

  1. Resolve the runtime root — MSIX package-local storage, or %LOCALAPPDATA%\Iandara for a portable/dev install (see Runtime Install).
  2. Find a release directory next to the exe, or extract one embedded in the exe's own footer if none exists.
  3. Verify the release: re-hash every artifact against release.manifest.json, and require valid ION signatures when the active policy demands it.
  4. Install/promote the platform payload into a new platform/versions/<release> and flip platform/current.json to point at it.
  5. Provision the toolchains marked for bootstrap (Task, Node, Git today; Go is provisioned later, on demand).
  6. Record what happened in state/install.json.

This sequence is idempotent: every launch re-verifies and only re-promotes when the release it finds is actually new. Once it completes, the exe hands off to the console.

3. Terminal

The console the exe opens is not a shell — it is a closed vocabulary:

task ...
doctor
backup
restore
update
help
exit

Nothing outside that list ever executes. There is no way to type npm, node, cmd, powershell or go directly and have it run — the only escape hatch is task, and if a workflow needs one of those tools, it has to already exist as a task in the repository's Taskfile. This is what "governed executable" means in practice: the terminal enforces the same task-first rule the rest of this repository follows, at the process level, for whoever is sitting at the machine.

4. User

From here, the user's entire experience is typing task <name> and watching it run (see Task Execution Flow):

  1. The task gateway parses the line and rejects anything that does not start with task.
  2. The command is wrapped into a TaskRequestIon, with default mounts attached — the workspace writable, the runtime read-only.
  3. A sandbox provider executes it, chosen by the active policy: in-process, Windows Sandbox, or a future container backend.
  4. Output streams back to the user as it happens; the request, result and a full audit trail are persisted as .ion once the task finishes.

The user never gets a general-purpose shell on the machine the runtime provisioned — only the task surface the repository already defines, running inside whatever sandbox and network policy is active.

Quick Start

The shortest path from a clean checkout to a running governed console. Every step is a task; see the linked sections for what each one actually does under the hood.

# 1. build the two runtime binaries (.platform/installer/dist/iandara.exe, iandara-agent.exe)
task installer:build

# 2. sanity-check the build: bootstrap-mode doctor + `task --list` through the gateway
task installer:smoke

# 3. build a real signed release (binaries, manifests, signed payload/toolchains, signed manifest)
task installer:toolchain.vendor.signed -- task node git go
task installer:package.release.signed

# 4. verify it the same way `install`/`update` would, before trusting it
task installer:package.verify.signed

# 5. install it into the local runtime root (%LOCALAPPDATA%\Iandara by default)
task installer:install.release

# 6. confirm the install: doctor --no-install + `run -- task --list` against it
task installer:install.smoke

# 7. open the controlled console
.platform/installer/dist/iandara.exe console --policy dev

At the console, the only accepted input is task ..., doctor, backup, restore, update, help, exit — see Terminal.

Common follow-ups once a runtime is installed:

task installer:update.check              # see what a newer release in dist/release-signed would do
task installer:update.apply              # apply it, with automatic pre-update backup + rollback on failure
.platform/installer/dist/iandara.exe uninstall --dry-run   # preview an uninstall before running it for real

For iteration during development, task installer:build + task installer:smoke is the fast inner loop; only rebuild a full signed release (step 3 onward) when testing packaging, install, update or MSIX behavior specifically. task installer:fix is the only sanctioned way to let go mod tidy/gofmt rewrite tracked files — validation tasks fail on a dirty tree instead of silently reformatting it for you.

Runtime Contract

The installer keeps the repository rule intact: operational work goes through task.

Normal use:

task installer:build
task installer:fix
task installer:smoke
task installer:package
task installer:package.release
task installer:package.verify
task installer:install.release
task installer:install.current-release
task installer:install.verify
task installer:install.smoke
task installer:update.check
task installer:update.apply
task installer:ion.smoke
task installer:ion.keygen.protected
task installer:package.signing.smoke
task installer:policy.smoke
task installer:proxy.smoke
task installer:wfp.smoke
task installer:msix.smoke
task installer:runtime.smoke
task installer:runtime.smoke
task installer:package.msix
task installer:package.msix.signed
task installer:package.portable
task installer:package.portable.smoke
task installer:msix.install.smoke
task installer:msix.bootstrap.smoke
task installer:toolchain.list
task installer:toolchain.bootstrap
task installer:toolchain.install -- task node
task installer:toolchain.vendor.signed -- task node git go
task installer:test.sandbox.unit
task installer:test.runtime-sandbox.unit
task installer:test.audit.unit
task installer:test.ionstore.unit

After task installer:build, the local development binaries are emitted to .platform/installer/dist/:

  • iandara.exe: launcher, doctor, console, task gateway, backup, packaging and audit entrypoint.
  • iandara-agent.exe: sandbox-side executor for ION task requests.

The controlled console accepts only:

task ...
doctor
backup
restore
update
help
exit

Raw shell commands such as npm, node, cmd, powershell or go are rejected by the task gateway. If a workflow needs one of those tools, it must be expressed behind a task.

Official Tasks

task installer:build
task installer:fix
task installer:package
task installer:smoke
task installer:package.release
task installer:package.verify
task installer:package.release.signed
task installer:package.verify.signed
task installer:release.signed.full
task installer:release.rc
task installer:release.prd -- --thumbprint <thumbprint> --store My --store-location machine --timestamp-url <url>
task installer:install.release
task installer:install.current-release
task installer:install.verify
task installer:install.smoke
task installer:update.check
task installer:update.apply
task installer:ion.smoke
task installer:ion.keygen.protected
task installer:package.signing.smoke
task installer:policy.smoke
task installer:proxy.smoke
task installer:wfp.smoke
task installer:msix.smoke
task installer:runtime.smoke
task installer:runtime.smoke
task installer:package.msix
task installer:package.msix.signed
task installer:package.portable
task installer:package.portable.smoke
task installer:msix.install.current
task installer:msix.install.smoke
task installer:msix.bootstrap.smoke
task installer:msix.uninstall
task installer:toolchain.list
task installer:toolchain.bootstrap
task installer:toolchain.install -- task node
task installer:toolchain.package -- task C:/tools/task --out .platform/installer/dist/toolchains
task installer:test.sandbox.unit
task installer:test.runtime-sandbox.unit
task installer:test.audit.unit
task installer:test.ionstore.unit
task installer:test.sandbox
task installer:release

What they do:

  • installer:build: validates module/formatting state without rewriting tracked files, runs Go tests, and builds both runtime binaries.
  • installer:fix: applies the explicit mutating maintenance path for go mod tidy and gofmt.
  • installer:package: builds and emits a platform.<timestamp>.ion payload.
  • installer:package.release: builds a runnable release layout with binaries, manifests, policies, platform payload and available toolchain bundles.
  • installer:package.verify: validates release.manifest.json against the release layout artifacts.
  • installer:package.release.signed: builds a signed release with signed platform payload, signed toolchain bundles and release public key.
  • installer:package.verify.signed: validates checksums and requires every .ion artifact to verify through the release locked-down policy.
  • installer:release.signed.full: runs the complete signed Windows release flow end-to-end, including official toolchain vendor.
  • installer:release.rc: runs the Windows release-candidate gate with dev signing, signed release, portable build, MSIX build/sign and package-aware runtime smoke.
  • installer:release.prd: builds the production release using IANDARA_RELEASE_SIGN_KEY for ION signing and explicit MSIX signing args such as --thumbprint ... or --cert-path ....
  • installer:install.release: verifies the signed release, extracts the platform payload into staging, promotes a local platform version and installs signed toolchain bundles.
  • installer:install.current-release: installs the existing dist/release-signed layout without rebuilding/vendor steps.
  • installer:install.verify: validates the current installed runtime with doctor --no-install and run -- task --list without rebuilding the release.
  • installer:install.smoke: runs the signed release install and validates doctor --no-install plus run -- task --list.
  • installer:update.check: verifies the signed release and prints current/target update plan.
  • installer:update.apply: verifies the signed release, creates ION backups, installs/promotes the release and writes audit/update-*.ion.
  • installer:ion.smoke: creates and verifies a signed ION v3 package (ML-DSA-87 + Ed25519).
  • installer:ion.keygen.protected: generates a dual ML-DSA-87 + Ed25519 keypair with the private key encrypted at rest through Windows DPAPI, for use as a production release signing key.
  • installer:package.signing.smoke: builds a temporary release with signed platform payload and verifies it with require-signed-ion.
  • installer:policy.smoke: validates policy loading through the task gateway.
  • installer:proxy.smoke: validates local proxy log and block modes and returns recorded network events.
  • installer:wfp.smoke: validates Windows Firewall/WFP rule planning, packs the plan as ION and does not require admin.
  • installer:msix.smoke: validates MSIX layout generation, AppxManifest.xml, assets and AppContainer plan ION without requiring Windows SDK.
  • installer:runtime.smoke: validates local runtime path resolution, MSIX package-aware path resolution and launcher dry-run.
  • installer:runtime.smoke also validates package-aware runtime path resolution using the family computed from the MSIX identity.
  • installer:package.msix: creates the MSIX/AppContainer layout for the signed release and generates .msix when -- --makeappx is passed and Windows SDK is present.
  • installer:package.msix.signed: generates .msix, signs it with a local trusted development certificate and validates the signature with signtool.
  • installer:package.portable: appends the current signed release layout as a zip after iandara.exe, producing a single-file portable executable that extracts and installs its own embedded release.
  • installer:package.portable.smoke: builds a temporary release, builds a portable executable from it, extracts the embedded footer and verifies the round-tripped release against release.manifest.json.
  • installer:msix.install.current: installs the current signed .msix for the current Windows user and returns package status.
  • installer:msix.install.smoke: runs signed MSIX install/status/launch-smoke/uninstall end-to-end, including the installed App Execution Alias.
  • installer:msix.bootstrap.smoke: installs the signed MSIX, resets package-local Iandara state, runs installed iandara.exe launcher --install-only through the App Execution Alias, validates package status, and uninstalls.
  • installer:msix.uninstall: removes Iandara.Runtime for the current Windows user.
  • installer:uninstall: removes the local/portable runtime install (platform/, toolchains/, .ionstore/, audit/, sandboxes/, temp/, state/); preserves backups/ and the runtime root by default, pass -- --purge-backups to remove everything, -- --dry-run to preview.
  • installer:smoke: runs bootstrap-mode doctor and validates run -- task --list through the gateway.
  • installer:toolchain.list: lists declared toolchains and shows whether each one is runtime-managed or found on PATH.
  • installer:toolchain.bootstrap: installs only toolchains marked for first-launch bootstrap in the lockfile.
  • installer:toolchain.install: installs selected or required toolchains from locked .ion bundles or remote URLs with SHA-256.
  • installer:toolchain.package: packages an existing local toolchain directory into toolchain.<name>.<version>.ion.
  • installer:toolchain.vendor: downloads official pinned Windows toolchains, verifies upstream SHA-256, installs them locally and emits toolchain.*.ion.
  • installer:toolchain.vendor.signed: same as vendor, but signs the resulting ION bundles with a local development signing key.
  • installer:test.sandbox.unit: runs only the focused Go tests for internal/sandbox.
  • installer:test.runtime-sandbox.unit: validates formatting and tests only the Go packages touched by runtime sandbox/policy integration.
  • installer:test.audit.unit: validates formatting and tests only the audit/taskgate packages for ION event-stream persistence.
  • installer:test.ionstore.unit: validates formatting and tests only local .ionstore CAS plus audit/update CAS integration.
  • installer:test.sandbox: validates command rejection and the executable agent_process provider.
  • installer:release: builds, packages, verifies the release layout and runs a final doctor check.

Local Commands

The direct binary interface exists for smoke testing and future installer UX. Prefer the tasks above when operating from the monorepo.

.platform/installer/dist/iandara.exe version
.platform/installer/dist/iandara.exe version --json
.platform/installer/dist/iandara.exe doctor --bootstrap --no-install
.platform/installer/dist/iandara.exe doctor --no-install
.platform/installer/dist/iandara.exe runtime status
.platform/installer/dist/iandara.exe launcher --smoke
.platform/installer/dist/iandara.exe launcher --install-only
.platform/installer/dist/iandara.exe console
.platform/installer/dist/iandara.exe run --policy dev -- task --list
.platform/installer/dist/iandara.exe audit show <task-id>
.platform/installer/dist/iandara.exe audit extract <task-id> --out .platform/installer/dist/audit-extract
.platform/installer/dist/iandara.exe audit show-sync <sync-id>
.platform/installer/dist/iandara.exe audit extract-sync <sync-id> --out .platform/installer/dist/sync-audit-extract
.platform/installer/dist/iandara.exe backup create . workspace
.platform/installer/dist/iandara.exe backup list
.platform/installer/dist/iandara.exe backup restore <id>
.platform/installer/dist/iandara.exe toolchain list
.platform/installer/dist/iandara.exe toolchain bootstrap
.platform/installer/dist/iandara.exe toolchain install task node
.platform/installer/dist/iandara.exe toolchain install go
.platform/installer/dist/iandara.exe toolchain package task C:/tools/task --out .platform/installer/dist/toolchains
.platform/installer/dist/iandara.exe toolchain vendor --out .platform/installer/dist/toolchains --key .platform/installer/dist/dev-toolchain-signing-key.json task node git go
.platform/installer/dist/iandara.exe ion keygen --out .platform/installer/dist/signing-key.json
.platform/installer/dist/iandara.exe ion keygen --out .platform/installer/dist/release-signing-key.json --protect dpapi
.platform/installer/dist/iandara.exe ion protect .platform/installer/dist/signing-key.json --out .platform/installer/dist/signing-key.protected.json
.platform/installer/dist/iandara.exe ion unprotect .platform/installer/dist/signing-key.protected.json --out .platform/installer/dist/signing-key.plain.json
.platform/installer/dist/iandara.exe ion public-key .platform/installer/dist/signing-key.json --out .platform/installer/dist/signing-public.key
.platform/installer/dist/iandara.exe ion pack .platform .platform/installer/dist/platform.signed.ion --kind platform.payload --key .platform/installer/dist/signing-key.json
.platform/installer/dist/iandara.exe ion pack .platform .platform/installer/dist/platform.secret.ion --kind platform.payload --key .platform/installer/dist/signing-key.json --encrypt-key <secret>
.platform/installer/dist/iandara.exe ion verify .platform/installer/dist/platform.signed.ion --key .platform/installer/dist/signing-key.json
.platform/installer/dist/iandara.exe ion verify .platform/installer/dist/platform.secret.ion --key .platform/installer/dist/signing-key.json --decrypt-key <secret>
.platform/installer/dist/iandara.exe ionstore add .platform/installer/dist/platform.signed.ion --kind platform.payload
.platform/installer/dist/iandara.exe ionstore add .platform/installer/dist/platform.signed.ion --kind platform.payload --source release-local --label channel=dev
.platform/installer/dist/iandara.exe ionstore list
.platform/installer/dist/iandara.exe ionstore list --kind platform.payload
.platform/installer/dist/iandara.exe ionstore list --source release-local --label channel=dev
.platform/installer/dist/iandara.exe ionstore export <sha256> --out .platform/installer/dist/exported.ion
.platform/installer/dist/iandara.exe ionstore export --kind platform.payload --out-dir .platform/installer/dist/exported-ionstore
.platform/installer/dist/iandara.exe ionstore verify --kind platform.payload
.platform/installer/dist/iandara.exe ionstore sync plan --policy dev --remote gcs://iandara-runtime/releases/dev --direction push --kind platform.payload --out .platform/installer/dist/ionstore-sync-plan.ion
.platform/installer/dist/iandara.exe ionstore sync apply --policy dev --remote file:///C:/iandara-remote-cas --direction push --kind platform.payload --result-out .platform/installer/dist/ionstore-sync-result.ion
.platform/installer/dist/iandara.exe ionstore sync apply --policy dev --remote file:///C:/iandara-remote-cas --direction pull --kind platform.payload
.platform/installer/dist/iandara.exe ionstore sync apply --policy dev --remote gcs://iandara-runtime/releases/dev --direction push --kind platform.payload --result-out .platform/installer/dist/ionstore-sync-result.ion
.platform/installer/dist/iandara.exe ionstore sync apply --policy dev --plan .platform/installer/dist/ionstore-sync-plan.ion --result-out .platform/installer/dist/ionstore-sync-result.ion
.platform/installer/dist/iandara.exe package --release --sign-key .platform/installer/dist/signing-key.json --out .platform/installer/dist/release-signed
.platform/installer/dist/iandara.exe package verify .platform/installer/dist/release-signed --require-signed-ion --key .platform/installer/dist/signing-key.json
.platform/installer/dist/iandara.exe install --release-dir .platform/installer/dist/release-signed --policy .platform/installer/dist/release-signed/policies/locked-down.policy.yaml
.platform/installer/dist/iandara.exe update check --release-dir .platform/installer/dist/release-signed --policy .platform/installer/dist/release-signed/policies/locked-down.policy.yaml
.platform/installer/dist/iandara.exe update apply --release-dir .platform/installer/dist/release-signed --policy .platform/installer/dist/release-signed/policies/locked-down.policy.yaml
.platform/installer/dist/iandara.exe proxy smoke
.platform/installer/dist/iandara.exe wfp smoke
.platform/installer/dist/iandara.exe wfp plan --out .platform/installer/dist/wfp-plan.ion
.platform/installer/dist/iandara.exe wfp status
.platform/installer/dist/iandara.exe wfp apply --mode block C:/path/to/tool.exe
.platform/installer/dist/iandara.exe wfp remove --mode block C:/path/to/tool.exe
.platform/installer/dist/iandara.exe wfp apply --no-elevate --mode block C:/path/to/tool.exe
.platform/installer/dist/iandara.exe msix smoke
.platform/installer/dist/iandara.exe msix package --release-dir .platform/installer/dist/release-signed --out .platform/installer/dist/release-signed/msix
.platform/installer/dist/iandara.exe msix package --release-dir .platform/installer/dist/release-signed --out .platform/installer/dist/release-signed/msix --makeappx
.platform/installer/dist/iandara.exe msix verify .platform/installer/dist/release-signed/msix
.platform/installer/dist/iandara.exe msix sign .platform/installer/dist/release-signed/msix/Iandara.Runtime_0.1.0.0_x64.msix --publisher CN=Iandara --trust-dev-cert
.platform/installer/dist/iandara.exe msix sign .platform/installer/dist/release-signed/msix/Iandara.Runtime_0.1.0.0_x64.msix --thumbprint <thumbprint> --store My --store-location machine --timestamp-url <url>
.platform/installer/dist/iandara.exe msix sign .platform/installer/dist/release-signed/msix/Iandara.Runtime_0.1.0.0_x64.msix --cert-path C:/secure/iandara.pfx --cert-password-env MSIX_CERT_PASSWORD --timestamp-url <url>
.platform/installer/dist/iandara.exe msix verify-signature .platform/installer/dist/release-signed/msix/Iandara.Runtime_0.1.0.0_x64.msix
.platform/installer/dist/iandara.exe msix install .platform/installer/dist/release-signed/msix/Iandara.Runtime_0.1.0.0_x64.msix
.platform/installer/dist/iandara.exe msix status Iandara.Runtime
.platform/installer/dist/iandara.exe msix launch-smoke Iandara.Runtime
.platform/installer/dist/iandara.exe msix bootstrap-smoke Iandara.Runtime
.platform/installer/dist/iandara.exe msix runtime-smoke Iandara.Runtime --publisher CN=Iandara
.platform/installer/dist/iandara.exe msix reset-state Iandara.Runtime
.platform/installer/dist/iandara.exe msix uninstall Iandara.Runtime
.platform/installer/dist/iandara.exe sandbox prepare-windows -- task --version
.platform/installer/dist/iandara.exe sandbox collect-windows <bundle-dir|result.ion>
.platform/installer/dist/iandara.exe sandbox run-windows --timeout 10m -- task --version
.platform/installer/dist/iandara.exe package --out .platform/installer/dist
.platform/installer/dist/iandara.exe package --release --include-toolchains --out .platform/installer/dist/release
.platform/installer/dist/iandara.exe package verify .platform/installer/dist/release
.platform/installer/dist/iandara.exe package portable --release-dir .platform/installer/dist/release-signed --out .platform/installer/dist/iandara-portable.exe
.platform/installer/dist/iandara.exe package portable --release-dir .platform/installer/dist/release-signed --base-exe .platform/installer/dist/iandara.exe --out .platform/installer/dist/iandara-portable.exe
.platform/installer/dist/iandara.exe package portable-extract .platform/installer/dist/iandara-portable.exe --out .platform/installer/dist/embedded-release-extract
.platform/installer/dist/iandara.exe package portable-smoke

Architecture

.platform/installer/
  cmd/
    iandara/          launcher CLI
    iandara-agent/    sandbox-side executor
  internal/
    audit/            task request/result audit as ION
    backup/           versioned backup and restore as ION
    bootstrap/        doctor and runtime readiness checks
    buildinfo/        build identity (version/commit/date/dirty) via -ldflags
    console/          controlled terminal loop
    ion/              ION v3 packages (ignorante, vault, ionizer)
    msix/             MSIX layout/package generation, signing, install and launch smoke
    payload/          platform payload packaging
    policy/           YAML policy loading, with default/dev/locked-down embedded as a fail-closed fallback
    provenance/       per-binary build settings read back via debug/buildinfo
    runtime/          local runtime path resolution
    sandbox/          sandbox provider abstraction
    sbom/             CycloneDX SBOM generated from go.mod/go.sum
    taskgate/         task-only parser, executor and ION request/result IO
    testbinary/       (test-only) real compiled fixture binaries and go.mod for tests exercising BuildRelease
    toolchain/        lockfile-driven toolchain detection, packaging and provisioning
    uninstall/        removes a local/portable runtime install, preserving backups by default
    wfp/              Windows Firewall/WFP rule planning, status and apply/remove
  manifests/          installer and payload locks
  policies/           default/dev/locked-down policies
  packaging/          release packaging config

Release Layout

The release packager creates a runnable directory instead of assuming a global environment:

task installer:package.release
task installer:package.verify
task installer:package.signing.smoke

Output goes to .platform/installer/dist/release/ by default for the task:

release/
  iandara.exe
  iandara-agent.exe
  release.manifest.json
  release.provenance.json
  sbom.cyclonedx.json
  manifests/
  policies/
  packaging/
  payloads/platform.<timestamp>.ion
  keys/ion-release-public.key
  toolchains/toolchain.<name>.<version>.ion

release.manifest.json records artifact kind, relative path, size and SHA-256. Toolchain bundles are copied only when they exist in dist/toolchains, .platform/installer/toolchains, or IANDARA_TOOLCHAIN_SOURCE_DIR. When --sign-key is used, the manifest itself is also signed — see Trust Anchoring, Anti-Downgrade And Rollback.

Every build wipes OutDir before writing into it, so repeated builds do not accumulate stale timestamped payloads, old MSIX layouts or leftover toolchain bundles from previous runs.

installer:package.verify re-hashes every artifact listed in the manifest and fails if any file is missing, resized or changed.

Signed release flow:

task installer:toolchain.vendor.signed -- task node git go
task installer:package.release.signed
task installer:package.verify.signed
task installer:release.signed.full
task installer:release.rc
task installer:release.prd -- --thumbprint <thumbprint> --store My --store-location machine --timestamp-url <url>
task installer:install.release
task installer:install.verify
task installer:install.smoke

When --sign-key is present, the platform payload inside payloads/platform.*.ion is signed, and release.manifest.json itself is signed into a detached release.manifest.sig right after it is written (see Trust Anchoring, Anti-Downgrade And Rollback). Signed releases also include keys/ion-release-public.key; policies/locked-down.policy.yaml points to that key, requires a signed manifest and makes verification fail closed for unsigned or untrusted .ion artifacts.

Build Provenance And SBOM

Before a release existed, there was no way to look at a shipped iandara.exe and answer "what build is this, and what went into it" — no version command, no embedded commit, and no record of dependencies. Every release now carries that as two more artifacts, listed and hashed in release.manifest.json and covered by the same manifest signature as the binaries themselves — nothing new to separately sign or trust.

.platform/installer/dist/iandara.exe version
.platform/installer/dist/iandara.exe version --json
.platform/installer/dist/iandara.exe --version

task installer:build bakes version/commit/date/dirty into both binaries through -ldflags -X internal/buildinfo..., sourced from manifests/installer.manifest.yaml's version: field and git rev-parse/git status at build time (see the build task's vars: in .platform/tasks/integration/installer.yaml), plus -trimpath for reproducible paths in the binary. internal/msix package generation derives the MSIX 4-part version (Major.Minor.Build.Revision) from the same manifest version instead of a second, independently hardcoded constant, so the two cannot drift apart the way they used to.

release.provenance.json is generated by reading the build information Go itself embeds into each compiled binary back out of the file with debug/buildinfo.ReadFile — not by trusting what the packaging process believes it built. For each binary it records the Go toolchain version, module path, and build settings including -trimpath, GOOS/GOARCH and, when the binary was built inside a git checkout, vcs.revision/vcs.time/vcs.modified as Go's own toolchain observed them (a second, independent confirmation next to the -ldflags-injected commit above).

sbom.cyclonedx.json is a CycloneDX 1.5 bill of materials generated directly from the installer module's own go.mod/go.sum — every required module (direct and indirect), its version, a pkg:golang/... purl, and the go.sum content hash as a gomod:h1 property (Go's dirhash format is not one of CycloneDX's fixed hash algorithms, so it is carried as a property rather than forced into hashes). No external SBOM tool and no network call are involved; internal/sbom parses the two files directly.

MSIX And AppContainer

The runtime can wrap the signed release in a Windows package layout:

task installer:package.msix
task installer:package.msix -- --makeappx

installer:package.msix creates:

release-signed/msix/
  layout/
    AppxManifest.xml
    Assets/
    iandara.exe
    iandara-agent.exe
    payloads/
    toolchains/
    policies/
  msix-plan.ion
  Iandara.Runtime_0.1.0.0_x64.msix  # only when makeappx.exe is available and --makeappx is used

The manifest uses package identity Iandara.Runtime, package family Iandara.Runtime_e12jetg3aprwt, Windows.FullTrustApplication, runFullTrust, Windows 11 minimum target 10.0.22000.0, generated PNG assets and an App Execution Alias for iandara.exe. msix-plan.ion records the package identity, entrypoint, agent, allowed console commands and the package-state root:

%LOCALAPPDATA%\Packages\Iandara.Runtime_e12jetg3aprwt\LocalCache\Local\Iandara

The smoke path does not require Windows SDK. The .msix file itself is generated through makeappx.exe when the Windows SDK is installed. Signing the .msix with a production certificate is the next release-hardening layer; ION payload/toolchain signature verification already remains enforced inside the package.

Development signing:

task installer:package.msix.signed

This creates or reuses CN=Iandara under Cert:\CurrentUser\My, imports its public certificate into user and machine trust stores when needed for AppX deployment, signs the .msix with signtool.exe, and verifies the signature. Production release should replace this with an offline-held code-signing certificate, but the local artifact is installable/testable without manual certificate steps.

Production signing:

IANDARA_RELEASE_SIGN_KEY=C:/secure/ion-release-signing-key.json task installer:release.prd -- --thumbprint <thumbprint> --store My --store-location machine --timestamp-url <url>
IANDARA_RELEASE_SIGN_KEY=C:/secure/ion-release-signing-key.json MSIX_CERT_PASSWORD=<secret> task installer:release.prd -- --cert-path C:/secure/iandara.pfx --cert-password-env MSIX_CERT_PASSWORD --timestamp-url <url>

release:prod uses the external ION signing key only to sign the release payloads and toolchain bundles; the release layout embeds only keys/ion-release-public.key. The MSIX signature can use a certificate thumbprint from a Windows cert store or a PFX/cert path supplied at invocation time.

Install/status/uninstall cycle:

task installer:msix.install.smoke
task installer:msix.install.current
task installer:msix.bootstrap.smoke
task installer:msix.uninstall

msix install uses Add-AppxPackage for the current Windows user, msix status reads Get-AppxPackage, msix launch-smoke executes the installed %LOCALAPPDATA%\Microsoft\WindowsApps\iandara.exe alias and captures launcher --smoke, msix bootstrap-smoke captures launcher --install-only, msix reset-state removes only the package-local Iandara state root, and msix uninstall uses Remove-AppxPackage.

The install smoke removes any previous Iandara.Runtime, installs the newly signed package, confirms installed status, proves the installed launcher sees the packaged release under C:\Program Files\WindowsApps\..., then removes it again.

The bootstrap smoke additionally resets %LOCALAPPDATA%\Packages\Iandara.Runtime_e12jetg3aprwt\LocalCache\Local\Iandara, launches the installed alias, verifies the embedded signed release, installs the platform plus bootstrap toolchains, writes state\install.json, confirms status, and uninstalls the package.

When the installed iandara.exe is launched without arguments under MSIX package identity, it runs the launcher flow: resolve package-local runtime state, verify/install the embedded signed release in bootstrap mode, then open the controlled console. In development mode, no arguments still prints CLI help.

Portable Single-File Executable

For distribution outside MSIX, the release layout can be embedded directly inside iandara.exe so a single .exe carries its own release with no adjacent directory:

task installer:package.portable
task installer:package.portable.smoke

package portable copies a base iandara.exe (defaulting to <release-dir>/iandara.exe) and appends the release directory zipped, followed by an 8-byte little-endian zip length and the IANDARA_RELEASE_V1 magic footer. The footer is purely a container format, not a trust boundary: once extracted, the embedded release still goes through the same release.manifest.json checksum and signed-ION verification as any other release directory.

runLauncher uses this automatically: when no release directory is found next to the running executable, it reads the footer from its own binary (os.Executable()) and extracts the embedded zip into a content-addressed directory under %LOCALAPPDATA%\Iandara\embedded-release\<sha256 prefix>, deduplicated by the SHA-256 of the embedded zip so repeated launches skip re-extraction.

.platform/installer/dist/iandara.exe package portable --release-dir .platform/installer/dist/release-signed --out .platform/installer/dist/iandara-portable.exe
.platform/installer/dist/iandara.exe package portable-extract .platform/installer/dist/iandara-portable.exe --out .platform/installer/dist/embedded-release-extract

package portable-extract is a manual debugging counterpart to Build, mirroring the role msix verify/ion verify play for their own packagers. package portable-smoke builds a temporary unsigned release, builds a portable executable from it, extracts the embedded footer and verifies the round-tripped release against its manifest — it does not require a pre-built signed release and is safe to run standalone.

Runtime Install

iandara.exe install is the executable-side installer path. It does not trust the release directory just because it exists:

  1. Verifies release.manifest.json sizes and SHA-256 for every artifact.
  2. Requires signed .ion artifacts when the active policy has require_signed_ion: true.
  3. Resolves the trusted public key from policy, usually policies/locked-down.policy.yaml -> ../keys/ion-release-public.key.
  4. Extracts payloads/platform.*.ion into platform/staging/....
  5. Promotes the validated payload into platform/versions/<release-timestamp>.
  6. Writes platform/current.json as the active platform pointer.
  7. Installs each signed toolchains/toolchain.*.ion bundle into the resolved runtime root and creates shims in toolchains\bin.
  8. Writes state\install.json under the resolved runtime root with release, policy, platform and toolchain install metadata.

Runtime root resolution order:

  1. MSIX package identity: %LOCALAPPDATA%\Packages\<package-family>\LocalCache\Local\Iandara. Wins even if IANDARA_RUNTIME_HOME is also set — see Trust Anchoring, Anti-Downgrade And Rollback for why the override is ignored, not merely deprioritized, once a real package identity is present.
  2. IANDARA_RUNTIME_HOME override (only reached when there is no package identity).
  3. Local development fallback: %LOCALAPPDATA%\Iandara.
  4. Home fallback: %USERPROFILE%\.iandara.

The MSIX launcher uses bootstrap mode for first launch. Bootstrap mode installs the signed platform payload plus toolchains marked for bootstrap. In the current lock, Task, Node/npm/npx and Git are bootstrap toolchains; Go remains signed and embedded in the release, but is marked bootstrap: false because the full Go tree is large. Go is provisioned later by toolchain install go or automatically before a gated task that is known to require it.

Task-first flow:

task installer:release.signed.full
task installer:install.release
task installer:install.smoke

Uninstall

iandara.exe uninstall removes a local/portable install (the %LOCALAPPDATA%\Iandara tree, or its MSIX package-local equivalent). It is the counterpart to msix uninstall, which only removes the MSIX package itself — a portable or dev install has no package to remove, just this directory tree.

.platform/installer/dist/iandara.exe uninstall --dry-run
.platform/installer/dist/iandara.exe uninstall
.platform/installer/dist/iandara.exe uninstall --purge-backups

By default it removes platform/, toolchains/, .ionstore/, audit/, sandboxes/, temp/ and state/, but preserves backups/ and the runtime root itself — uninstalling is exactly the moment a "restore from backup" recovery path should still exist, so silently deleting the one thing that could undo a mistake is the wrong default. Pass --purge-backups to also remove backups/ and the now-empty root. --dry-run reports what would be removed without touching the filesystem.

Runtime Update

iandara.exe update is the guarded promotion path for an already installed runtime.

task installer:update.check
task installer:update.apply

update check verifies the signed release with the selected policy and reports current platform version, target version, direction (install/reinstall/upgrade/downgrade) and release verification result.

update apply runs the same verification, creates ION backups for existing platform, state and toolchains directories, installs/promotes the target release through the runtime installer, and writes:

audit/update-<timestamp>.ion

The update report contains backup paths, install report, selected policy, previous version and target version. --no-backup is available for controlled test paths; default behavior is backup-on-update.

Trust Anchoring, Anti-Downgrade And Rollback

release.manifest.json is itself signed. Without this, the manifest is a self-referential trust root: it lists the SHA-256 of every artifact in the release including the binaries, the policies and the embedded ION public key, all sitting in the same directory, so anyone able to write into a release directory could rewrite an artifact and its recorded hash together and still pass verification. package --release --sign-key key.json writes a detached release.manifest.sig next to the manifest (ML-DSA-87 and Ed25519 over the manifest bytes, plus the signing key's fingerprint: sha256:<hex of the dual public key>); package verify / install / update check|apply re-verify that signature before trusting anything the manifest lists, and report it as manifest_signed / manifest_key_fingerprint.

--trusted-key-fingerprint sha256:... (or trusted_release_key_fingerprint in a policy, and require_signed_manifest: true) pins which signing key is acceptable, from outside the release directory — policies/locked-down.policy.yaml requires a signed manifest by default. Once a runtime has been installed, that install's key fingerprint is recorded in state/install.json and becomes the implicit pin for every future update check/update apply against that runtime, so a later release has to be signed by the same key unless --allow-key-rotation is passed explicitly.

update check/update apply also refuse to install a release older than the currently installed platform version (version ids are UTC timestamps, compared lexically) unless --allow-downgrade is passed — a signed-but-stale release replayed by whoever can put a file where the runtime looks for its release directory is a valid downgrade attack on its own, with no key compromise required.

If update apply creates pre-update backups and then InstallRelease fails partway through (payload promoted but a toolchain bundle rejected, disk full mid-write, etc.), it automatically restores the directories it backed up before returning the error, so a failed update means "nothing changed" rather than "something changed, go look at the audit". The report's failed, rolled_back and rollback_errors fields record what happened; update rollback <update-id> restores a specific prior update's backups on demand for cases where the install step reported success but the operator wants to revert anyway.

.platform/installer/dist/iandara.exe update check --release-dir dist/release-signed --policy locked-down
.platform/installer/dist/iandara.exe update apply --release-dir dist/release-signed --policy locked-down
.platform/installer/dist/iandara.exe update apply --release-dir dist/release-signed --policy locked-down --allow-downgrade
.platform/installer/dist/iandara.exe update apply --release-dir dist/release-signed --policy locked-down --allow-key-rotation
.platform/installer/dist/iandara.exe update rollback update-20260822T185500Z

ION Boundary

ION is the runtime boundary format.

ION v3 is built only from the platform's specialists — the installer carries no cryptography of its own:

IONIZE | version 3 | flags | header length (u32, big-endian) | header (JSON) | body
  • Which files: the platform ignorante decides (the universal list, the .gitignore files on the path, and the installer's package policy: build outputs, logs, temporaries and ION in transit; hidden folders stay out unless --include-dot, except .platform).
  • Body: a tar in xz whose first entry is __ion_manifest.json (path, size, mode, timestamp and SHA-256 of each file). Plain, it is stored as is; encrypted, it travels in one IONWF1 frame of the platform ionizer (ML-KEM-1024, HKDF-SHA-512, AES-256-GCM per chunk with the AAD binding position, total and type, content type package), streamed in constant memory.
  • Recipients: the frame is sealed to a fresh package key; its seed goes in a platform-vault envelope for each recipient — an ML-KEM-1024 public key (Recipients, e.g. the machine) and/or a password (Argon2id of the vault suite, then HKDF-SHA-512 to the KEM seed). An encrypted package shows neither its content nor its file names.
  • Signature: dual, ML-DSA-87 and Ed25519 (ml-dsa-87+ed25519, both from the platform vault), over the header with the signature blanked — which binds the manifest digest and the recipients. Verification requires both.
  • Extraction: only what the signed manifest lists is written, with its size and SHA-256 checked while writing; an entry outside the manifest, a repeated or missing one, a tampered header, a frame cut short or another signer is a refusal, and a refused extraction leaves nothing behind (a new destination is removed).
  • The older IONIZE v1/v2 formats are not read: v3 replaced them directly.
  • Persists task requests, task results, audit records, backups and platform payloads as .ion.

Runtime placements on Windows:

%LOCALAPPDATA%\Iandara\
  .ionstore\
    objects\
      sha256\<aa>\<bb>\<sha256>.blob
    refs\
      <sha256>.json
  platform\
    current.json
    versions\
  toolchains\
    bin\
    cache\
  backups\
  audit\
  sandboxes\
    input\
    output\
  temp\
  state\
    install.json

Under MSIX, the same tree lives below:

%LOCALAPPDATA%\Packages\Iandara.Runtime_e12jetg3aprwt\LocalCache\Local\Iandara\

Examples of generated ION artifacts:

  • sandboxes/input/task-*.ion: TaskRequestIon.
  • sandboxes/output/task-*.ion: TaskResultIon; large stdout/stderr are stored as internal payload files and rehydrated by ReadResultIon.
  • audit/task-*.ion: replayable execution audit.
  • audit/task-*.sandbox-events.ion: sandbox lifecycle event stream.
  • audit/task-*.output.ion: large stdout/stderr payload stream.
  • audit/update-*.ion: signed-release update report with backups and install report.
  • audit/ionstore-sync-*.sync-result.ion: remote CAS sync result audit.
  • .ionstore/objects/sha256/...: deduplicated local CAS blobs for payload, toolchain, backup, audit/update artifacts and manually added ION files.
  • .ionstore/refs/*.json: CAS refs with kind, source, size, SHA-256 and storage timestamp.
  • backups/*.ion: restorable filesystem snapshot.
  • platform/versions/<timestamp>: promoted platform payload contents.
  • platform/current.json: active platform pointer.
  • toolchains/cache/toolchain.<name>.<version>.ion: reusable offline toolchain bundle.
  • toolchains/bin/*.cmd: controlled shims pointing to runtime-managed toolchains.

Signed ION commands:

task installer:ion.smoke
.platform/installer/dist/iandara.exe ion keygen --out .platform/installer/dist/signing-key.json
.platform/installer/dist/iandara.exe ion pack .platform .platform/installer/dist/platform.signed.ion --kind platform.payload --key .platform/installer/dist/signing-key.json
.platform/installer/dist/iandara.exe ion pack .platform .platform/installer/dist/platform.secret.ion --kind platform.payload --key .platform/installer/dist/signing-key.json --encrypt-key <secret>
.platform/installer/dist/iandara.exe ion sign .platform/installer/dist/platform.ion --key .platform/installer/dist/signing-key.json --out .platform/installer/dist/platform.signed.ion
.platform/installer/dist/iandara.exe ion verify .platform/installer/dist/platform.signed.ion --key .platform/installer/dist/signing-key.json
.platform/installer/dist/iandara.exe ion verify .platform/installer/dist/platform.secret.ion --key .platform/installer/dist/signing-key.json --decrypt-key <secret>
.platform/installer/dist/iandara.exe ion manifest .platform/installer/dist/platform.signed.ion --key .platform/installer/dist/signing-key.json

The signature covers the canonical manifest with all file hashes before the body is encrypted. Verification can use a key-pair JSON or a standalone base64 public key file. Unsigned packages remain readable for legacy compatibility, but --key, --public-key or --require-signature makes verification fail closed. Encrypted packages require --decrypt-key for manifest reads and extraction.

Machine Key

Every runtime has its own key, born from the platform vault the first time it is needed and kept in state/keys/machine.key.json (algorithm ml-kem-1024+ml-dsa-87+ed25519), with the private part protected by Windows DPAPI — bound to this account and this machine.

  • Artifacts that stay on the host — task audit records, sandbox event streams, offloaded outputs, ionstore sync results, update reports and backups — are signed by the machine (ML-DSA-87 + Ed25519) and encrypted to it (ML-KEM-1024). They carry commands, environments and outputs, and only this machine reads them; reading requires the machine's own signature.
  • Backups add an optional password as a second recipient (--encrypt-key), the way to restore on another machine; on this machine a backup opens with the machine key alone.
  • Sandbox boundary: the agent never receives a secret. The host writes only the machine's public part next to the request (machine.public.json, passed as --machine); the request is signed by the machine and the agent refuses one that is not; the agent encrypts the result to the machine's ML-KEM public key, so only the host opens it (each result is a fresh encapsulation). sandbox collect-windows reads a late result with the same key.

Key Protection

Signing key JSON files ({algorithm: "ml-dsa-87+ed25519", public_key, private_key, created_at}: the public key is the ML-DSA-87 public key followed by the Ed25519 one, the private key the two seeds, both base64) are plaintext by default, matching the throwaway dev keys produced by ion keygen --reuse in the build tasks. For a production release signing key, the private key can instead be encrypted at rest through Windows DPAPI, scoped to the current Windows user account:

task installer:ion.keygen.protected
.platform/installer/dist/iandara.exe ion keygen --out release-signing-key.json --protect dpapi
.platform/installer/dist/iandara.exe ion protect existing-key.json --out existing-key.protected.json
.platform/installer/dist/iandara.exe ion unprotect existing-key.protected.json --out existing-key.plain.json

A protected key file adds "protection": "dpapi" and stores private_key as the base64 of the DPAPI-sealed blob instead of the raw key bytes. LoadPrivateKey (used by every --key/--sign-key flag across ion pack, ion sign, package --release --sign-key, toolchain package/vendor, ...) transparently unprotects it, so a DPAPI-protected key is a drop-in replacement for a plaintext one anywhere a signing key path is accepted — no code path needs to know which kind it received. LoadPublicKey never needs unprotecting since the public key is stored in plain text either way.

DPAPI protection ties the key to the current Windows user account and machine: it needs no passphrase for unattended task runs, but the protected file cannot be decrypted from a different account or machine. ion protect/ion unprotect --out let a key be converted between plaintext and protected form deliberately, e.g. to move a key or to inspect it. keyprotect.Available() reports whether OS-native protection exists on the current platform; today that is Windows-only, matching the Windows-first runtime.

ION Store CAS

The runtime has a local content-addressed ION store under the active runtime root:

%LOCALAPPDATA%\Iandara\.ionstore\
  objects\sha256\<aa>\<bb>\<sha256>.blob
  refs\<sha256>.json

Objects are stored by SHA-256 and deduplicated. Ref files keep the runtime metadata around each object: kind, source, size, hash, labels, storage timestamps and an entries history with every flow that referenced the same blob.

.platform/installer/dist/iandara.exe ionstore add .platform/installer/dist/platform.signed.ion --kind platform.payload --source release-local
.platform/installer/dist/iandara.exe ionstore add .platform/installer/dist/platform.signed.ion --kind platform.payload --source release-local --label channel=dev
.platform/installer/dist/iandara.exe ionstore list --kind platform.payload --source release-local --label channel=dev
.platform/installer/dist/iandara.exe ionstore export <sha256> --out .platform/installer/dist/exported.ion
.platform/installer/dist/iandara.exe ionstore export --kind platform.payload --source release-local --out-dir .platform/installer/dist/exported-ionstore
.platform/installer/dist/iandara.exe ionstore verify --kind platform.payload --source release-local
.platform/installer/dist/iandara.exe ionstore sync plan --policy dev --remote gcs://iandara-runtime/releases/dev --direction push --kind platform.payload --source release-local --out .platform/installer/dist/ionstore-sync-plan.ion
.platform/installer/dist/iandara.exe ionstore sync apply --policy dev --remote file:///C:/iandara-remote-cas --direction push --kind platform.payload --source release-local --result-out .platform/installer/dist/ionstore-sync-result.ion
.platform/installer/dist/iandara.exe ionstore sync apply --policy dev --remote file:///C:/iandara-remote-cas --direction pull --kind platform.payload --source release-local
.platform/installer/dist/iandara.exe ionstore sync apply --policy dev --plan .platform/installer/dist/ionstore-sync-plan.ion --result-out .platform/installer/dist/ionstore-sync-result.ion

Runtime ION artifacts enter the local CAS automatically:

  • payloads/platform.*.ion
  • toolchains/toolchain.*.ion
  • toolchains/cache/toolchain.*.ion
  • backups/*.ion
  • audit/task-*.ion
  • audit/task-*.sandbox-events.ion
  • audit/task-*.output.ion
  • audit/update-*.ion
  • audit/ionstore-sync-*.sync-result.ion

Remote CAS/GCS can build on the same ref shape later; the local store is already the canonical deduplication layer for runtime-generated ION artifacts.

Remote sync is contract-first:

  • ionstore sync plan emits a local ionstore.sync.plan ION with remote URI, provider, direction, filters, refs and planned object keys.
  • push plans enumerate local refs selected by kind, source and labels.
  • pull plans list the remote index for supported providers (file, gcs); unsupported providers stop at a deferred read_remote_index action instead.
  • No credentials are stored in the runtime and no remote network call is made by the plan command itself.
  • Policy controls access through allow_remote_ionstore; default and locked-down block it, dev allows remote CAS planning and apply.
  • ionstore sync apply executes the contract for file:// and gcs:// remotes, writing objects/sha256/..., refs/*.json and refs/index.json to the remote CAS.
  • The gcs:// adapter talks to the GCS JSON API directly over net/http, authenticating through Application Default Credentials (GOOGLE_APPLICATION_CREDENTIALS, gcloud auth application-default login, or the GCE/GKE metadata server) via golang.org/x/oauth2/google. No credentials are read from or stored in the runtime; apply fails closed with a clear error when no ADC is available.
  • ionstore sync apply --plan plan.ion reads an emitted sync plan ION and can verify/decrypt it with the standard ION flags before execution.
  • --result-out result.ion persists the sync result as ionstore.sync.result, keeping the remote CAS operation itself inside the ION boundary.
  • Providers outside file/gcs (e.g. a future s3://) remain plan-only until their adapter exists.

Toolchain Provisioning

Toolchains are declared in manifests/toolchains.lock.yaml. The runtime also embeds a default copy of that lockfile so the standalone executable can still reason about required tools when no external manifest is present.

Provisioning order:

  1. Reuse a runtime-managed install under %LOCALAPPDATA%\Iandara\toolchains\<name>\<version>.
  2. Consume a local toolchain.<name>.<version>.ion from the runtime cache, IANDARA_TOOLCHAIN_SOURCE_DIR, dist/toolchains, or an explicit ion: path in the lockfile.
  3. Download a remote url: only when the lockfile also provides a real 64-character SHA-256.
  4. Extract to staging, validate hashes through the ION manifest, promote into the runtime toolchain directory, and create shims under toolchains\bin.

npm is modeled as provided_by: node, so installing the Node bundle can expose node, npm, and npx without treating npm as a separate global dependency.

Official Windows 11 toolchains currently pinned in manifests/toolchains.lock.yaml:

  • Task 3.52.0: task_windows_amd64.zip, SHA-256 pinned.
  • Node 24.18.0: node-v24.18.0-win-x64.zip, SHA-256 pinned.
  • npm: bundled by the Node runtime package.
  • Git for Windows 2.52.0.windows.1: PortableGit-2.52.0-64-bit.7z.exe, SHA-256 pinned.
  • Go 1.26.0: go1.26.0.windows-amd64.zip, SHA-256 pinned.

Useful task-first commands:

task installer:toolchain.list
task installer:toolchain.bootstrap
task installer:toolchain.install -- task node
task installer:toolchain.install -- go
task installer:toolchain.package -- node C:/node-v24-win-x64 --out .platform/installer/dist/toolchains
task installer:toolchain.vendor.signed -- task node git go

Bootstrap provisioning installs only specs whose bootstrap field is true or omitted on a required direct toolchain. Specs with bootstrap: false, currently Go, are skipped during first launch and reported as deferred in doctor --bootstrap.

The task gateway prepends %LOCALAPPDATA%\Iandara\toolchains\bin to the controlled PATH before executing task .... Users still cannot run node, npm, cmd or powershell directly through the console; those tools are available only to tasks.

Before task execution, the launcher can provision task-specific deferred toolchains. Today the heuristic installs Go before task installer:* and tasks containing polyglot, so installer and polyglot workflows can run from a bootstrapped runtime without making the first MSIX launch extract Go.

Task Execution Flow

iandara.exe run -- task --list
  -> taskgate validates that command starts with task
  -> default mounts are attached: workspace writable, runtime read-only
  -> TaskRequestIon is written to sandboxes/input
  -> iandara-agent.exe reads the request ION
  -> workdir is rejected if it is outside allowed mounts
  -> sandbox provider executes task with controlled environment
  -> writable mounts are diffed for created/modified/deleted files
  -> iandara-agent.exe writes TaskResultIon to sandboxes/output
  -> audit record is packed as .ion

The agent flow uses the same envelope:

iandara-agent.exe exec --request <request.ion> --result <result.ion>

That interface is the handoff point for Windows Sandbox, AppContainer, Docker or WSL container execution.

TaskRequestIon contains the command, args, policy, env allowlist additions, workdir and mounts. The launcher currently attaches:

  • writable workspace mount: the current repo/workdir.
  • read-only runtime mount: %LOCALAPPDATA%\Iandara, including installed platform state and toolchains.

TaskResultIon contains exit code, stdout/stderr, provider, request/result ION paths, network mode and files_touched. File tracking is based on before/after snapshots of writable mounts and reports created, modified and deleted files while skipping heavy generated/cache directories.

Network policy is enforced in two layers today:

  • For Windows Sandbox, allow_network: false maps to <Networking>Disable</Networking> in the generated .wsb.
  • For process/agent execution, network_mode: log or network_mode: block starts a per-task local HTTP/CONNECT proxy, injects HTTP_PROXY, HTTPS_PROXY and ALL_PROXY, and records each cooperative request in TaskResultIon.network.events.
  • network_mode: block returns 403 from the proxy, adds offline npm flags and marks network.allowed=false.
  • When policy sets network_enforcement: proxy,wfp, the task gateway attempts temporary Windows Firewall outbound block rules for the task executable and discovered runtime-managed toolchain executables. If the process is not elevated, the task still records the failed host enforcement attempt in TaskResultIon.network.enforcement.
  • iandara.exe wfp plan|status|apply|remove exposes explicit host-level rule management. plan can emit an ION plan; apply/remove self-elevate through UAC when needed and only operate on deterministic IandaraRuntime-* rules. --no-elevate keeps the command fail-closed for CI/smoke paths.

This gives three operating levels: cooperative proxy logging/blocking, Windows Sandbox network disablement, and host-level Windows Firewall/WFP rules for non-cooperative processes when elevated.

Windows Sandbox bundle preparation:

.platform/installer/dist/iandara.exe sandbox prepare-windows -- task --version

This creates a bundle under %LOCALAPPDATA%\Iandara\sandboxes\windows_sandbox\<task-id>\:

  • input/<task-id>.ion
  • output/
  • bin/iandara-agent.exe
  • run-agent.cmd
  • iandara-<task-id>.wsb

Opening the generated .wsb maps the bundle into the sandbox at C:\IandaraSandbox, runs the agent from run-agent.cmd, writes the result .ion under output, and shuts the sandbox down after the command finishes.

When default mounts are present, Windows Sandbox also maps:

  • workspace -> C:\IandaraWorkspace as writable.
  • runtime -> C:\IandaraRuntime as read-only.

The request sent to the agent is rewritten to use those guest paths, and run-agent.cmd sets IANDARA_RUNTIME_HOME=C:\IandaraRuntime.

After the sandbox closes, collect the result:

.platform/installer/dist/iandara.exe sandbox collect-windows "%LOCALAPPDATA%\Iandara\sandboxes\windows_sandbox\<task-id>"

collect-windows can receive either the bundle directory or the exact output/<task-id>.ion result path.

Automatic Windows Sandbox run:

.platform/installer/dist/iandara.exe sandbox run-windows --timeout 10m -- task --version

run-windows prepares the same bundle, launches Windows Sandbox with the generated .wsb, waits until output/<task-id>.ion exists, reads the TaskResultIon, and prints the captured output. This command opens Windows Sandbox intentionally and depends on the Windows Sandbox feature being enabled on the host.

The normal locked-down policy path now uses the same launch-and-wait behavior:

.platform/installer/dist/iandara.exe run --policy locked-down -- task --version

If Windows Sandbox is unavailable, the task result fails closed with exit code 78 and still reports the prepared bundle path for inspection.

Windows Sandbox execution writes lifecycle events into TaskResultIon.sandbox_events:

  • prepared: request/result ION and .wsb bundle were created.
  • launched: Windows Sandbox was started.
  • result_detected: the result .ion was written by the agent.
  • timed_out: no result arrived before the policy timeout or context deadline.
  • unavailable: Windows Sandbox could not be found or started.

When a task result has sandbox lifecycle events, the audit recorder also writes a separate event stream ION next to the task audit:

audit/
  task-<id>.ion
  task-<id>.sandbox-events.ion

The main TaskResultIon stored in task-<id>.ion includes event_stream_path, so audit consumers can load the compact result first and follow the event stream only when needed.

Large task output follows the same pattern. When stdout or stderr exceeds 64 KiB, the audit recorder writes the full payload to:

audit/
  task-<id>.output.ion

The audited TaskResultIon keeps a 4 KiB preview in stdout/stderr and stores stdout_ref/stderr_ref with the output ION path, internal filename, byte count and SHA-256. Console streaming is unchanged; the offload is for persisted audit size and replay ergonomics.

The sandbox output boundary uses the same lightweight shape. sandboxes/output/task-*.ion stores large stdout/stderr as internal stdout.txt/stderr.txt files plus refs in task-result.json; ReadResultIon rehydrates them before returning the result to the console, audit recorder or caller.

Audit navigation commands:

.platform/installer/dist/iandara.exe audit show <task-id|task.ion>
.platform/installer/dist/iandara.exe audit extract <task-id|task.ion> --out <dir>
.platform/installer/dist/iandara.exe audit show-sync <sync-id|sync-result.ion>
.platform/installer/dist/iandara.exe audit extract-sync <sync-id|sync-result.ion> --out <dir>

audit show loads the main task audit and follows related sandbox-events and output streams. audit extract deionizes the main task audit plus any related event/output streams into separate directories for inspection.

ionstore sync apply always writes audit/<sync-id>.sync-result.ion and stores that audit artifact in local .ionstore. audit show-sync reads the sync result audit; audit extract-sync deionizes the result for inspection. --result-out on sync apply is an explicit extra copy, not a replacement for the runtime audit.

Sandbox Providers

Implemented now:

  • agent_process: executable local backend where iandara.exe invokes iandara-agent.exe through ION request/result files.
  • process_job: lower-level direct executor used by the agent, with task-only enforcement, controlled PATH, mount validation and file-diff audit.
  • windows_sandbox: generates a .wsb bundle, maps workspace/runtime, rewrites request paths for the guest, launches Windows Sandbox and waits for the result ION.
  • msix: package identity/AppContainer release layout with AppxManifest.xml, runFullTrust capability, App Execution Alias and msix-plan.ion.

Scaffolded for the next layer:

  • docker: detect-only provider; Docker Desktop is optional and not embedded.
  • wslc: detect-only provider for future WSL Containers usage.

The current runtime can prepare the Windows Sandbox handoff for manual review with sandbox prepare-windows, launch it directly with sandbox run-windows, or use it automatically through run --policy locked-down -- task .... Strong isolation is active when the generated .wsb runs the agent inside the sandbox.

Policy Runtime

Policies live under policies/*.policy.yaml and can be selected by name or path:

.platform/installer/dist/iandara.exe run --policy dev -- task --version
.platform/installer/dist/iandara.exe console --policy locked-down
.platform/installer/dist/iandara.exe package verify .platform/installer/dist/release-signed --policy locked-down --key .platform/installer/dist/signing-key.json

Policy controls now implemented:

  • sandbox_provider: agent_process, process_job, windows_sandbox, docker, or wslc.
  • sandbox_timeout: timeout for launch-and-wait sandbox providers such as windows_sandbox; defaults to 10m.
  • allowed_console_commands: whitelist for the controlled console.
  • allow_shell_fallback_for_task_cmd: blocks task.cmd shell-wrapper execution when false.
  • allow_network: exposed to task execution as IANDARA_ALLOW_NETWORK.
  • network_mode: allow, log, or block; log and block use the local proxy and persist network events into the task result.
  • network_enforcement: proxy or comma-separated providers such as proxy,wfp; WFP attempts host-level Windows Firewall rules in block mode.
  • auto_backup_before_mutation: creates an ION backup before task names matching mutable_task_prefixes.
  • require_signed_ion and trusted_ion_public_key: release verification can fail closed for unsigned/untrusted .ion artifacts.
  • require_signed_manifest and trusted_release_key_fingerprint: release.manifest.json itself must carry a valid detached signature, optionally pinned to one signing key fingerprint (sha256:<hex>) from outside the release directory. See Trust Anchoring, Anti-Downgrade And Rollback.
  • allow_remote_ionstore: allows ionstore sync plan/apply for remote CAS targets such as gcs://... or file://...; blocked by default and by locked-down policy.

The default profile uses agent_process with network_mode: log; dev disables automatic mutation backups, uses network_mode: allow and permits remote ION store planning; locked-down selects windows_sandbox, uses sandbox_timeout: 10m, disables task shell fallback, sets network_mode: block, disables network, blocks remote ION store sync, requires signed ION and requires a signed release manifest.

Every named policy (default, dev, locked-down) is also compiled into iandara.exe. A policy file on disk always wins when one is found, but resolving a named policy that has no reachable file now falls back to the matching embedded copy instead of silently degrading to the permissive default profile — --policy locked-down either resolves to the real locked-down profile or fails outright, it never quietly runs as something else while still reporting itself as locked-down.

Backup And Restore

Backups are .ion snapshots.

.platform/installer/dist/iandara.exe backup create . workspace
.platform/installer/dist/iandara.exe backup create . workspace --key .platform/installer/dist/signing-key.json --encrypt-key <secret>
.platform/installer/dist/iandara.exe backup list
.platform/installer/dist/iandara.exe backup restore <id>
.platform/installer/dist/iandara.exe backup restore <id> --key .platform/installer/dist/signing-key.json --require-signature --decrypt-key <secret>

Restore behavior is staging-first:

  • Deionizes into %LOCALAPPDATA%\Iandara\temp\restore-*.
  • Validates hashes from the manifest.
  • Verifies signatures and decrypts encrypted backups when --key|--public-key, --require-signature and --decrypt-key are passed.
  • Does not touch the target unless --promote --dest <path> is passed.
  • Promotion moves the existing destination to a rollback path under temp, promotes staging into place, and removes rollback after success.

This keeps restores reviewable before promotion.

Doctor

doctor checks local runtime readiness.

task installer:smoke
.platform/installer/dist/iandara.exe doctor --bootstrap --no-install
.platform/installer/dist/iandara.exe doctor --no-install

It reports:

  • OS and architecture.
  • Runtime home.
  • Toolchain lock source.
  • Runtime-managed shim directory.
  • Required toolchains: task, Node, npm, Git and Go.
  • Optional toolchains: Python.
  • Deferred bootstrap toolchains when --bootstrap is used.

Without --no-install, doctor attempts provisioning for missing required toolchains. In full mode it provisions all required toolchains. In bootstrap mode it provisions only bootstrap toolchains and reports bootstrap: false required tools, currently Go, under deferred without failing readiness. It installs from local .ion bundles first and can download remote archives only when the lockfile has a pinned SHA-256. If neither a local bundle nor a verified remote source exists for a required toolchain in the active mode, doctor reports the missing toolchain and fails.

Current Limits

This is a functional foundation, not the final Windows product shell.

Done:

  • Go module and binaries.
  • ION v3 on the platform specialists: ignorante file selection, vault hashes and dual ML-DSA-87 + Ed25519 signatures, ionizer IONWF1 streamed encryption to ML-KEM-1024 and password recipients, extraction limited to the signed manifest.
  • Policy-driven provider selection, signed release verification and mutation backup hooks.
  • Per-task proxy in log and block modes with network events in TaskResultIon.
  • Windows Firewall/WFP rule planning, status, smoke, explicit apply/remove and task-result audit integration.
  • MSIX/AppContainer layout generation, AppxManifest.xml, assets, ION plan and optional makeappx package generation.
  • MSIX development signing with CurrentUser certificate creation/trust and signtool verification.
  • MSIX install/status/uninstall cycle through Add-AppxPackage, Get-AppxPackage and Remove-AppxPackage.
  • MSIX App Execution Alias launch smoke for installed iandara.exe.
  • MSIX first-launch bootstrap smoke through installed iandara.exe launcher --install-only.
  • Package-aware runtime root under %LOCALAPPDATA%\Packages\<family>\LocalCache\Local\Iandara.
  • Portable single-file executable: release embedded in iandara.exe via a footer, auto-extracted by the launcher into a content-addressed directory, with package portable/portable-extract/portable-smoke CLI and task wiring.
  • Task-only gateway.
  • Controlled console.
  • ION task request/result/audit.
  • Agent-mediated local execution.
  • Windows Sandbox .wsb bundle generation.
  • Automatic Windows Sandbox launch and result polling for locked-down.
  • Sandbox lifecycle events persisted in TaskResultIon.
  • Separate sandbox lifecycle event stream persisted as audit .ion.
  • Large stdout/stderr offload into audit output .ion refs.
  • Lightweight sandbox result ION with stdout/stderr refs and automatic rehydration.
  • audit show and audit extract CLI for task audit navigation.
  • ION backup/list/restore.
  • Toolchain lock loading with embedded fallback.
  • Offline toolchain install from toolchain.*.ion.
  • Remote archive install path with mandatory SHA-256.
  • Official Windows toolchain vendor flow with signed toolchain.*.ion bundles.
  • Bootstrap-only toolchain provisioning with Go deferred by policy.
  • Automatic deferred Go provisioning before installer/polyglot tasks.
  • Runtime shims under toolchains\bin.
  • npm provided by the Node bundle.
  • Release layout with manifest, checksums, binaries, policy/manifests and payload ION.
  • Release manifest verification.
  • Signed release public key bundled into keys/ion-release-public.key.
  • Signed-release update check/apply with pre-update ION backups and update audit.
  • Detached, verifiable release.manifest.json signature (release.manifest.sig) so the manifest is not a self-referential trust root, with a pinnable release signing key fingerprint (--trusted-key-fingerprint, trusted_release_key_fingerprint).
  • Fail-closed policy resolution: named policies fall back to a compiled-in embedded copy instead of the permissive default when no policy file is reachable.
  • IANDARA_RUNTIME_HOME is ignored under MSIX package identity instead of overriding it, closing an env-var path to redirecting the governed console's toolchain lookup.
  • Update anti-downgrade (version ids compared, --allow-downgrade required to go backward) and installed-key pinning across updates (--allow-key-rotation required to accept a release signed by a different key than the one recorded at install time).
  • Automatic rollback of pre-update backups when update apply fails partway through, plus on-demand update rollback <update-id>.
  • Local .ionstore CAS with SHA-256 deduplication and refs for payload, toolchain, backup, audit/update artifacts.
  • .ionstore ref history plus list/export/verify filters for kind, source and labels.
  • Remote CAS sync-plan ION contract with policy-gated gcs://... planning and no runtime credentials.
  • Filesystem-backed file:// remote CAS adapter for offline push/pull validation.
  • gcs:// remote CAS adapter (push/pull/index) over the GCS JSON API, authenticated through Application Default Credentials.
  • Runtime audit for remote CAS sync results plus audit show-sync and audit extract-sync.
  • Signed/encrypted backup creation and verified/decrypted restore.
  • Restore promotion through staging plus rollback instead of direct overwrite.
  • Platform payload packaging.
  • Every release build cleans its output directory first, so repeated builds cannot accumulate stale payload/toolchain/MSIX artifacts.
  • Windows DPAPI at-rest protection for ION signing keys, transparent to LoadPrivateKey, with ion keygen --protect dpapi, ion protect and ion unprotect CLI.
  • iandara version/--version reporting build identity (version/commit/date/dirty/Go version/OS/arch) baked in at build time via -ldflags, sourced from manifests/installer.manifest.yaml; -trimpath on both binaries.
  • MSIX package version derived from the same manifest version instead of a second hardcoded constant.
  • release.provenance.json: per-binary build settings (-trimpath, GOOS/GOARCH, VCS revision/dirty when available) read back out of the compiled binaries with debug/buildinfo, not trusted from the packaging process's own claims.
  • sbom.cyclonedx.json: a CycloneDX 1.5 bill of materials generated directly from go.mod/go.sum, no external tool or network call.
  • Provenance and SBOM are regular release artifacts, hashed in release.manifest.json and covered by its signature like every binary.
  • Unit coverage for the previously-untested CLI parsing/policy-application layer (cmd/iandara), the doctor readiness rules (internal/bootstrap) and the sandbox-side agent's argument validation (cmd/iandara-agent).
  • The controlled console (internal/console) takes injectable stdin/stdout/stderr, covering the exit/help/reject/task/audit/error dispatch paths that used to be untestable without touching a real terminal.
  • CI: .github/workflows/installer.yaml runs task installer:build plus an unsigned package/verify pass on windows-latest.
  • iandara uninstall for local/portable installs (msix uninstall already covered the MSIX package path), preserving backups/ by default with --purge-backups/--dry-run.
  • MSIX package identity resolution (Windows) checks the real GetCurrentPackageFamilyName Win32 API before the IANDARA_MSIX_PACKAGE_FAMILY_NAME test/dev override, instead of letting the override take priority over a real package's own verified identity.
  • Taskfile integration.

Still pending:

  • Operational release input: provision the official offline-held ION release signing key and pass it through IANDARA_RELEASE_SIGN_KEY when running task installer:release.prd.
  • Operational release input: provision the production MSIX code-signing certificate and pass it through msix sign args (--thumbprint ... or --cert-path ...) instead of the development CN=Iandara certificate.
  • Backlog: replace Windows Firewall rule management with a lower-level signed callout driver only if product requirements need packet inspection beyond per-program outbound enforcement.
  • Backlog: add cross-platform key protection (e.g. passphrase-based) for non-Windows hosts; today keyprotect only implements DPAPI.
  • Backlog: add remote CAS providers beyond file:// and gcs:// (e.g. s3://) using the existing ionstore.sync.plan contract.

Development Rules

  • Use task installer:* from the repository root.
  • Do not operate this module with raw go build, go test or gofmt as the normal path.
  • Use task installer:fix for intentional formatting/module rewrites; validation tasks fail when formatting or module state is dirty.
  • Keep generated dist/ artifacts out of versioned changes.
  • No cryptography in the installer: every hash, key, signature and cipher comes from the platform vault and ionizer.
  • New operational behavior must remain reachable through task.

CI

.github/workflows/installer.yaml runs task installer:build plus an unsigned task installer:package.release / task installer:package.verify on windows-latest — the only runner that actually exercises the Windows-only build tags (internal/keyprotect, internal/wfp, internal/runtime/package_identity_*) instead of their non-Windows stub variants. Its pull_request/push triggers are commented out to match the repository-wide "validation runs by hand, locally" stance currently in effect (see the other workflows under .github/workflows/); it runs on workflow_dispatch until that is revisited. Signed releases, MSIX packaging/signing, toolchain vendoring and Windows Sandbox smoke are out of scope for that job — they need a signing key, network access and (for Windows Sandbox) an optional Windows feature the runner does not have; run those locally or from a self-hosted runner that does.