Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
27a609b
Integrate Habitat runtime: add habitat/__init__.py
buttercode101 Nov 11, 2026
c61521d
Integrate Habitat runtime: add habitat/__main__.py
buttercode101 Nov 11, 2026
0411219
Integrate Habitat runtime: add habitat/adapters.py
buttercode101 Nov 11, 2026
929afaa
Integrate Habitat runtime: add habitat/anchor.py
buttercode101 Nov 11, 2026
0c72030
Integrate Habitat runtime: add habitat/backup.py
buttercode101 Nov 11, 2026
2ea3507
Integrate Habitat runtime: add habitat/claims.py
buttercode101 Nov 11, 2026
441087c
Integrate Habitat runtime: add habitat/config.py
buttercode101 Nov 11, 2026
e697c2a
Integrate Habitat runtime: add habitat/doctor.py
buttercode101 Nov 11, 2026
00896be
Integrate Habitat runtime: add habitat/events.py
buttercode101 Nov 11, 2026
b48eb4d
Integrate Habitat runtime: add habitat/generate.py
buttercode101 Nov 11, 2026
e21639d
Integrate Habitat runtime: add habitat/identity.py
buttercode101 Nov 11, 2026
97c5cbc
Integrate Habitat runtime: add habitat/otel.py
buttercode101 Nov 11, 2026
fb78107
Integrate Habitat runtime: add habitat/policy.py
buttercode101 Nov 11, 2026
bb5d016
Integrate Habitat runtime: add habitat/policy_presets.py
buttercode101 Nov 11, 2026
830b503
Integrate Habitat runtime: add habitat/proof.py
buttercode101 Nov 11, 2026
299d2b5
Integrate Habitat runtime: add habitat/proof_card.py
buttercode101 Nov 11, 2026
13225a6
Integrate Habitat runtime: add habitat/proof_sign.py
buttercode101 Nov 11, 2026
77397f5
Integrate Habitat runtime: add habitat/proof_ui.py
buttercode101 Nov 11, 2026
3ee55a9
Integrate Habitat runtime: add habitat/proof_verify.py
buttercode101 Nov 11, 2026
7a99ef1
Integrate Habitat runtime: add habitat/runtime.py
buttercode101 Nov 11, 2026
ddf1b5f
Integrate Habitat runtime: add habitat/schema.py
buttercode101 Nov 11, 2026
01b8c44
Integrate Habitat runtime: add habitat/server.py
buttercode101 Nov 11, 2026
587ef93
Integrate Habitat runtime: add habitat/signals.py
buttercode101 Nov 11, 2026
6c390af
Integrate Habitat runtime: add habitat/store.py
buttercode101 Nov 11, 2026
a004512
Integrate Habitat runtime: add habitat/trust.py
buttercode101 Nov 11, 2026
209b034
Integrate Habitat runtime: add habitat/verdicts.py
buttercode101 Nov 11, 2026
8e35d30
Integrate Habitat runtime: add habitat/verify.py
buttercode101 Nov 11, 2026
5f95a10
Integrate Habitat runtime: add habitat/verify_api.py
buttercode101 Nov 11, 2026
29a09d9
Integrate Habitat read-only evidence bridge
buttercode101 Nov 11, 2026
a4cb7d5
Connect AgentScope dashboard to Habitat evidence runtime
buttercode101 Nov 11, 2026
493ef8e
Package Habitat runtime within AgentScope distribution
buttercode101 Nov 11, 2026
5a0a064
Expand configured Habitat database path
buttercode101 Nov 11, 2026
9b2bb45
Document AgentScope and Habitat integration boundaries
buttercode101 Nov 11, 2026
ae80020
Test read-only Habitat evidence bridge
buttercode101 Nov 11, 2026
9270ae4
Add optional Habitat database source configuration
buttercode101 Nov 11, 2026
c4be7e7
Document optional Habitat evidence runtime in AgentScope
buttercode101 Nov 11, 2026
c71bb9d
Import Habitat regression suite: tests/test_action_ledger_bootstrap.py
buttercode101 Nov 11, 2026
0ce25a2
Import Habitat regression suite: tests/test_adapters_security.py
buttercode101 Nov 11, 2026
8617a2f
Import Habitat regression suite: tests/test_anchor.py
buttercode101 Nov 11, 2026
d01f389
Import Habitat regression suite: tests/test_claims.py
buttercode101 Nov 11, 2026
e42ad76
Import Habitat regression suite: tests/test_cli_proof_export.py
buttercode101 Nov 11, 2026
3a7f4f5
Import Habitat regression suite: tests/test_event_security.py
buttercode101 Nov 11, 2026
e98de98
Import Habitat regression suite: tests/test_generate.py
buttercode101 Nov 11, 2026
ec7530d
Import Habitat regression suite: tests/test_habitat.py
buttercode101 Nov 11, 2026
6a04c1a
Import Habitat regression suite: tests/test_hardening.py
buttercode101 Nov 11, 2026
846a32d
Import Habitat regression suite: tests/test_identity.py
buttercode101 Nov 11, 2026
970ca29
Import Habitat regression suite: tests/test_identity_signing.py
buttercode101 Nov 11, 2026
1a007af
Import Habitat regression suite: tests/test_ledger_integrity_deep.py
buttercode101 Nov 11, 2026
27e6d28
Import Habitat regression suite: tests/test_otel.py
buttercode101 Nov 11, 2026
bfce387
Import Habitat regression suite: tests/test_policy.py
buttercode101 Nov 11, 2026
e1f5f26
Import Habitat regression suite: tests/test_policy_future.py
buttercode101 Nov 11, 2026
86915df
Import Habitat regression suite: tests/test_proof_sign.py
buttercode101 Nov 11, 2026
9950a6d
Import Habitat regression suite: tests/test_proof_ui.py
buttercode101 Nov 11, 2026
774d7a8
Import Habitat regression suite: tests/test_proof_verify.py
buttercode101 Nov 11, 2026
20272d5
Import Habitat regression suite: tests/test_security_regressions.py
buttercode101 Nov 11, 2026
8451a82
Import Habitat regression suite: tests/test_standalone_verifier.py
buttercode101 Nov 11, 2026
0b90d77
Import Habitat regression suite: tests/test_trust.py
buttercode101 Nov 11, 2026
87b0c86
Import Habitat regression suite: tests/test_v04.py
buttercode101 Nov 11, 2026
a77461c
Import Habitat regression suite: tests/test_v05.py
buttercode101 Nov 11, 2026
7c09de4
Import Habitat regression suite: tests/test_v06.py
buttercode101 Nov 11, 2026
97f4c46
Import Habitat regression suite: tests/test_v10_release.py
buttercode101 Nov 11, 2026
24fab8e
Import Habitat regression suite: tests/test_verification_policy_gate.py
buttercode101 Nov 11, 2026
56540e5
Import Habitat regression suite: tests/test_verify_api.py
buttercode101 Nov 11, 2026
0e9dade
Import Habitat regression suite: tests/test_web_artifacts.py
buttercode101 Nov 11, 2026
64d87d1
Import Habitat runtime resources: examples/README.md
buttercode101 Nov 11, 2026
f3826d5
Import Habitat runtime resources: examples/agentscope_source.md
buttercode101 Nov 11, 2026
e6c1619
Import Habitat runtime resources: examples/fixtures/sample_proof.json
buttercode101 Nov 11, 2026
b5e2a88
Import Habitat runtime resources: examples/full_proof_flow.py
buttercode101 Nov 11, 2026
ccfc82f
Import Habitat runtime resources: examples/generate_sample_proof.py
buttercode101 Nov 11, 2026
c759cef
Import Habitat runtime resources: examples/hermes_bridge.py
buttercode101 Nov 11, 2026
a3f1938
Import Habitat runtime resources: examples/hermes_hmac_adapter.py
buttercode101 Nov 11, 2026
5b86344
Import Habitat runtime resources: examples/hermes_post_action.sh
buttercode101 Nov 11, 2026
02e9e35
Import Habitat runtime resources: examples/otel_bridge.py
buttercode101 Nov 11, 2026
c2a6fc1
Import Habitat runtime resources: examples/policy_wiring.md
buttercode101 Nov 11, 2026
36a867a
Import Habitat runtime resources: examples/proof_exchange.md
buttercode101 Nov 11, 2026
1862f8f
Import Habitat runtime resources: examples/proof_exchange.py
buttercode101 Nov 11, 2026
25bb010
Import Habitat runtime resources: examples/prove_run.py
buttercode101 Nov 11, 2026
f2bd14b
Import Habitat runtime resources: examples/send_event.py
buttercode101 Nov 11, 2026
1ad36c8
Import Habitat runtime resources: examples/simple.yaml
buttercode101 Nov 11, 2026
2d7464b
Import Habitat runtime resources: schemas/proof-v1.schema.json
buttercode101 Nov 11, 2026
64a502a
Import Habitat proof tooling: tools/verify_proof.py
buttercode101 Nov 11, 2026
70d58ba
Import Habitat proof tooling: tools/verify_tip.py
buttercode101 Nov 11, 2026
af7f5dc
Add unified test and proof-signing test dependencies
buttercode101 Nov 11, 2026
cf0e306
Run unified AgentScope and Habitat regression suites in CI
buttercode101 Nov 11, 2026
ab8d96d
Avoid test module collision with AgentScope generator tests
buttercode101 Nov 11, 2026
0b003a7
Rename Habitat generator test module to avoid collection collision
buttercode101 Nov 11, 2026
8733237
Align architecture documentation with AgentScope Habitat integration
buttercode101 Nov 11, 2026
2959fd1
Document unified AgentScope Habitat data boundaries
buttercode101 Nov 11, 2026
5068126
Expose Habitat CLI from unified AgentScope distribution
buttercode101 Nov 11, 2026
d351c99
Adapt Habitat packaging regression test to unified distribution
buttercode101 Nov 11, 2026
f2c3dc2
Align integrated Habitat runtime version with upstream release
buttercode101 Nov 11, 2026
84f4c08
Import Habitat public proof artifact: web/lib/demo-proof.json
buttercode101 Nov 11, 2026
9e68d94
Import Habitat public proof artifact: web/public/proofs-manifest.json
buttercode101 Nov 11, 2026
e846990
Import Habitat public proof artifact: web/public/proofs/Diketo/diketo…
buttercode101 Nov 11, 2026
dd9a248
Import Habitat public proof artifact: web/public/proofs/Greenlight-K5…
buttercode101 Nov 11, 2026
d80ec55
Unify AgentScope product messaging around Habitat evidence layer
buttercode101 Nov 11, 2026
b1676c7
Fix contrast for evidence cards on dark section
buttercode101 Nov 11, 2026
8dc45a0
Add integrated Habitat runtime quick start
buttercode101 Nov 11, 2026
f674829
Correct runtime requirement on AgentScope product site
buttercode101 Nov 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
with:
python-version: "3.11"
- name: Install package
run: pip install -e .
run: pip install -e ".[test]"
- name: Run tests
run: python -m unittest discover -v
run: python -m pytest -q
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ python3 generate.py --config myconfig.json -o dashboard.html

