8000 feat: setup.sh, one command from a clone to a running Deck and two named agents by simon-inkie · Pull Request #148 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

Skip to content

feat: setup.sh, one command from a clone to a running Deck and two named agents - #148

Merged
simon-inkie merged 16 commits into
mainfrom
feat/clean-machine-install
Nov 18, 2026
Merged

simon-inkie merged 16 commits into
mainfrom
feat/clean-machine-install

Conversation

@simon-inkie
@simon-inkie simon-inkie commented Nov 18, 2026 •
Copy link
Copy Markdown
Owner

Stacked on #147 (name your assistant); base is that branch, retarget to main after #147 merges.

What

scripts/setup.sh: one command from a fresh clone to a running Deck (loopback only) and the two starter agents (assistant and platform, via first-run.sh), with an optional API key, then a first-conversation brief so the assistant asks what the user does and the platform agent proposes agents to fit.

  • Preflight, then config, then write, then start; effective HOST resolved like the launcher (env, then .env) and refused if non-loopback before any write. Exit codes 2 > 1 > 3 > 4 > 5 > 0. Refuses root; non-TTY needs flags.
  • Optional key stored only in the starter agents' .env.secrets; never in argv or logs; validated before install; written via a recorded pending marker with next-run reconciliation (not an unconditional both-or-neither claim); a lock around the transaction; symlinked homes and git work trees refused.
  • create-agent.sh --status <name> (complete/incomplete/absent, writes nothing, fails closed), --person, --kind member; first-run.sh and setup count an agent as existing only when --status says complete.
  • INSTALL.md "Quick setup" and a rig stage that executes it, with a negative control.
  • The approval card and the cap of three proposed agents are guidance in the briefs, not enforced in code.

Spec: .specs/151-clean-machine-install/SPEC.md. Issue: #151.

Review and tests

  • Reviews: Azure Sol x2 (second a delta review) and Aggy x1; all P1 and P2 findings fixed (details in the SPEC Log). Deferred in the SPEC: SIGKILL-mid-write test, symlink-swap race not fully closable without an atomic open, split or encoded secret leakage in probe output, a hard process-identity check for the Deck URL.
  • Base 159 passed, Deck 2346 passed (11 skipped), 0 failed. Typecheck, boundaries, leaks, licence, lib-version, dashes clean; rig self-test 79/79; rig stages source-entry, install-doc and install-setup pass in a clean container.
  • Not run: full rig end to end (documented-checks stage is red on main for missing jq and stale counts), a real signed-in model CLI, WSL, the interactive prompts on a real terminal.

🤖 Generated with Claude Code

simon-inkie and others added 11 commits November 18, 2026 01:44
…rst-conversation briefs

create-agent.sh --status reports complete, incomplete or absent from the
homes and writes nothing; complete needs the markers and the whole scaffold,
never a lone .kind. --person stamps the user's name into the role brief,
--kind member adds a brief for agents the platform agent creates, and the
persona probe sources the agent's own .env.secrets in its subshell only.
The assistant's first-boot message gains one sentence.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
…d two agents

Validates the effective configuration before writing anything, refuses root
and a non-loopback HOST, creates the roots, .env and the starter agents
through first-run.sh, optionally stores an API key only in the starters'
.env.secrets with a pending marker and rollback, verifies both agents, starts
Deck on loopback and boots exactly the two starters only if both verified.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
INSTALL.md gains a Quick setup section (python3-yaml joins section 1's apt
line), the README and base docs point at it, and the rig runs its unattended
block as an ordinary user with a negative control.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
--replace-key needs a key source even with --yes, a pending marker always
stops before verification, the key write takes a lock, key paths refuse
symlinks and git work trees, and the persona probe redacts credentials from
the runtime output it prints. --status parses settings as JSON, checks the
brief matches the kind and reads a dangling home symlink as incomplete;
first-run and setup trust it instead of a bare kind marker. boot-agents
reports prompt and non-prompt waiting separately so setup exits 5 only for
real prompts. HOST is parsed like dotenv, --model is validated before any
write, and --no-start no longer reports Deck as running.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
…probe on the raw reply

Setup re-reads the key and marker state after taking the lock, compares
destination paths with their real paths (before staging and renaming too),
and treats any Git discovery failure other than not-a-repository as a
refusal. The persona probe decides its verdict on the raw reply and
redacts only what it prints, reading .env.secrets as shell assignments.
--status requires the kind's own role heading. Boot counts the API key
approval prompt, and a monitor wait that ends on a prompt, as prompts.
HOST drops a trailing comment, and a stale lock is explained, not removed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
… to the marker's pair

--status reads absent only when neither the agent home nor its inbox
folder exists as any entry; any other state that is not whole is
incomplete. A mixed --replace-key repair refuses, before any write and
with the marker kept, when the marker's pair is not two distinct agents
or differs from the selected starters. Docs qualify credential, status,
redaction and acceptance wording.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
…ditional

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
…I, state supported runtimes

Install and build output goes to a log under the deck home with a one-line
status and the tail on failure. With no agent CLI on PATH setup says once what
is needed, which CLIs are supported and where to get them, and still exits 4.
README and INSTALL list the supported CLIs; the SPEC records the runtime
support read from the code and scopes in-Deck detection as a follow-up.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
simon-inkie and others added 5 commits November 18, 2026 10:30
… text

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Dixon <simon-inkie@users.noreply.github.com>
@simon-inkie
simon-inkie changed the base branch from feat/name-your-assistant to main November 18, 2026 14:14
@simon-inkie
simon-inkie merged commit 2806959 into main Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0