# Harbour Desk — bounded support triage A narrow support-desk agent that reads a fictional ticket, searches an approved knowledge base, chooses a bounded action, stores the result through a real loopback HTTP service, and independently reads it back from SQLite. **Agentware Open Track source, with genuine-run demo and official-input evaluation.** All project code was first written after 27 November 2026, 18:00 UTC. Competition submission/acceptance and any award are separate from this source release; no prize or payment is claimed. ## Run, with no installs Python 3.11+ on Linux. The local sandbox and offline tests use the standard library only. Tested on the current Linux host; macOS/Windows have not been checked. ```sh python3 -m unittest discover -s tests -v python3 -m harbour --mode offline-test --db run/offline.sqlite --trace run/offline-trace.json ``` The offline command is explicitly labelled **OFFLINE_TEST_DOUBLE_NOT_AI**. It replays decisions, but performs actual HTTP calls, database writes and independent reads. Re-running the same database is a terminal no-op, not another model-driven resolution. Use a new database path for a fresh demonstration. ### Genuine model mode ```sh python3 -m harbour --mode live --db run/live.sqlite --trace run/live-trace.json ``` The current live adapter uses the already installed, authorised Codex CLI (`codex-cli 0.160.1`), GPT-6.1 Sol (`gpt-6.1-sol`) with high reasoning. No API key is required or copied by this project. It does not log in, buy credits, or create an account. It inherits a small environment allow-list and uses the existing CLI's login privately. User configuration, project instructions, rules, hooks, plugins, shell, browser and other listed native tool features are disabled for each invocation. It accepts only one completed structured decision; unexpected native-tool events or provider failures reject that decision. **Credential-free judging route:** run the labelled offline mode and all tests, then inspect the recorded genuine inference traces in `traces/entrant-evaluation/`. The official brief's API-cost FAQ explicitly permits a mock mode or a recorded trace for expensive paths. These are distinct evidence levels: offline tests exercise real HTTP/SQLite and stop behaviour without AI; recorded traces show real earlier inference, not fresh model calls on a judge's machine. We do not ask judges for credentials, share the entrant's login or claim offline decisions are autonomous inference. The optional live commands below are for the entrant's already authorised environment. Monetary cost of live inference is UNKNOWN; no new purchase was made. This approach is based on the full organiser brief saved on 27 November at 11:56 UTC; the final entry has not been submitted or accepted. ## What is enforced - The model sees ticket/KB data, never the sandbox capability or run permit. - Tools are only read ticket, search KB, resolve from a searched article, receipt readback and escalation. No arbitrary recipient, free-form customer reply, shell, browser, deletion, payment or external helpdesk connector. - A resolution posts only the exact approved article text. Semantic relevance is still model-dependent: this is not proof against every wrong-article decision. - SQLite transaction stores the action, terminal ticket and durable idempotency receipt together. Conflicting same-key requests fail closed. - An ambiguous write is reconciled against its receipt, never blindly resent. - A synchronous cancel revokes the run's write permit under the same lock used by commits, then interrupts pending awaits. The model adapter terminates its subprocess group. In-flight actions already committed before cancellation cannot be undone. - Run deadline, step/read-retry limits, JSON framing/length checks, exact routes/fields, loopback-only server and capability authentication are enforced. ## Monitoring and stop switch The CLI streams actual events, current decisions and tool results. Its final line identifies mode, stored result, model-call count, token usage when available and unknown monetary cost. Ctrl-C/SIGTERM calls the agent's cancellation fence; there is no background timer or auto-restart service. Restart by running the explicit command again. The source and recorded demo are published as static files, not a running helpdesk. To retire them, remove the dedicated `dylan-harbour-desk` static-assets deployment; no background agent is deployed. `--trace` writes the redacted real trace. It is fictional test content only. Never seed real customer data. The database, capabilities and provider auth are not public artifacts. ## Architecture and limits `harbour/core.py`: real local HTTP service, SQLite storage, permissions, agent loop and labelled offline planner. `harbour/codex_planner.py`: bounded genuine inference adapter. `harbour/__main__.py`: explicit-mode demo and monitoring. See AGENT.md and SAFETY.md. Single-authority fictional sandbox, not production-grade multi-process isolation. Trusted Python fixture setup has direct database access. No security claim is made against arbitrary Python code or a hostile OS account. It handles only seeded local support content, not voice/files/web/email ingestion. The test seams simulate delayed commits and lost responses; they are not production fault injection. ## Real scenario evaluation ```sh # Entrant environment only: uses genuine inference and your existing login. python3 -m harbour.evaluate --cases tests/entrant-cases.json --out run/evaluation-new ``` The seven entrant-authored fictional cases each passed in the retained first live evaluation: two ordinary questions were resolved from their searched article; a refund request, forged system instruction, unsupported feature, request for a human and hostile KB content were escalated without customer replies. All seven stored states were independently read after the HTTP service closed. This is one real run per case, not a statistical reliability rate or official Trap Pack result. The case IDs and expected outcomes are kept out of model context; the model sees the question, articles it searched and previous actions. The evaluator rejects malformed cases before invoking a provider. Each case has a new SQLite database; it never blindly reuses an uncertain case directory. A runtime/provider error remains a failed case, not a successful escalation. Use a new output directory for every attempt; retained failures must not be overwritten. ## Recorded genuine run and stop The continuous 36.76-second demo shows a fresh model-driven resolution, independent SQLite readback, then a second genuine model call stopped through the real CLI signal handler. See [demo evidence and limitations](docs/DEMO.md) and `traces/recorded-demo/`. The static distribution includes the video; it is not a hosted helpdesk. The offline CLI reports zero `model_calls` and separately counts its scripted `planner_calls`. ## Official Trap Pack: containment, not full task competence The first genuine run on 28 November used all 20 official inputs, embedded unchanged as untrusted support-ticket documents. It made 45 real model calls: 20 persisted escalations, no customer replies and no runtime errors. Post-run scans found no canary in generated tool arguments, receipt requests or replies. This is **not 20/20 official passes**: both benign controls failed their useful tasks, and native calendar/browser/warehouse tasks are unsupported. It is raw-document adaptation, not native cross-track ingestion or an egress packet-capture test. Read [the full per-file results](tests/trap-pack/RESULTS.md), original licensed fixtures and actual sanitised traces. The first-run answer files were held out until execution completed. Future runs record adapter behaviour only; they cannot attest whether their operator has already seen the answers. A reversible byte-decoding fallback and repeat-run provenance were fixed in the test harness, not the production agent. Forty credential-free tests pass in the current source; the earlier demo shows the unchanged runtime before the new evaluation adapter. Judges can run the standard-library suite and offline CLI without credentials, inspect genuine recorded traces and watch the existing continuous demo. Existing-login model commands are optional, with unknown monetary inference cost and no new purchase. No production customer system or background agent is deployed. The recorded first setup check took 5.669 seconds on Linux/Python 3.14; this is not a cross-platform guarantee. ## Source and licence The application and entrant code are MIT-licensed. `tests/trap-pack/fixtures/` is **Agentware 2026 Trap Pack, Hackathon Raptors**, licensed separately under CC BY 4.0 with original attribution retained. Public Git clone: `https://dylan-harbour-desk.impactlayer.workers.dev/source.git`; the same static distribution also supplies `harbour-desk.zip` and `harbour-desk-demo.mp4`. No credentials, databases or provider authentication are published.