Open `dashboard.html` in any browser. Done.

Requirements: Python 3.8+, stdlib only. Zero dependencies.
Requirements: Python 3.11+. The default runtime has no third-party dependencies; proof signing is an optional extra.

### Daily digest (optional)

Expand All @@ -85,6 +85,34 @@ Copy `config.example.json`:

Any source may be `null` to skip it. Job definitions can optionally provide `required: false` for intentionally disabled jobs and `created_at` for reliable never-run detection. Timestamp parsing accepts timezone-aware ISO-8601 values and normalizes them before comparisons. The anomaly logic lives in `anomalies()` — extend the signature list for your own stack's failure modes.

## Habitat evidence runtime (optional)

AgentScope can read an existing local [Habitat](https://github.com/buttercode101/Habitat) database and include its operational evidence summary in the generated dashboard. Habitat supplies the local action ledger, claims, policy gates, and portable proof workflow; AgentScope remains the read-only supervision surface.

Set `sources.habitat_db` in your config to the initialized Habitat SQLite database path. Leave it `null` to keep the existing AgentScope-only mode. The bridge opens the database read-only. Missing or unreadable evidence is shown as **UNKNOWN**, and a failed action-ledger integrity check is surfaced as a failure. Stored claim verdicts are displayed as stored records, not freshly re-verified claims.

See [the integration boundary and validation checklist](docs/INTEGRATION-HABITAT.md).

## Habitat runtime and portable proofs

The integrated Habitat runtime is available through the same installation. It records agent actions, correlates claims to runs, checks the action-ledger hash chain, applies evidence policies, and exports portable proof bundles.

```bash
pip install -e .

# Initialize a local Habitat database
habitat init --config examples/simple.yaml

# Record explicitly labelled sample data
habitat demo

# Create and verify a portable proof for the sample run
habitat prove --run-id run-42 --claim "sample run completed" -o proof.json --card
python tools/verify_proof.py proof.json
```

The demo run is sample data, not a live verification of an external system. A valid proof establishes properties of the recorded evidence bundle; it does not establish external truth by itself. See [the integration architecture and trust boundaries](docs/INTEGRATION-HABITAT.md).

## Scope

**In:** supervision of scheduled agent work, anomaly surfacing, one-page scanning.
Expand Down
136 changes: 136 additions & 0 deletions agentscope_habitat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
"""Read-only bridge from AgentScope to Habitat's local evidence database."""
from __future__ import annotations

import json
import sqlite3
from datetime import datetime
from pathlib import Path
from urllib.parse import quote

from habitat.schema import Action
from habitat.store import Store


def _read_json_object(value):
decoded = json.loads(value or "{}")
return decoded if isinstance(decoded, dict) else {}


def _verify_ledger(conn):
marker = conn.execute(
"SELECT value FROM schema_meta WHERE key='action_integrity_initialized'"
).fetchone()
if not marker or marker[0] != "1":
return "unknown"
rows = conn.execute(
"SELECT ai.seq, ai.action_id, ai.prev_hash, ai.hash, a.* "
"FROM action_integrity ai JOIN action a ON a.id=ai.action_id ORDER BY ai.seq"
).fetchall()
action_count = conn.execute("SELECT COUNT(*) FROM action").fetchone()[0]
if len(rows) != action_count:
return "failed"
previous = None
for row in rows:
try:
action = Action(
row["id"], row["habitat_id"], datetime.fromisoformat(row["timestamp"]),
row["actor"], row["action"], row["status"], row["job_id"],
_read_json_object(row["details"]), row["run_id"],
)
if row["prev_hash"] != previous or row["hash"] != Store._action_hash(action, previous):
return "failed"
previous = row["hash"]
except (KeyError, TypeError, ValueError, json.JSONDecodeError):
return "failed"
return "intact"


def load_habitat_snapshot(database_path):
"""Return a bounded, read-only operational summary; never mutate Habitat state."""
if not database_path:
return None
path = Path(database_path).expanduser()
if not path.is_file():
return {"available": False, "reason": "database_missing", "path": str(path)}
uri = "file:" + quote(str(path.resolve()), safe="/") + "?mode=ro"
try:
conn = sqlite3.connect(uri, uri=True, timeout=2)
conn.row_factory = sqlite3.Row
try:
tables = {row[0] for row in conn.execute(
"SELECT name FROM sqlite_master WHERE type='table'"
)}
required = {"habitat", "job", "signal", "claim", "action", "action_integrity", "schema_meta"}
if not required.issubset(tables):
return {"available": False, "reason": "incomplete_schema", "path": str(path)}
habitat = conn.execute(
"SELECT id, name, status, model, updated_at FROM habitat LIMIT 1"
).fetchone()
if habitat is None:
return {"available": False, "reason": "not_initialized", "path": str(path)}
jobs = conn.execute(
"SELECT COUNT(*) total, SUM(CASE WHEN enabled=1 THEN 1 ELSE 0 END) enabled "
"FROM job WHERE habitat_id=?", (habitat["id"],)
).fetchone()
signals = conn.execute(
"SELECT severity, COUNT(*) total FROM signal WHERE habitat_id=? "
"AND resolved_at IS NULL GROUP BY severity", (habitat["id"],)
).fetchall()
claims = conn.execute(
"SELECT status, COUNT(*) total FROM claim WHERE habitat_id=? GROUP BY status",
(habitat["id"],)
).fetchall()
return {
"available": True,
"name": habitat["name"],
"status": habitat["status"],
"model": habitat["model"],
"updated_at": habitat["updated_at"],
"jobs_total": jobs["total"] or 0,
"jobs_enabled": jobs["enabled"] or 0,
"active_signals": {row["severity"]: row["total"] for row in signals},
"claims": {row["status"]: row["total"] for row in claims},
"ledger_integrity": _verify_ledger(conn),
}
finally:
conn.close()
except (OSError, sqlite3.Error, ValueError) as exc:
return {"available": False, "reason": "database_unreadable", "detail": str(exc)[:160], "path": str(path)}


def render_habitat_panel(snapshot):
"""Render an escaped, read-only Habitat summary for the generated dashboard."""
if snapshot is None:
return ""
import html

esc = html.escape
if not snapshot.get("available"):
reason = snapshot.get("reason", "unknown")
return (
'<div class="panel attn"><h2>Habitat evidence runtime</h2>'
'<div class="anom"><span class="badge" style="color:#b91c1c;background:#fee2e2">UNKNOWN</span> '
'Habitat state unavailable (' + esc(reason) + '). No assurance status is inferred.</div></div>'
)
claims = snapshot.get("claims", {})
signals = snapshot.get("active_signals", {})
signal_count = sum(signals.values())
ledger = snapshot.get("ledger_integrity", "unknown")
ledger_label = {"intact": "INTACT", "failed": "FAILED", "unknown": "UNKNOWN"}.get(ledger, "UNKNOWN")
ledger_color = "#15803d" if ledger == "intact" else "#b91c1c"
return (
'<div class="panel"><h2>Habitat evidence runtime</h2>'
'<div class="anom"><strong>' + esc(snapshot.get("name", "Habitat")) + '</strong> · runtime '
+ esc(snapshot.get("status", "unknown")) + ' · '
+ str(snapshot.get("jobs_enabled", 0)) + '/' + str(snapshot.get("jobs_total", 0)) + ' jobs enabled</div>'
'<div class="anom">Active signals: ' + str(signal_count)
+ ' · Claims recorded: ' + str(sum(claims.values()))
+ ' (verified ' + str(claims.get("verified", 0))
+ ', rejected ' + str(claims.get("rejected", 0))
+ ', inconclusive ' + str(claims.get("inconclusive", 0)) + ')</div>'
'<div class="anom">Action ledger: <span class="badge" style="color:' + ledger_color
+ ';background:#e5e7eb">' + ledger_label + '</span>'
+ (' · Active critical signals: ' + str(signals.get("critical", 0)) if signals.get("critical") else '')
+ (' · Active warnings: ' + str(signals.get("warning", 0)) if signals.get("warning") else '')
+ '</div><div class="mut" style="font-size:11px;margin-top:8px">Read-only snapshot. Recorded claim verdicts are not independently re-verified by this dashboard.</div></div>'
)
3 changes: 2 additions & 1 deletion config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"leads_query": [
"SELECT count(*) FROM leads",
"SELECT count(*) FROM leads WHERE status NOT IN ('completed','closed','lost')"
]
],
"habitat_db": null
},
"session_days": 7,
"max_actions": 15,
Expand Down
75 changes: 64 additions & 11 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,70 @@
# Full Commission architecture
# AgentScope architecture

