You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(pilotctl): surface app store + missing commands in help and context (#332)
* fix(pilotctl): surface app store + missing commands in help and context
pilotctl help (usage), the JSON `context` catalog, and per-command
--help had drifted from the dispatch table:
- usage() listed set-tags/clear-tags/gateway as core commands, but they
are extras-gated and error out when invoked that way.
- usage() and context omitted the entire `appstore` family plus review,
verify, recovery, prefer-direct, trusted, and the extras tier.
- verify/recovery/prefer-direct/quickstart had no per-command help.
Realign all three surfaces with the actual commands:
- usage(): drop the extras-gated entries from core; add App Store,
Updates, and Identity & recovery sections, trusted/prefer-direct, and
an operator/admin pointer to `pilotctl extras` / `pilotctl context`.
- context: bump to v1.4, add an `app_store` section (15 subcommands) and
core entries for quickstart/update/updates/skills/review/verify/
recovery/prefer-direct/trusted.
- commandHelp: add entries for verify/recovery/prefer-direct/quickstart.
go build, go vet, and go test ./cmd/pilotctl all pass.
* docs: regenerate cli-reference.md from updated pilotctl --help
* fix(pilotctl): move diagnostic commands to the bottom of help
* fix(daemon): bind IPC socket via private dir to end umask test race
IPCServer.Start flipped the process-global syscall.Umask around
net.Listen to create the socket at 0600. umask is process-wide rather
than goroutine-scoped, so under parallel tests a concurrent t.TempDir()
inherited the restrictive 0177 mask and its nested mkdir failed with
"permission denied", flaking the pkg/daemon suite on both runners.
Bind the socket inside a freshly-created private 0700 staging dir,
chmod it 0600, then atomically rename it onto the published path. This
closes the same TOCTOU window without ever touching the global umask.
---------
Co-authored-by: Alex Godoroja <alex@vulturelabs.io>
Co-authored-by: Teodor Calin <teodor@vulturelabs.io>
// serve single-command lookups without holding the map at package scope.
1997
2054
funccontextCatalog() map[string]interface{} {
1998
2055
returnmap[string]interface{}{
1999
-
"version": "1.3",
2000
-
"note": "Core commands cover everything an agent needs. Use 'pilotctl extras <cmd>' for operator/admin operations. 'pilot-gateway' is a separate installed binary.",
2056
+
"version": "1.4",
2057
+
"note": "Core commands cover everything an agent needs. 'app_store' lists the 'pilotctl appstore <sub>' command family (install + call local capability apps). Use 'pilotctl extras <cmd>' for operator/admin operations. 'pilot-gateway' is a separate installed binary.",
"description": "Self-update. Bare: run the updater once (check + install latest). Subcommands: status, enable, disable (auto-update is OFF by default)",
2085
+
"returns": "updated (bool), from, to | enabled (bool)",
"description": "List the embedded trusted-agents directory — well-known service agents (list-agents, weather, etc.) auto-approved on first contact. For live trust state use 'trust'",
2196
+
"returns": "agents [{hostname, node_id}], total",
2197
+
},
2198
+
"prefer-direct": map[string]interface{}{
2199
+
"args": []string{"<node_id|address|hostname>"},
2200
+
"description": "Reset routing state for a peer so the next connection prefers a direct (hole-punched) tunnel over the relay. Requires daemon v1.12+",
"description": "Verified-address badges. Bare 'verify' (or 'verify status') shows your verification state; '--provider <name>' runs a device-flow to get verified; '--badge/--badge-sig' (or '--from <file>') submits a badge",
"description": "Address recovery if the identity key is lost. enroll: record a recovery commitment; new-key: rotate to a fresh key; recover: reclaim the address with recovery material",
"description": "Install and call local capability apps that run on the daemon as typed IPC services. All invoked as: pilotctl appstore <subcommand>. Install root: $PILOT_APPSTORE_ROOT or ~/.pilot/apps.",
2347
+
"subcommands": map[string]interface{}{
2348
+
"catalogue": map[string]interface{}{"args": []string{}, "description": "List apps available for one-command install (alias: catalog)"},
"install": map[string]interface{}{"args": []string{"<app-id> [--force]", "| <bundle-dir> --local [--force]"}, "description": "Install by catalogue ID (fetch + verify + extract), or sideload a local bundle with --local"},
2351
+
"list": map[string]interface{}{"args": []string{}, "description": "List installed apps and the IPC methods each exposes"},
2352
+
"call": map[string]interface{}{"args": []string{"<id>", "<method>", "[json-args]", "[--timeout <dur>]"}, "description": "Dispatch an IPC call into an app (default timeout 120s; $PILOT_APPSTORE_CALL_TIMEOUT)"},
2353
+
"status": map[string]interface{}{"args": []string{"<id>"}, "description": "Deep-dive on one app's pinned state"},
2354
+
"caps": map[string]interface{}{"args": []string{"<id>"}, "description": "Show the manifest's spend caps and current rolling-window usage"},
0 commit comments