The Unified starintel api gateway, with eventing and actors.
  • Common Lisp 82%
  • Emacs Lisp 8.2%
  • Python 5.1%
  • Shell 2%
  • Nix 1.9%
  • Other 0.7%
Find a file
nsaspy 4721efaf81
Some checks failed
Docstring coverage / doc-coverage (push) Failing after 1m7s
Merge pull request #145 from lost-rob0t/fix/target-dispatch-data-shape
fix: emit v0.9-valid data.*-shaped target documents from both routes
2026-09-06 20:00:59 -04:00
.forgejo/workflows docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -04:00
.github/workflows docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -04:00
addons/bixby fix: default Bixby operations to canonical target scope 2026-08-25 23:29:25 -04:00
cli docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -04:00
doc docs: consolidate manual docs and generated API into doc/ 2026-09-06 14:56:00 -04:00
docker Fix admin CLI Compose secret-file resolution (#113) 2026-08-24 04:57:50 -04:00
example_configs docs: make public mode explicit in init example 2026-08-24 04:31:59 -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
schema Lock server to canonical research-node schema 2026-07-28 02:49:46 -04:00
scripts docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -04:00
source fix: emit v0.9-valid data.*-shaped target documents from both routes 2026-09-06 19:59:07 -04:00
t fix: emit v0.9-valid data.*-shaped target documents from both routes 2026-09-06 19:59:07 -04:00
tests fix: emit v0.9-valid data.*-shaped target documents from both routes 2026-09-06 19:59:07 -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 docs: org docstrings in source + org-doc API rendering pipeline 2026-09-06 10:19:18 -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 merge: refresh issue #31 Valkey backend onto canonical master 2026-08-16 10:22:48 -04:00
DOCKER.md Implement Valkey lease store backend with integration tests 2026-08-07 19:28:26 -04:00
flake.lock docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -04:00
flake.nix docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -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 docs: document all 835 exported symbols; doc-coverage CI gate 2026-09-06 12:58:43 -04:00
qlfile Implement Valkey lease store backend with integration tests 2026-08-07 19:28:26 -04:00
qlfile.lock feat: enforce canonical v0.9 runtime boundaries 2026-08-25 02:30:46 -04:00
README.org docs: consolidate manual docs and generated API into doc/ 2026-09-06 14:56:00 -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 fix: preserve master test manifest during merge 2026-09-06 06:47:11 -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.
  • The second /dataset-size route definition replaces or shadows the first, depending on Ningle route behavior.

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.