Browser UI -> Commission API -> Evidence service -> Immutable source store -> Search index / graph -> Hermes orchestration.
## Product boundary

### Evidence object
`id, type, statement, classification, source_ids, transcript_location, document_hash, created_at, updated_at, verification_state`
AgentScope is the read-only supervision surface for an AI-agent crew. Habitat is the local evidence and verification runtime. The integration is intentionally one-way at the dashboard boundary: AgentScope reads Habitat state and renders a bounded summary; it does not run jobs or mutate evidence.

### Source object
`id, tier, publisher, title, canonical_url, retrieved_at, content_hash, publication_date`
## Runtime flow

### Transcript object
`hearing_id, day, date, speaker, role, start_offset, end_offset, text, source_id`
```text
Hermes / scheduled agent sources
|
+----> AgentScope collectors ----> generated local HTML dashboard
|
+----> Habitat signed event intake
|
v
Habitat SQLite store
- jobs and runtime signals
- append-only action ledger
- correlated claims
- evidence policy decisions
|
v
Habitat verification + proof
|
v
AgentScope read-only SQLite bridge
|
v
Dashboard evidence/health summary
```

### Relationship object
`subject_id, predicate, object_id, source_ids, confidence_reason`
## Responsibilities

The production version should use append-only source snapshots so later website changes cannot silently rewrite the historical record. Derived claims should point to exact source snapshots and transcript ranges.
### AgentScope

