This file now covers both shipped example paths:
handoffbrokered
Show a trusted wrapper calling a trusted binary with one approved secret handoff.
swift build
./.build/debug/latchkeyd manifest init --force
./.build/debug/latchkeyd manifest refresh
LATCHKEYD_BIN="$PWD/.build/debug/latchkeyd" ./examples/bin/example-wrapper demo
LATCHKEYD_BIN="$PWD/.build/debug/latchkeyd" ./.build/debug/latchkeyd validatemanifest initwrites the starter manifest.manifest refreshpins the current wrapper and binary hashes.example-wrapper democallslatchkeyd exec.latchkeydverifies the wrapper path and hash.latchkeydverifies the downstream binary path and hash.latchkeydinjects onlyLATCHKEYD_EXAMPLE_TOKEN.example-demo-cliproves the token was present without printing it.validateconfirms the example path and at least one denial path.
{
"ok": true,
"tool": "example-demo-cli",
"transport": "handoff",
"tokenPreview": "la***en",
"tokenLength": 19,
"args": []
}This demo uses the current handoff model. The broker decides whether the tool may start with the approved env var, but post-handoff behavior still belongs to the trusted child.
Show a trusted wrapper calling a trusted binary without raw secret env injection at launch.
swift build
./.build/debug/latchkeyd manifest init --force
./.build/debug/latchkeyd manifest refresh
LATCHKEYD_BIN="$PWD/.build/debug/latchkeyd" ./examples/bin/example-wrapper brokered-demo
LATCHKEYD_BIN="$PWD/.build/debug/latchkeyd" ./.build/debug/latchkeyd validateexample-wrapper brokered-democallslatchkeyd execwith the brokered policy.latchkeydverifies the wrapper, binary, policy, and operation set.latchkeydstarts a local session socket and launches the child without raw secret env vars.example-demo-clirequestssecret.resolve.- The broker checks the live session and allowlist.
- The broker returns the approved result and records brokered audit events.
{
"ok": true,
"tool": "example-demo-cli",
"transport": "brokered",
"args": [],
"brokeredOperation": {
"operation": "secret.resolve",
"secretName": "example-token",
"valuePreview": "la***en",
"valueLength": 19,
"policyName": "example-brokered",
"policyMode": "brokered"
}
}This demo uses the first shipped brokered slice. The child starts with session metadata only, then requests one approved brokered operation. It is a narrower request boundary than handoff, not a universal secretless proxy.