diff --git a/config.example.toml b/config.example.toml index 50d2d6a4c..06e649086 100644 --- a/config.example.toml +++ b/config.example.toml @@ -69,10 +69,9 @@ token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN" } # intake per identity is a pending migration, not a setting. # [[identities]] runs more than one bot identity from a single daemon, each -# with its own forge/dispatch/models/providers/budgets/notify -- see -# docs/architecture/identity.md for the full design and constraints (e.g. -# intake settings are rejected per identity, and [forge].intake = -# "webhook"/"both" is rejected alongside [[identities]]). Minimal shape: +# with its own forge/dispatch/models/providers/budgets/notify. Intake +# settings are rejected per identity, and [forge].intake = "webhook"/"both" +# is rejected alongside [[identities]]. Minimal shape: # [[identities]] # name = "personal" # required; namespaces logs/events/NATS subjects # bot_user = "your-bot" # required @@ -267,7 +266,7 @@ listen = "127.0.0.1:8485" # and streaming API. Auth is token-based for non-loopback addresses; # loopback binds (127.0.0.1, ::1, localhost) skip auth automatically. # -# From the UI cutover (archie-core-8cda.5.4) the dashboard is served by the +# The dashboard is served by the # standalone archie-ui process, not by archied: this listen address is what # archie-ui binds, and archied runs no dashboard listener at all. Run # `archie-ui -config ` alongside the other services. @@ -321,8 +320,7 @@ wall_clock = "30m" # one agent call gate_max_failures = 5 task_wall_clock = "4h" # a whole task run; keep containers.max_uptime at or above it -# Services selects contract adapters at composition time (see -# docs/prds/state-store-contract.md). +# Services selects contract adapters at composition time. [services.gateway] target = "127.0.0.1:8585" # archie-gateway's gRPC address (always remote once set) # listen = "127.0.0.1:8585" # The address archie-gateway BINDS. Read only by the @@ -340,8 +338,7 @@ target = "127.0.0.1:8585" # archie-gateway's gRPC address (always remot target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address archied and # # archie-gateway dial. They own no task data # # in-process: the standalone archie-state-store process -# # owns it in PostgreSQL (docs/prds/state-store-contract.md -# # §10/§12 step 7). An empty target is a startup error. +# # owns it in PostgreSQL. An empty target is a startup error. # listen = "127.0.0.1:9090" # The address archie-state-store BINDS. Read only by that # # process; every client ignores it. Defaults to the target # # above, so a default deployment's client and server cannot @@ -349,8 +346,7 @@ target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address arch # # taken on the host. # target_token = "..." # bearer token for a NON-loopback target. A loopback target # # (127.0.0.1/::1/localhost) needs no token. A non-loopback -# # target without a token fails closed (docs/prds/state-store-contract.md -# # §9). The same token is injected as STATE_STORE_TOKEN into +# # target without a token fails closed. The same token is injected as STATE_STORE_TOKEN into # # archie-agent containers so the agent authenticates to the # # same remote store. See deployments/README.md for how to # # start archie-state-store. @@ -367,13 +363,13 @@ target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address arch # Unbound webhook capture: POST /webhooks/capture/{source} accepts and # stores any inbound payload archie doesn't yet have a binding for, so it can -# be inspected and mapped later (see docs/prds/event-capture-storage.md). +# be inspected and mapped later. # Stored in the same PostgreSQL database as tasks, not NATS -- capture has one # writer and one (human, dashboard) reader, so it doesn't need JetStream's # fan-out/replay machinery. All fields default when the section is absent; # capture is on by default. # -# From the UI cutover (archie-core-8cda.5.4) the receiver is mounted by the +# The receiver is mounted by the # archie-ui process, which projects these same values from this file; the # daemon's binding-dispatch loop consumes captures from the shared State # Store. Leave this section here even if you do not edit it: both processes @@ -424,7 +420,7 @@ target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address arch # Playbook-binding at-rest encryption: [bindings].encryption_key resolves a # 32-byte high-entropy key through the secret registry (engine + key) and seals # each binding's HMAC secret in the bindings.secret column with AES-256- -# GCM (see docs/prds/binding-secret-encryption.md). When the key is absent, +# GCM. When the key is absent, # binding secrets are stored as plaintext (the pre-t2db.7 behaviour) -- enabling # encryption does not retroactively encrypt existing rows, which stay plaintext # until they are edited. Rotation: after changing encryption_key, retain the @@ -472,8 +468,8 @@ target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address arch # # Credential bindings map a Kit's credential@1 service name to a secret. A # binding alone grants nothing -- an identity resolves it only when its own -# org matches and the service is in its granted_credentials (see -# [[identities]] above). Once the State Store holds it, edit bindings in the +# org matches and the service is in its granted_credentials +# ([[identities]] above). Once the State Store holds it, edit bindings in the # dashboard (Settings, Advanced); a stored set replaces the file's. # [[containers.credentials]] # service = "openai" diff --git a/deployments/INSTRUCTIONS.md b/deployments/INSTRUCTIONS.md index b4c97fbb4..81a8d5468 100644 --- a/deployments/INSTRUCTIONS.md +++ b/deployments/INSTRUCTIONS.md @@ -4,8 +4,7 @@ This archive contains six linux/amd64 binaries: - **`archied`** — the resident daemon: polls your forge for assigned issues and dispatches them into sandboxed `archie-agent` containers. It serves no - dashboard: the web UI is `archie-ui`'s process (UI cutover, - `archie-core-8cda.5.4`). + dashboard: the web UI is `archie-ui`'s process. - **`archie-ui`** — serves the operator dashboard and the webhook capture receiver, dialing the Gateway and State Store gRPC contracts. Reads only `[services.*]`, `[web]` and `[capture]` from the shared `config.toml`. @@ -15,8 +14,7 @@ This archive contains six linux/amd64 binaries: - **`archie-messaging`** — serves the Telegram, email and webhook channels, dialing the Gateway for the chat contract and the State Store for the stored channel settings. `archied` runs no gateway for those channels, so without - this process they are simply absent — and nothing logs an error - (`archie-core-1c01`), which is why it has a unit of its own in + this process they are simply absent — and nothing logs an error, which is why it has a unit of its own in `deployments/systemd-user-service.md`. - **`archie-state-store`** — owns the task data in PostgreSQL behind a gRPC contract. `archied` and `archie-gateway` are gRPC clients of it, not diff --git a/deployments/README.md b/deployments/README.md index e9abce44f..404effa4c 100644 --- a/deployments/README.md +++ b/deployments/README.md @@ -49,8 +49,7 @@ serves the `ChatContract` gRPC API on the configured target. The State Store service (`archie-state-store`) owns the task data in the PostgreSQL database `database_url` names and serves the `StateStore` gRPC contract. BOTH `archied` and `archie-gateway` dial it via -`[services.state].target` and never open the task tables themselves -(`docs/prds/state-store-contract.md` §12 step 7). The templates set +`[services.state].target` and never open the task tables themselves. The templates set `[services.state]` accordingly: a host-only agent reaches a loopback bind (`127.0.0.1:9090`) with no token, while a container-mode agent needs the Docker bridge gateway address plus a matching bearer token (`target_token` / @@ -60,7 +59,7 @@ loopback. ## Running the dashboard The dashboard is served by the standalone UI Service (`archie-ui`), not by -`archied` (UI cutover, `archie-core-8cda.5.4`; `docs/prds/ui-service-boundary.md`). +`archied`. It reads the same `config.toml`, dials the Gateway and State Store targets already configured there, and binds `[web].listen` (`127.0.0.1:8484` by default). Start it after the Gateway and the State Store: @@ -120,7 +119,7 @@ curl -s http://127.0.0.1:9091/health/detailed # s A running State Store holds the `state-store` ownership lock on its database; `archied` and `archie-gateway` never open the task tables directly, so a second store process on the same `database_url` refuses to start, and a consumer that -opens the task tables indicates dual-store ownership (`docs/prds/state-store-contract.md` §12 step 7/8). +opens the task tables indicates dual-store ownership. The readiness probe is the single-writer check the runbook has against a degraded store: a `503` from `/health/detailed` means `archied` should be started only after the store is healthy. diff --git a/deployments/dev.toml b/deployments/dev.toml index 1ae68ae35..630952305 100644 --- a/deployments/dev.toml +++ b/deployments/dev.toml @@ -1,7 +1,7 @@ # Development overlay for `task dev` and `task dev:dashboard`. # # Match Vite's API/event proxy without changing the installed configuration. -# After the UI cutover (archie-core-8cda.5.4) the dashboard on :8484 is the +# The dashboard on :8484 is the # archie-ui process's listener, not archied's; this overlay is what both # `go run ./cmd/archied -config-overlay deployments/dev.toml` and # `go run ./cmd/archie-ui -config-overlay deployments/dev.toml` read. Only @@ -23,7 +23,6 @@ listen = "127.0.0.1:8484" # when a port is already taken on the host -- before the # listen key existed the collision could only be worked around by hand-writing # a matching target and passing -listen, and it read as a code fault. -# (docs/prds/state-store-contract.md §12 step 7). [services.state] target = "127.0.0.1:9091" listen = "127.0.0.1:9091" diff --git a/deployments/docker-nats-stack.toml b/deployments/docker-nats-stack.toml index 9cf521db8..67f8d92c1 100644 --- a/deployments/docker-nats-stack.toml +++ b/deployments/docker-nats-stack.toml @@ -25,7 +25,7 @@ database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable" target = "127.0.0.1:8585" # The State Store gRPC service owns the PostgreSQL task data; archied and -# archie-gateway dial it and never open those tables themselves (§12 step 7). +# archie-gateway dial it and never open those tables themselves. # This deployment runs the agent in containers, so target is the Docker bridge # gateway (172.17.0.1) the container can reach, with a matching target_token # that archie-state-store validates. Host-only agent: use 127.0.0.1:9090 with @@ -78,8 +78,7 @@ max_uptime = "60m" pull_policy = "missing" [web] -# Bound by the archie-ui process (the host-run dashboard after the UI -# cutover, archie-core-8cda.5.4); it dials the [services.*] targets above -- +# Bound by the archie-ui process; it dials the [services.*] targets above -- # the bridge-gateway State Store address works from the host too. listen = "127.0.0.1:8484" # Trust X-Forwarded-Proto when fronted by a reverse proxy (e.g. Traefik) diff --git a/deployments/local-ollama-standalone.toml b/deployments/local-ollama-standalone.toml index 533fb9982..e26aef9f3 100644 --- a/deployments/local-ollama-standalone.toml +++ b/deployments/local-ollama-standalone.toml @@ -21,7 +21,7 @@ database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable" target = "127.0.0.1:8585" # The State Store gRPC service owns the PostgreSQL task data; archied and -# archie-gateway dial it and never open those tables themselves (§12 step 7). +# archie-gateway dial it and never open those tables themselves. # Host-only deployment: the agent runs on the host, so the loopback target # 127.0.0.1:9090 needs no token. Start archie-state-store with the matching # `-listen 127.0.0.1:9090`. diff --git a/deployments/multi-forge-github-gitea.toml b/deployments/multi-forge-github-gitea.toml index da7630a8d..a23dacba0 100644 --- a/deployments/multi-forge-github-gitea.toml +++ b/deployments/multi-forge-github-gitea.toml @@ -17,7 +17,7 @@ database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable" target = "127.0.0.1:8585" # The State Store gRPC service owns the PostgreSQL task data; archied and -# archie-gateway dial it and never open those tables themselves (§12 step 7). +# archie-gateway dial it and never open those tables themselves. # This deployment runs the agent in containers, so target is the Docker bridge # gateway (172.17.0.1) the container can reach, with a matching target_token # that archie-state-store validates. Host-only agent: use 127.0.0.1:9090 with diff --git a/deployments/single-forge-github.toml b/deployments/single-forge-github.toml index eeccb3280..2755283bc 100644 --- a/deployments/single-forge-github.toml +++ b/deployments/single-forge-github.toml @@ -24,8 +24,8 @@ diff_cap_lines = 400 target = "127.0.0.1:8585" # The State Store gRPC service owns the PostgreSQL task data. archied and -# archie-gateway dial it here and never open those tables themselves -# (docs/prds/state-store-contract.md §12 step 7). This deployment runs the +# archie-gateway dial it here and never open those tables themselves. +# This deployment runs the # agent in containers, so the target must be the Docker bridge gateway address # (172.17.0.1) that the container can reach, and a non-loopback target requires # a matching target_token that archie-state-store validates -- start it with the diff --git a/deployments/systemd-user-service.md b/deployments/systemd-user-service.md index 70369204c..dca442798 100644 --- a/deployments/systemd-user-service.md +++ b/deployments/systemd-user-service.md @@ -19,7 +19,7 @@ The Gateway unit is `archie-gateway.service`, written by `install.sh` beside The State Store unit is `archie-state-store.service`. It owns the task data in PostgreSQL and serves the `StateStore` gRPC contract. BOTH `archied` and `archie-gateway` dial it via `[services.state].target` (see the `archied` -config below) and never open the task tables themselves (`docs/prds/state-store-contract.md` §12 step 7). A +config below) and never open the task tables themselves. A host-only agent uses the loopback bind with no token below; a container-mode agent needs the Docker bridge gateway address plus a bearer token via `--token`/`STATE_STORE_TOKEN` or `[services.state].target_token`, and a @@ -35,8 +35,7 @@ The Telegram, email and webhook channels are served by `archie-messaging`, not by `archied`, since the v1.30.0 extraction. `archied` starts no gateway for them and logs nothing when one is absent, so a host that updates across v1.30.0 without this unit runs on with dead channels and a daemon that looks perfectly -healthy -- that was `archie-core-1c01`, found after two days of a silently dead -Telegram bot. `install.sh` writes this unit on a fresh install; +healthy. `install.sh` writes this unit on a fresh install; `scripts/archie-update-install` refuses an update when a host is missing a unit and names what is missing, which now fires for a host that drifted or predates this release rather than the normal path. @@ -51,13 +50,12 @@ lines preserve that store-then-gateway order. ## 2. UI Service Unit (`~/.config/systemd/user/archie-ui.service`) -The dashboard is served by the standalone UI Service, not by `archied` -(UI cutover, `archie-core-8cda.5.4`). It reads the same `config.toml`, dials +The dashboard is served by the standalone UI Service, not by `archied`. It reads the same `config.toml`, dials the Gateway and State Store targets already in it, and binds `[web].listen`. A non-loopback bind requires a dashboard token (`-token`, or `-token-file` to mint and persist one); -**Auth note (deliberate design, `archie-core-8cda.5.5`):** unlike `archied`, +**Auth note:** unlike `archied`, `archie-ui` has no secret registry — it resolves `GATEWAY_TOKEN` and `STATE_STORE_TOKEN` from its **process environment only** (or from the `target_token` values in `config.toml`). Whatever starts `archie-ui` is @@ -193,8 +191,8 @@ fall back to a host model loop. ## 6. Pinning the archie-agent Image `ghcr.io/samcharles93/archie-agent:latest` is a moving target: every push to -`main` that touches the runtime's package closure re-publishes it (see -`.github/workflows/deploy.yml`), so `latest` can change under a running +`main` that touches the runtime's package closure re-publishes it +(`.github/workflows/deploy.yml`), so `latest` can change under a running deployment with no warning and no way to reproduce a prior build. As of this writing, `archie-agent` has **no published semantic-version tag** diff --git a/examples/eda-playbooks/bug-tdd.yaml b/examples/eda-playbooks/bug-tdd.yaml index aa682a796..138387803 100644 --- a/examples/eda-playbooks/bug-tdd.yaml +++ b/examples/eda-playbooks/bug-tdd.yaml @@ -8,7 +8,7 @@ # # This file is the workflow playbook shape: exactly one action, position: # workflow. Action playbooks (one or more module actions) load and type-check -# but do not execute yet -- see docs/prds/multi-action-playbooks.md. +# but do not execute yet. # # A trigger matches on either axis, and both are checked when both are given: # @@ -21,8 +21,7 @@ # issue. This is the axis an instance defines for itself: it binds # your own taxonomy to a workflow with no code change. See # label-trigger.yaml. The `when` condition is a CEL -# expression over `event` -- see docs/prds/eda-playbook-engine.md, resolved -# open question 1. +# expression over `event`. # # A matching playbook decides the task's workflow ahead of the kind/label # binding files, and a workflow it names that is not defined parks the task diff --git a/examples/skills/archie-wf-frontend/SKILL.md b/examples/skills/archie-wf-frontend/SKILL.md index bf5e7b9e1..31c8f7539 100644 --- a/examples/skills/archie-wf-frontend/SKILL.md +++ b/examples/skills/archie-wf-frontend/SKILL.md @@ -29,7 +29,7 @@ Both must exit 0. If either fails, the stage parks with the lint output. ## How to use in your project -1. Copy `.agents/skills/archie-wf-frontend/` into your repo +1. Copy this skill directory into your skills directory 2. Add to your daemon config gate: ```toml gate = [ diff --git a/examples/workflows/firewall-contain.yaml b/examples/workflows/firewall-contain.yaml index 23507bd4c..7a8fd8c6e 100644 --- a/examples/workflows/firewall-contain.yaml +++ b/examples/workflows/firewall-contain.yaml @@ -2,8 +2,7 @@ # firewall-investigate (workflow.call, wait: true) hands its findings upward # from its declared summary, and this workflow's own agent stage decides and # records the containment as its own declared outputs. Paste it into the -# dashboard's workflow definitions alongside firewall-investigate -# (docs/prds/workflow-call-outputs.md). +# dashboard's workflow definitions alongside firewall-investigate. id: firewall-contain repository: none profile: network-investigator diff --git a/examples/workflows/firewall-investigate.yaml b/examples/workflows/firewall-investigate.yaml index 81d579ae0..dbe799a53 100644 --- a/examples/workflows/firewall-investigate.yaml +++ b/examples/workflows/firewall-investigate.yaml @@ -5,7 +5,7 @@ # # Its declared output (summary) is offered to the agent stages as a capture # tool named after it; a wait:true caller publishes it as one of its own -# outputs (docs/prds/workflow-call-outputs.md). +# outputs. id: firewall-investigate repository: none profile: network-investigator diff --git a/install.sh b/install.sh index 10918d8cb..71d188512 100755 --- a/install.sh +++ b/install.sh @@ -175,7 +175,7 @@ echo "==> Building native archie binaries..." # derived from whatever tags a local checkout happens to have. Deriving it # here made a source-built host claim a release it was not running, and made # the stamp a function of the commit graph, which is the one input a - # content-checksum build cache cannot see (archie-core-pdq2). A source build + # content-checksum build cache cannot see. A source build # says `dev`; its traceability is the checkout it came from. GATEWAY_VERSION="dev" RUNTIME_VERSION="dev" @@ -183,14 +183,14 @@ echo "==> Building native archie binaries..." LDFLAGS="${LDFLAGS} -X github.com/samcharles93/archie-core/internal/app/archied.runtimeVersion=${RUNTIME_VERSION}" LDFLAGS="${LDFLAGS} -X github.com/samcharles93/archie-core/internal/installtype.buildType=binary" # Every host binary carries the release it was built from, so the updater can - # ask each installed binary what it is (archie-core-k94o). + # ask each installed binary what it is. LDFLAGS="${LDFLAGS} -X github.com/samcharles93/archie-core/internal/buildinfo.Version=${GATEWAY_VERSION}" LDFLAGS="${LDFLAGS} -X github.com/samcharles93/archie-core/internal/buildinfo.Runtime=${RUNTIME_VERSION}" # archied does not run alone: the State Store owns the task data, the Gateway # serves the chat contract, the dashboard is its own process, and the # Messaging Service owns the chat channels. Building only archied leaves it # unable to boot, and omitting archie-messaging leaves the Telegram, email and - # webhook channels dead with no error anywhere (archie-core-1c01). This list, + # webhook channels dead with no error anywhere. This list, # the zip's two lists and the two in scripts/archie-update-install must agree; # TestDistZipShipsEveryHostCommand fails when they do not. for cmd in archied archie-gateway archie-state-store archie-ui archie-messaging archie-playbooks; do @@ -426,7 +426,7 @@ if [ "${INSTALL_SYSTEMD}" = true ] && command -v systemctl &>/dev/null && [ -d " # Every service this installer builds gets a unit, with the contents the # runbook used to tell an operator to paste by hand. The runbook is a # description now, not the mechanism: a fresh install must not need four - # hand-written units before its own updater will run (archie-core-enow), and + # hand-written units before its own updater will run, and # the contents must not live in two places to drift apart. cat < "${SYSTEMD_USER_DIR}/archied.service" [Unit] @@ -505,7 +505,7 @@ WantedBy=default.target EOF # The Telegram, email and webhook channels run here, not in archied: without - # this unit a host looks healthy while its channels are dead (archie-core-1c01). + # this unit a host looks healthy while its channels are dead. cat < "${SYSTEMD_USER_DIR}/archie-messaging.service" [Unit] Description=Archie Messaging Service diff --git a/tools/webhook-send.sh b/tools/webhook-send.sh index 9ba4508de..7f7a4688c 100755 --- a/tools/webhook-send.sh +++ b/tools/webhook-send.sh @@ -4,7 +4,7 @@ # # capture (default) POST /webhooks/capture/{source} on the dashboard # listener. Token-free, stores the redacted event for -# the Event inspector (docs/prds/event-capture-storage.md). +# the Event inspector. # Proves the capture -> inspector half of the Events chain. # # forge (--forge) POST to [forge].webhook_addr (default port 8645; the