- Read local cron definitions, execution history, sessions, and optional MCP JSONL.
- Detect operational anomalies and missing telemetry.
- Generate a self-contained, read-only HTML dashboard.
- Optionally read a Habitat SQLite database in SQLite `mode=ro`.
- Display Habitat runtime state, active signals, claim verdict counts, and action-ledger integrity.
- Treat unavailable evidence as UNKNOWN.

### Habitat

- Ingest structured agent events and preserve action provenance.
- Maintain local job, signal, action, agent, and claim records.
- Correlate claims to exact runs/actions.
- Verify claims against trusted ledger evidence or explicit external evidence adapters.
- Apply policy gates that can downgrade but never upgrade unsupported claims.
- Export portable proof bundles and verify their structure, content integrity, and signatures.

## Integration contract

The bridge in `agentscope_habitat.py` is a read-only projection, not a second implementation of Habitat's domain model. It queries a bounded set of tables and verifies the action hash chain using Habitat's canonical hash routine. It does not re-run migrations, create claims, acknowledge signals, execute jobs, or rewrite stored verdicts.

A stored claim verdict is displayed as stored state. The bridge does not label it as freshly re-verified.

## Deployment model

The default AgentScope product site is a static landing/demo surface. Operational dashboards are generated locally from configured sources. Habitat's local runtime can be operated locally or through its separately configured authenticated API. Do not publish a local operational database or private agent dashboard as a public demo.

