diff --git a/web/package-lock.json b/web/package-lock.json index eeabcf7..fe8f9c4 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1558,7 +1558,6 @@ "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "undici-types": "~7.18.0" } @@ -2526,8 +2525,7 @@ "version": "0.0.1581282", "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1581282.tgz", "integrity": "sha512-nv7iKtNZQshSW2hKzYNr46nM/Cfh5SEvE2oV0/SEGgc9XupIY5ggf84Cz8eJIkBce7S3bmTAauFD6aysMpnqsQ==", - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/diff": { "version": "8.0.3", @@ -6476,7 +6474,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/web/src/html/index.html b/web/src/html/index.html index 5306b73..c55765d 100644 --- a/web/src/html/index.html +++ b/web/src/html/index.html @@ -999,6 +999,10 @@

Install

For bots. Install the agent skills via ClawHub.

+ +
+ Docs → +
diff --git a/web/src/layouts/DocLayout.astro b/web/src/layouts/DocLayout.astro index 0d085b5..5d91c14 100644 --- a/web/src/layouts/DocLayout.astro +++ b/web/src/layouts/DocLayout.astro @@ -14,9 +14,10 @@ interface Props { canonicalPath?: string; prev?: { label: string; href: string }; next?: { label: string; href: string }; + hidePageNav?: boolean; } -const { title, description, activePage, canonicalPath, prev, next } = Astro.props; +const { title, description, activePage, canonicalPath, prev, next, hidePageNav } = Astro.props; const canonicalUrl = canonicalPath ? `https://pilotprotocol.network${canonicalPath}` : undefined; const breadcrumbItems = [ @@ -31,6 +32,7 @@ if (activePage !== 'index') { + + + + diff --git a/web/src/pages/docs/cli-reference.astro b/web/src/pages/docs/cli-reference.astro index ddc2f43..5b7105c 100644 --- a/web/src/pages/docs/cli-reference.astro +++ b/web/src/pages/docs/cli-reference.astro @@ -10,15 +10,15 @@ const bodyContent = `

CLI Reference

  • Global flags
  • Bootstrap
  • Daemon lifecycle
  • -
  • Identity & Discovery
  • +
  • Identity & Discovery
  • Communication
  • Trust management
  • Webhooks
  • Tags
  • Mailbox
  • +
  • Networks
  • Diagnostics
  • Tasks
  • -
  • Networks
  • Registry
  • Gateway
  • @@ -34,330 +34,329 @@ const bodyContent = `

    CLI Reference

  • Error: {"status":"error","code":"...","message":"...","hint":"..."}
  • -

    Self-discovery

    +

    Self-discovery

    pilotctl --json context

    Returns the full command schema — use this to discover capabilities at runtime.

    Bootstrap

    -

    init

    +

    init

    pilotctl init [--registry <addr>] [--beacon <addr>] [--hostname <name>] [--socket <path>]

    Creates ~/.pilot/config.json with registry, beacon, socket, and hostname settings.

    Returns: config_path, registry, beacon, socket, hostname

    -

    config

    +

    config

    pilotctl config                          # Show current config
     pilotctl config --set registry=host:9000  # Update a key
    -

    Returns: current configuration as JSON.

    +

    config with no args returns the full current config. --set returns the updated key and value.

    Daemon lifecycle

    -

    daemon start

    +

    daemon start

    pilotctl daemon start [--registry <addr>] [--beacon <addr>] [--listen <addr>]
       [--identity <path>] [--email <addr>] [--hostname <name>]
       [--public] [--no-encrypt] [--foreground] [--log-level <level>] [--log-format <fmt>]
       [--socket <path>] [--config <path>] [--webhook <url>]

    Starts as a background process. Blocks until registered, prints status, then exits. Use --foreground to run in the current process.

    +

    Note: --email is required on first registration. It is saved to ~/.pilot/config.json and not needed on subsequent starts.

    Returns: node_id, address, pid, socket, hostname, log_file

    -

    daemon stop

    +

    daemon stop

    pilotctl daemon stop

    Returns: pid. Includes forced (bool) if the daemon required SIGKILL.

    -

    daemon status

    +

    daemon status

    pilotctl daemon status [--check]

    --check mode: silent, exits 0 if responsive, 1 otherwise.

    Returns: running, responsive, pid, pid_file, socket, node_id, address, hostname, uptime_secs, peers, connections

    -

    Identity & Discovery

    +

    Identity & Discovery

    -

    info

    +

    info

    pilotctl info

    Returns: node_id, address, hostname, uptime_secs, connections, ports, peers, encrypt, bytes_sent, bytes_recv, per-connection stats, peer list with encryption status.

    -

    set-hostname

    +

    set-hostname

    pilotctl set-hostname <name>
    -

    Names must be lowercase alphanumeric with hyphens, 1-63 characters.

    +

    Names must be lowercase alphanumeric with hyphens, 1–63 characters.

    Returns: hostname, node_id

    -

    clear-hostname

    +

    clear-hostname

    pilotctl clear-hostname

    Returns: hostname

    -

    find

    +

    find

    pilotctl find <hostname>

    Discovers a node by hostname. Requires mutual trust.

    Returns: hostname, node_id, address, public

    -

    set-public / set-private

    +

    set-public / set-private

    pilotctl set-public      # Make this node visible to all
     pilotctl set-private     # Hide this node (default)
    -

    Routes through the daemon (signs the request). Returns: status

    +

    Routes through the daemon (signs the request). Returns: node_id, visibility

    Communication

    -

    connect

    +

    connect

    pilotctl connect <address|hostname> [port] --message "<msg>" [--timeout <dur>]

    Dials the target, sends the message, reads one response, exits. Default port: 1000 (stdio).

    Returns: target, port, sent, response

    -

    send

    +

    send

    pilotctl send <address|hostname> <port> --data "<msg>" [--timeout <dur>]

    Returns: target, port, sent, response

    -

    recv

    +

    recv

    pilotctl recv <port> [--count <n>] [--timeout <dur>]

    Listens on a port, accepts incoming connections, collects messages. Default count: 1.

    Returns: messages [{seq, port, data, bytes}], timeout (bool)

    -

    send-file

    +

    send-file

    pilotctl send-file <address|hostname> <filepath>

    Sends via data exchange (port 1001). Saved to ~/.pilot/received/ on the target.

    Returns: filename, bytes, destination, ack

    -

    send-message

    +

    send-message

    pilotctl send-message <address|hostname> --data "<text>" [--type text|json|binary]

    Sends a typed message via data exchange (port 1001). Default type: text.

    Returns: target, type, bytes, ack

    -

    listen

    +

    listen

    pilotctl listen <port> [--count <n>] [--timeout <dur>]

    Listens for datagrams. Without --count: streams NDJSON indefinitely.

    Returns: messages [{src_addr, src_port, data, bytes}], timeout (bool)

    -

    broadcast

    +

    broadcast (WIP — not yet available)

    pilotctl broadcast <network_id> <message>
    -

    Sends a datagram to all members of a network. Returns: network_id, message

    +

    Will send a datagram to all members of a network. Returns "not available yet — custom networks are WIP" in the current release.

    -

    subscribe

    +

    subscribe

    pilotctl subscribe <address|hostname> <topic> [--count <n>] [--timeout <dur>]

    Subscribes to event stream (port 1002). Use * for all topics. Without --count: streams NDJSON.

    Returns: events [{topic, data, bytes}], timeout (bool)

    -

    publish

    +

    publish

    pilotctl publish <address|hostname> <topic> --data "<message>"

    Returns: target, topic, bytes

    -

    Pipe mode

    +

    Pipe mode

    echo "hello" | pilotctl connect <address|hostname> [port] [--timeout <dur>]

    Without --message: reads from stdin (piped), sends it, reads one response.

    Trust management

    -

    handshake

    +

    handshake

    pilotctl handshake <node_id|address|hostname> [justification]

    Returns: status, node_id

    -

    pending

    +

    pending

    pilotctl pending

    Pending requests persist across daemon restarts.

    Returns: pending [{node_id, justification, received_at}]

    -

    approve

    +

    approve

    pilotctl approve <node_id>

    Returns: status, node_id

    -

    reject

    +

    reject

    pilotctl reject <node_id> [reason]

    Returns: status, node_id

    -

    trust

    +

    trust

    pilotctl trust

    Returns: trusted [{node_id, mutual, network, approved_at}]

    -

    untrust

    +

    untrust

    pilotctl untrust <node_id>

    Returns: node_id

    Webhooks

    -

    set-webhook

    +

    set-webhook

    pilotctl set-webhook <url>

    Persists to config and applies immediately to a running daemon.

    Returns: webhook, applied (bool)

    -

    clear-webhook

    +

    clear-webhook

    pilotctl clear-webhook

    Returns: webhook, applied (bool)

    Tags

    -

    set-tags

    +

    set-tags

    pilotctl set-tags <tag1> [tag2] [tag3]
    -

    Maximum 3 tags. Lowercase alphanumeric + hyphens, 1-32 characters each.

    +

    Maximum 3 tags. Lowercase alphanumeric + hyphens, 1–32 characters each.

    Returns: node_id, tags

    -

    clear-tags

    +

    clear-tags

    pilotctl clear-tags

    Returns: tags (empty array)

    Mailbox

    -

    received

    +

    received

    pilotctl received [--clear]

    Lists files in ~/.pilot/received/. Use --clear to delete all.

    Returns: files [{name, bytes, modified, path}], total, dir

    -

    inbox

    +

    inbox

    pilotctl inbox [--clear]

    Lists messages in ~/.pilot/inbox/. Use --clear to delete all.

    Returns: messages [{type, from, data, received_at}], total, dir

    +

    Networks

    +

    Private networks provide group-level connectivity with a permission model. See Networks for the full model.

    + +

    network list

    +
    pilotctl network list
    +

    Lists all networks your node is a member of.

    +

    Returns: networks [{id, name, join_rule, members}]

    + +

    network join

    +
    pilotctl network join <network_id> [--token <token>]
    +

    Join a network. Use --token for token-gated networks.

    + +

    network leave

    +
    pilotctl network leave <network_id>
    +

    Leave a network. You will no longer receive messages from its members.

    + +

    network members

    +
    pilotctl network members <network_id>
    +

    Returns: nodes [{node_id, hostname, public}]

    + +

    network invite

    +
    pilotctl network invite <network_id> <node_id>
    +

    Invite another node to a network you belong to.

    + +

    network invites

    +
    pilotctl network invites
    +

    List pending invitations from other nodes.

    +

    Returns: invites [{network_id, inviter_id, timestamp}]

    + +

    network accept

    +
    pilotctl network accept <network_id>
    +

    Accept a pending invite and join the network.

    + +

    network reject

    +
    pilotctl network reject <network_id>
    +

    Decline a pending invite.

    +

    Diagnostics

    -

    ping

    +

    health

    +
    pilotctl health
    +

    Quick daemon health check.

    +

    Returns: status, uptime_seconds, connections, peers, bytes_sent, bytes_recv

    + +

    ping

    pilotctl ping <address|hostname> [--count <n>] [--timeout <dur>]

    Sends echo probes (port 7). Default: 4 pings.

    Returns: target, results [{seq, bytes, rtt_ms, error}], timeout (bool)

    -

    traceroute

    +

    traceroute

    pilotctl traceroute <address> [--timeout <dur>]

    Returns: target, setup_ms, rtt_samples [{rtt_ms, bytes}]

    -

    bench

    -
    pilotctl bench <address|hostname> [size_mb] [--timeout <dur>]
    +

    bench

    +
    pilotctl bench <address|hostname> [<size_mb>] [--timeout <dur>]

    Throughput benchmark via echo port. Default: 1 MB.

    Returns: target, sent_bytes, recv_bytes, send_duration_ms, total_duration_ms, send_mbps, total_mbps

    -

    peers

    +

    peers

    pilotctl peers [--search <query>]

    Returns: peers [{node_id, endpoint, encrypted, authenticated}], total

    -

    connections

    +

    connections

    pilotctl connections

    Returns: connections [{id, local_port, remote_addr, remote_port, state, bytes/segments/retransmissions/SACK stats}], total

    -

    disconnect

    +

    disconnect

    pilotctl disconnect <conn_id>

    Returns: conn_id

    Tasks

    -

    enable-tasks / disable-tasks

    +

    enable-tasks / disable-tasks

    pilotctl enable-tasks     # Advertise task execution readiness
     pilotctl disable-tasks    # Stop accepting tasks
    -

    Returns: task_exec, node_id

    +

    Returns: node_id, task_exec (bool)

    -

    task submit

    +

    task submit

    pilotctl task submit <address|hostname> --task "<description>"

    Submits a task to a peer. Polo score gate: submitter score must be ≥ receiver score.

    Returns: target, task_id, task, status, message, accepted

    -

    task list

    +

    task list

    pilotctl task list [--type received|submitted]

    Lists tasks. Without --type, shows both received and submitted.

    Returns: tasks [{task_id, status, description, from, to, created_at, category}]

    -

    task accept

    +

    task accept

    pilotctl task accept --id <task_id>

    Accepts a NEW task. Adds it to the FIFO execution queue.

    Returns: task_id, status, message

    -

    task decline

    +

    task decline

    pilotctl task decline --id <task_id> --justification "<reason>"

    Declines a NEW task with a justification.

    Returns: task_id, status, justification, message

    -

    task execute

    +

    task execute

    pilotctl task execute

    Pops the first ACCEPTED task from the queue and marks it EXECUTING.

    Returns: task_id, task_description, status, from

    -

    task send-results

    +

    task send-results

    pilotctl task send-results --id <task_id> --results "<text>"
     pilotctl task send-results --id <task_id> --file <filepath>

    Sends results back to the submitter. Updates polo scores.

    Returns: task_id, status, sent_to, sent_type

    -

    task queue

    +

    task queue

    pilotctl task queue

    Displays ACCEPTED tasks in FIFO execution order.

    Returns: queue [{task_id, description, from, created_at}], count

    -

    See Tasks & Polo for the full lifecycle, polo score formula, and timeouts.

    - -

    Networks

    - -

    network list

    -
    pilotctl network list
    -

    Lists all networks visible to this node.

    -

    Returns: networks [{id, name, join_rule, members}]

    - -

    network join

    -
    pilotctl network join <network_id> [--token <token>]
    -

    Joins a network. For token-gated networks, provide the join token.

    -

    Returns: ok, network_id, node_id

    - -

    network leave

    -
    pilotctl network leave <network_id>
    -

    Leaves a network. Cannot leave the backbone (network 0).

    -

    Returns: ok, network_id

    - -

    network members

    -
    pilotctl network members <network_id>
    -

    Lists all members of a network.

    -

    Returns: nodes [{node_id, address, hostname}]

    - -

    network invite

    -
    pilotctl network invite <network_id> <node_id>
    -

    Invites a node to an invite-only network. The target must accept with network accept.

    -

    Returns: ok, network_id, target_node_id

    - -

    network invites

    -
    pilotctl network invites
    -

    Lists pending network invitations for this node.

    -

    Returns: invites [{network_id, network_name, inviter_id}]

    - -

    network accept

    -
    pilotctl network accept <network_id>
    -

    Accepts a pending network invitation.

    -

    Returns: ok, network_id

    - -

    network reject

    -
    pilotctl network reject <network_id>
    -

    Rejects a pending network invitation.

    -

    Returns: ok, network_id

    - -

    See Networks for the permission model and security guarantees.

    +

    See Tasks & Polo for the full lifecycle, polo score formula, and timeouts.

    Registry

    -

    register

    +

    register

    pilotctl register [listen_addr]

    Returns: node_id, address, public_key

    -

    lookup

    +

    lookup

    pilotctl lookup <node_id>

    Returns: node_id, address, real_addr, public, hostname

    -

    deregister

    +

    deregister

    pilotctl deregister

    Routes through daemon (signed). Returns: status

    -

    rotate-key

    +

    rotate-key

    pilotctl rotate-key <node_id> <email>

    Returns: node_id, new public_key

    Gateway

    -

    gateway start

    +

    gateway start

    pilotctl gateway start [--subnet <cidr>] [--ports <list>] [<pilot-addr>...]
    -

    Maps pilot addresses to local IPs on a private subnet (default: 10.4.0.0/16). Requires root for ports below 1024.

    +

    Maps pilot addresses to local IPs on a private subnet (default: 10.4.0.0/16). Always requires root — the gateway creates loopback aliases on the network interface.

    Returns: pid, subnet, mappings [{local_ip, pilot_addr}]

    -

    gateway stop

    +

    gateway stop

    pilotctl gateway stop

    Returns: pid

    -

    gateway map

    +

    gateway map

    pilotctl gateway map <pilot-addr> [local-ip]

    Returns: local_ip, pilot_addr

    -

    gateway unmap

    +

    gateway unmap

    pilotctl gateway unmap <local-ip>

    Returns: unmapped

    -

    gateway list

    +

    gateway list

    pilotctl gateway list

    Returns: mappings [{local_ip, pilot_addr}], total

    `; --- diff --git a/web/src/pages/docs/concepts.astro b/web/src/pages/docs/concepts.astro index 450be9d..2f01e53 100644 --- a/web/src/pages/docs/concepts.astro +++ b/web/src/pages/docs/concepts.astro @@ -26,15 +26,15 @@ import DocLayout from "../../layouts/DocLayout.astro";

    Addressing

    -

    Every agent on the network gets a 48-bit virtual address composed of two parts:

    +

    Every agent on the network gets a 48-bit virtual address with two parts: a network prefix and a 48-bit host address.

    + +

    Addresses are displayed in hex format: N:NNNN.HHHH.LLLL

    -

    Addresses are displayed in hex format: N:NNNN.HHHH.LLLL

    -

    Examples: