Documentation
¶
Overview ¶
Package paths centralizes the on-host filesystem layout for Dejima.
Index ¶
- func AccountAuthorizedKeysPath() (string, error)
- func AuthTokensPath() (string, error)
- func AuthorizedKeysPath(name string) (string, error)
- func CapabilitiesDir() (string, error)
- func ClaudeSeedDir() (string, error)
- func DaemonInstallMetaPath() (string, error)
- func GitHubIslandConfigDir(name string) (string, error)
- func GitHubIslandConfigPath(name string) (string, error)
- func GitHubSecretsDir() (string, error)
- func HostClaudeDir() (string, error)
- func HostCodexDir() (string, error)
- func HostGHConfigDir() (string, error)
- func HostGitConfig() (string, error)
- func HostKeyPath() (string, error)
- func IslandSecretsDir(name string) (string, error)
- func IslandSecretsPath(name string) (string, error)
- func LLMIslandConfigDir(name string) (string, error)
- func LLMIslandConfigPath(name string) (string, error)
- func LLMSecretsDir() (string, error)
- func LedgerPath() (string, error)
- func LinksDir() (string, error)
- func PanicFlagPath() (string, error)
- func PolicyDir() (string, error)
- func ProjectConfigPath(name string) (string, error)
- func ProjectConfigPathRead(name string) (string, error)
- func ProjectDir(name string) (string, error)
- func ProjectsDir() (string, error)
- func Root() (string, error)
- func SSHDir(name string) (string, error)
- func SocketPath() (string, error)
- func SpawnDir() (string, error)
- func TokenPath(name string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountAuthorizedKeysPath ¶
AccountAuthorizedKeysPath returns ~/.dejima/ssh_authorized_keys — the account-wide allow-set of public keys that may ssh into *every* island (current and future). Consulted in addition to each island's own authorized_keys, so registering a key once grants fleet-wide access without per-island seeding. 0600.
func AuthTokensPath ¶
AuthTokensPath returns ~/.dejima/tokens.json — the store of issued operator bearer tokens (owner/operator/viewer roles + optional per-island scope) for the team-auth path. Only token *metadata* and a SHA-256 of each secret are kept here (never the raw bearer), so a leaked file can't be replayed. 0600, daemon-host-only, outside every container's blast radius.
func AuthorizedKeysPath ¶
AuthorizedKeysPath returns ~/.dejima/projects/<name>/ssh/authorized_keys — the public keys permitted to ssh into this island via the daemon's façade.
func CapabilitiesDir ¶
CapabilitiesDir returns ~/.dejima/capabilities, creating it (0700). It holds the user-authored executables the capability broker's script adapter runs (docs/capability-broker-spec.md §2.2). Owned by the daemon user and not island-writable — that is the curation boundary.
func ClaudeSeedDir ¶
ClaudeSeedDir returns ~/.dejima/secrets/claude — where the daemon materializes Claude credentials (from the host Keychain/file or a `dejima auth push`) for read-only mounting into islands. Created 0700.
func DaemonInstallMetaPath ¶
DaemonInstallMetaPath returns ~/.dejima/daemon-install.json — install context recorded by `dejima service install` (the source checkout dir and whether it's a system service) so the daemon can update + restart itself correctly.
func GitHubIslandConfigDir ¶
GitHubIslandConfigDir returns the per-island gh config dir the daemon materializes (containing a single-identity hosts.yml) and mounts read-only at /opt/host/gh-config when an island uses a specific GitHub identity. Created 0700.
func GitHubIslandConfigPath ¶
GitHubIslandConfigPath returns the per-island gh config dir path WITHOUT creating it — for cleanup when an island is torn down.
func GitHubSecretsDir ¶
GitHubSecretsDir returns ~/.dejima/secrets/github — the daemon's store of GitHub identities and the per-island gh configs materialized from them. Created 0700.
func HostClaudeDir ¶
HostClaudeDir returns the user's ~/.claude dir (may not exist).
func HostCodexDir ¶
HostCodexDir returns the user's ~/.codex dir (may not exist).
func HostGHConfigDir ¶
HostGHConfigDir returns the user's ~/.config/gh dir (may not exist).
func HostGitConfig ¶
HostGitConfig returns the user's ~/.gitconfig path (may not exist).
func HostKeyPath ¶
HostKeyPath returns ~/.dejima/ssh_host_ed25519 — the daemon's SSH host key for the SSH-façade listener. One key for the daemon (it is the single SSH front door for every island), generated on first use, 0600.
func IslandSecretsDir ¶ added in v0.8.28
IslandSecretsDir returns ~/.dejima/secrets/islands/<name> — the daemon-side store of an island's secrets, plus the KEY=VALUE file bind-mounted into it. Created 0700; sits under the same secrets/ root as the GitHub identities.
func IslandSecretsPath ¶ added in v0.8.28
IslandSecretsPath returns an island's secrets dir WITHOUT creating it — for cleanup when the island is torn down.
func LLMIslandConfigDir ¶
LLMIslandConfigDir returns the per-island LLM config dir the daemon materializes (containing one <provider>.env per referenced provider) and mounts read-only at /opt/host/llm. Created 0700.
func LLMIslandConfigPath ¶
LLMIslandConfigPath returns the per-island LLM config dir path WITHOUT creating it — for cleanup when an island is torn down (it holds plaintext provider keys, so it lives under secrets/ and must be removed on teardown).
func LLMSecretsDir ¶
LLMSecretsDir returns ~/.dejima/secrets/llm — the daemon's store of LLM provider credentials (provider→api_key) and the per-island provider configs materialized from them. Created 0700.
func LedgerPath ¶
LedgerPath returns ~/.dejima/ledger.jsonl — the append-only, hash-chained audit log of brokered Port operations (scope grants and file Trades).
func LinksDir ¶
LinksDir returns ~/.dejima/links — the daemon's store of inter-island link grants (Lane 5, Phase 2). Created 0700.
func PanicFlagPath ¶
PanicFlagPath returns ~/.dejima/PANIC — the presence of this file stops the daemon from auto-starting (adopting) any island at startup. Written by `dejima panic`, removed by `dejima panic --clear`.
func PolicyDir ¶ added in v0.6.0
PolicyDir returns ~/.dejima/policy — the daemon's store of action-gate auto-approve rules (Lane 5, Phase 3.x). Created 0700.
func ProjectConfigPath ¶
ProjectConfigPath returns ~/.dejima/projects/<name>/config.toml, creating the island's directory. For writers — Save needs somewhere to write to.
func ProjectConfigPathRead ¶ added in v0.8.66
ProjectConfigPathRead is ProjectConfigPath for readers: the same path, creating nothing.
A read that creates is not a read. Asking whether island "x" exists used to bring ~/.dejima/projects/x/ into being and then answer "no", which is wrong on its own terms and had two observable consequences:
- Stray directories in the operator's real ~/.dejima, one per island name anything ever looked up. Four of them were sitting in this container.
- The internal/api test flake. project.Load runs inside detached goroutines (the mailbox arrival hook), which outlive the test that started them. By the time one lands, $HOME is either the NEXT test's t.TempDir — where re-creating .dejima during RemoveAll gives "unlinkat: directory not empty" — or, if no test is running, the developer's real home.
The goroutines outliving their test is a separate defect and is still true. This makes their filesystem footprint nil, which is what turns the flake off.
func ProjectDir ¶
ProjectDir returns ~/.dejima/projects/<name>/, creating it if necessary.
func ProjectsDir ¶
ProjectsDir returns ~/.dejima/projects, creating it if necessary.
func SSHDir ¶
SSHDir returns ~/.dejima/projects/<name>/ssh — the per-island SSH dir holding authorized_keys (the public keys allowed to ssh into this island). Created 0700.
func SocketPath ¶
SocketPath returns the Unix socket the daemon listens on.
Types ¶
This section is empty.