## Security invariants

1. The default AgentScope path remains local and self-contained.
2. Habitat database access from AgentScope is read-only.
3. Missing telemetry is UNKNOWN, not healthy.
4. Ledger integrity failure is a failure, not a warning hidden by acknowledgement.
5. Proof content integrity, signature validity, publisher trust, and external truth remain distinct.
6. The integration must not introduce an agent execution/control surface into AgentScope.
65 changes: 49 additions & 16 deletions docs/DATA_MODEL.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,54 @@
# Evidence data model
# AgentScope + Habitat data boundaries

The runtime uses SQLite for the local production foundation. The same logical model can move to Postgres without changing the evidence contract.
## AgentScope operational inputs

## Core objects
AgentScope's existing generator reads configured local sources:

- **source** — canonical publisher, URL, tier and publication/retrieval metadata.
- **snapshot** — immutable byte capture identified by SHA-256. A source can have many snapshots over time.
- **claim** — a bounded statement with an explicit classification and verification state.
- **claim_sources** — many-to-many provenance mapping; a claim cannot pass the gate without at least one source.
- **hearing** — sitting-day index. `index_only` means the day is known to exist in the indexed sequence but detailed material has not been ingested into this build. `detailed` means a source-backed hearing record is present.
- **audit** — append-only operational record of ingestion actions.
- Job definition JSON files.
- Execution-history SQLite database.
- Session directory metadata.
- Optional business counters.
- Optional MCP/tool-call JSONL.
- Optional acknowledgement state.

