The Unified starintel api gateway, with eventing and actors.
  • Common Lisp 80.4%
  • Emacs Lisp 7.1%
  • Python 4.7%
  • Prolog 3%
  • Shell 1.9%
  • Other 2.9%
Find a file
nsaspy 1ac298b797
Some checks failed
Docstring coverage / doc-coverage (push) Failing after 53s
Merge pull request #190 from lost-rob0t/fix/189-release-terminal-bulk-payloads
Release terminal bulk job request payloads
2026-09-16 10:05:28 -04:00
.forgejo/workflows docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -04:00
.github/workflows Install pinned YAML parser for deployment contract tests 2026-09-16 01:54:27 -04:00
.opencode chore: add YAGNI issue voter 2026-09-14 11:12:05 -04:00
.prolog Release terminal bulk job request payloads 2026-09-16 09:56:30 -04:00
addons/bixby fix: default Bixby operations to canonical target scope 2026-08-25 23:29:25 -04:00
cli feat: contract versioned document operations + fix /dataset-size shadowing 2026-09-08 17:27:10 -04:00
doc Regenerate bulk job API reference 2026-09-16 09:59:50 -04:00
docker fix: apply STAR_TENANT_* from runtime env in server init (#180) 2026-09-14 14:09:47 -04:00
docs Wire persistent Prolog shard actor into existing actor deployment 2026-09-16 01:51:50 -04:00
example_configs leases: wire the Valkey lease store into the runtime with the observability metrics hook 2026-09-11 04:33:21 -04:00
ideas add files as is 2024-04-14 21:04:31 -04:00
nix Implement Valkey lease store backend with integration tests 2026-08-07 19:28:26 -04:00
rage docs: per-run integration provisioning decision (operator convention) 2026-09-09 08:14:44 -04:00
schema chore(schema): pin merged operation 0.9.1 canonical contract 2026-09-11 01:05:55 -04:00
scripts fix: treat running no-healthcheck containers as healthy in stack wait 2026-09-14 12:30:22 -04:00
source Release terminal bulk job request payloads 2026-09-16 09:56:30 -04:00
t Release terminal bulk job request payloads 2026-09-16 09:56:30 -04:00
tests Wire persistent Prolog shard actor into existing actor deployment 2026-09-16 01:51:50 -04:00
ui docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -04:00
.env.example docs(auth): expose first-run user settings 2026-08-11 23:59:29 -04:00
.envrc remove old settings 2024-10-20 20:43:55 -04:00
.gitignore chore: track .prolog verification and KB state 2026-09-14 11:51:05 -04:00
AGENTS.md agents: require StarIntel schema lock preflight 2026-09-14 13:55:25 -04:00
client-test.el feat: rewrite emacs client as async contract layer with ERT suite 2026-08-29 06:41:02 -04:00
client.el feat: rewrite emacs client as async contract layer with ERT suite 2026-08-29 06:41:02 -04:00
docker-compose.yml Wire persistent Prolog shard actor into existing actor deployment 2026-09-16 01:51:50 -04:00
DOCKER.md Implement Valkey lease store backend with integration tests 2026-08-07 19:28:26 -04:00
flake.lock fix: consume corrected operation runtime and refresh API docs 2026-09-11 01:05:55 -04:00
flake.nix observability: StarIntel telemetry abstraction + OTLP instrumentation 2026-09-10 22:41:32 -04:00
launch.sh launch script. defaults to ./init.lisp 2026-01-08 18:35:08 -05:00
LICENSE add make file and readme/legal 2024-04-15 11:17:08 -04:00
Makefile Wire persistent Prolog shard actor into existing actor deployment 2026-09-16 01:51:50 -04:00
qlfile Implement Valkey lease store backend with integration tests 2026-08-07 19:28:26 -04:00
qlfile.lock fix: consume corrected operation runtime and refresh API docs 2026-09-11 01:05:55 -04:00
README.org feat: contract versioned document operations + fix /dataset-size shadowing 2026-09-08 17:27:10 -04:00
starintel-bixby.asd Add optional StarIntel Bixby add-on system 2026-08-24 13:42:15 -04:00
starintel-gserver-integration-tests.asd test: load public API integration coverage 2026-08-24 02:49:51 -04:00
starintel-gserver-tests.asd feat: inject tenant_id server-side before MQ/DB and redact it on egress (#180) 2026-09-14 14:00:04 -04:00
starintel-observability.asd observability: StarIntel telemetry abstraction + OTLP instrumentation 2026-09-10 22:41:32 -04:00
tasks.org add project task file 2026-01-20 12:16:01 -05:00
test-api.sh add API endpoint test script 2026-01-12 22:01:00 -05:00
test-http-api.sh test: add HTTP API test suite 2026-01-20 12:27:35 -05:00
TODO.org fix star-cli 2026-02-08 16:13:53 -05:00
ui-client.el feat(clients): add Emacs API clients 2026-01-20 12:27:40 -05:00

StarIntel Server

StarIntel Server

StarIntel Server is the Common Lisp runtime for storing, routing, querying, and recursively enriching StarIntel documents.

It combines:

  • CouchDB for durable documents, views, and full-text search.
  • RabbitMQ topic exchanges for document and actor traffic.
  • Sento actors for local concurrency, supervision boundaries, timers, and message passing.
  • A Ningle/Clack/Hunchentoot HTTP API.
  • The star-cl document library and StarIntel specification adapters.
  • Nix-built binaries, tests, and container images.

This repository is an experimental operator system, not a hardened public SaaS service.

Do not expose the HTTP API or RabbitMQ directly to the public Internet.

The HTTP API currently has no authentication or authorization and sends Access-Control-Allow-Origin: *. Put it behind an authenticated reverse proxy, restrict network access, and treat the Lisp init file as trusted executable code.

Position in the Quasar / StarIntel stack

StarIntel Server is a backend service layer. It is not the Quasar browser UI and it is not replaced by quasar-ui.

The intended deployment split is:

quasar-ui
  browser UI / graph renderer / standalone subset
        |
        | typed commands, projections, capability discovery
        v
quasar
  canonical Common Lisp control plane/runtime
        |
        | StarIntel service APIs and adapters
        v
starintel-server
  persistent ingest / storage / search / routing / RabbitMQ
        |
        +-----------------------------+
        |                             |
        v                             v
star-bbpd                       other actor services
  external recon actors          collectors / analyzers / tools

Responsibilities are intentionally separated:

  • quasar-ui owns browser presentation, mobile/PWA behavior, Cytoscape rendering, browser-local standalone workspaces, and browser-safe bounded actions.
  • quasar owns the canonical Common Lisp command/control boundary for migrated durable Quasar operations, persistent runtime supervision, privileged local integrations, reconnect/replay, and capability discovery.
  • starintel-server owns the persistent StarIntel backend responsibilities implemented here: document ingest, CouchDB persistence/querying, RabbitMQ document/actor routing, HTTP service boundaries, and recursive dataflow.
  • star-bbpd and similar repositories are external actor services. BBPD consumes actor-specific RabbitMQ targets, runs Subfinder, Nmap, Httpx, Katana and DNS workflows, and publishes derived StarIntel documents and relations.

A connected Quasar UI may expose controls and results for server/external services, but that does not make those capabilities browser implementations. The UI should discover which runtime/service capabilities are actually available.

Standalone quasar-ui remains valid without this server. That mode is a bounded subset and must not be documented as feature-equivalent to a connected StarIntel deployment.

What the server does

A document normally moves through this pipeline:

HTTP/client/actor
      |
      v
documents.ingest.<dtype>
      |
      v
CouchDB insert + _id/_rev enrichment
      |
      v
documents.new.<dtype>
      |
      +--> local actor via TELL
      +--> remote actor via RabbitMQ topic route
      +--> derived documents and relations
                 |
                 +--> documents.ingest.<dtype>  (durable recursion)
                 `--> documents.new.<dtype>     (event-only fan-out)

Actors can emit more StarIntel documents, relations, targets, and actor events. Those outputs can trigger more actors. This is dataflow recursion: the graph expands through messages rather than recursive function calls.

Quick start: Nix-built Compose stack

Requirements: Nix with flakes, Docker Engine, Docker Compose v2, curl, jq, and openssl.

cp .env.example .env
install -d -m 0700 secrets
openssl rand -base64 32 > secrets/couchdb_password
openssl rand -base64 48 > secrets/couchdb_secret
openssl rand -hex 24 | tr '[:lower:]' '[:upper:]' > secrets/erlang_cookie
openssl rand -base64 32 > secrets/rabbitmq_password
openssl rand -base64 32 > secrets/valkey_password
chmod 0600 secrets/*

nix run .#load-images
docker compose up --detach --wait
curl --fail http://127.0.0.1:5000/health

Default local endpoints:

Service Address
StarIntel HTTP API http://127.0.0.1:5000
CouchDB http://127.0.0.1:5984
RabbitMQ AMQP 127.0.0.1:5672
RabbitMQ management http://127.0.0.1:15672
Valkey 127.0.0.1:6379

See DOCKER.md for image builds, secrets, persistence, migration, backup, FTS, and upgrades.

Submit a document

The body must contain a dtype. The route chooses the RabbitMQ routing key but does not currently inject or validate the body dtype.

curl --fail \
  --header 'Content-Type: application/json' \
  --request POST \
  --data '{
    "_id": "example-note",
    "dataset": "demo",
    "dtype": "note",
    "sources": ["manual"],
    "version": "0.8.0",
    "dateAdded": 0,
    "dateUpdated": 0,
    "content": "first document"
  }' \
  http://127.0.0.1:5000/new/document/note

The API acknowledges queue publication, not CouchDB persistence. Read the document after the ingest consumer has processed it:

curl --fail http://127.0.0.1:5000/document/example-note | jq

Build and test

nix build
nix run .#star-unit-tests

With CouchDB and RabbitMQ available:

nix run .#star-integration-tests

Full Nix image, health, FTS, restart, and persistence test:

./scripts/stack-test.sh

See doc/testing.md.

Run from Common Lisp

The pinned Nix build is the supported reproducible path. For interactive development:

nix develop
sbcl --load run.lisp

Build the executable:

nix build
./result/bin/star-server start --init ./example_configs/init.lisp

The executable accepts:

star-server start -i PATH
star-server start --init PATH

The same path can be supplied through STAR_SERVER_INIT_FILE.

Documentation map

Document Contents
doc/index.org Documentation index and implementation status
doc/architecture.org Runtime structure, startup order, concurrency, and repository layout
doc/actors.org Creating, registering, targeting, scheduling, and operating actors
doc/messaging.org RabbitMQ exchanges, queues, routing keys, recursion, delivery, and loop control
doc/document-spec.org StarIntel 0.9 and legacy 0.8 documents, types, relations, IDs, metadata, and provenance
doc/configuration.org Environment, init files, secrets, advanced examples, and tuning
doc/http-api-docs.org HTTP endpoint reference and examples
doc/lease-store-usage.org Backend-neutral target lease protocol examples and lifecycle
DOCKER.md Nix-built container stack and operations
doc/testing.md Unit, integration, and stack tests

Runtime status

The documentation distinguishes three states:

  • Active: loaded by source/starintel-gserver.asd and started by star::main.
  • Present but not active: code exists in the repository but is not loaded by the ASDF system or is not started by the current startup path.
  • Stub/experimental: API or actor code exists but is incomplete.

Important current limits:

  • HTTP ingestion does not enforce the strict StarIntel 0.9 schema.
  • The server still uses legacy flat 0.8 constructors in parts of the actor code.
  • source/actor-systems/user-finder.lisp and user-hunt.lisp are not loaded by the ASDF system.
  • The matcher actor framework is experimental; the URL extractor is loaded, but a complete global pattern-dispatch loop is not wired.
  • /new/event/:id is a stub.
  • *http-api-base-path* and the HTTP certificate/key variables are not applied by start-http-api.

These are documented facts, not supported guarantees.

API documentation

The exported API of every package is documented where it is defined: as org-mode markup inside Common Lisp docstrings. Render it into Org files under doc/api/ with:

make docs-api        # = nix run .#gen-api-docs

This runs the org-doc extractor against the loaded starintel-gserver image and regenerates doc/api/index.org plus one file per package. Docstring coverage is printed at the end of the run so undocumented symbols are visible.

In Emacs, install the sly-org-doc package (from the org-doc repo) to see docstring summaries in the echo area while typing (SLY and SLIME), and C-c C-d C-o to open the full Org docstring of the symbol at point, fontified and live.

License

See LICENSE.