## Integrity invariants
The generated HTML contains a snapshot of the data read at generation time. It is not a live query interface.

1. Claims never store source prose as if it were a source record.
2. A claim must reference one or more source IDs before it can pass verification.
3. A source snapshot is content-addressed by SHA-256.
4. Re-fetching changed source content creates a new snapshot; old snapshots are retained.
5. Missing hearing detail is represented explicitly rather than synthesized.
6. Agent output is not persisted as factual evidence unless a human/controlled ingestion process promotes it into a sourced claim.
## Habitat runtime records

Habitat owns its local SQLite schema. AgentScope does not migrate or write this schema.

| Record | Purpose |
|---|---|
| habitat | Runtime identity, model and overall status |
| job | Scheduled work and latest observed execution state |
| signal | Active/resolved anomaly signals with severity |
| action | Trusted action ledger entries |
| action_integrity | Hash-chain links for tamper detection |
| claim | Bounded assertion and its stored verification verdict |
| event | Ingested structured agent event |
| agent | Registered agent identity and permissions |

## AgentScope projection

The bridge reads only:

- Habitat identity and status.
- Enabled/total job counts.
- Counts of active signals by severity.
- Counts of claims by stored verdict.
- Action-ledger integrity result.

It deliberately excludes agent secrets, permissions, raw event payloads, action details, claim evidence bodies, and proof contents from the dashboard summary.

## Trust semantics

- `available=false`: source missing, uninitialized, unreadable, or structurally incomplete; display UNKNOWN.
- `ledger_integrity=intact`: the current action rows match the stored hash chain.
- `ledger_integrity=failed`: the hash chain is incomplete or does not match; surface FAIL.
- `ledger_integrity=unknown`: integrity metadata is absent or uninitialized; never treat as intact.
- Claim counts represent stored Habitat verdicts only. They are not a fresh verification of each claim.
- A valid proof bundle proves properties of the recorded evidence bundle, not that the external world necessarily matches the claim.

## Retention and migration

Habitat remains the system of record for its evidence and proof data. Preserve the original Habitat database and repository until backup/restore, schema migration, and proof-verification tests pass against the unified build. Never rewrite or deduplicate historical proof records during this integration.
Loading
Loading