SentryAgent.ai Developer
8cabc0191c
docs: commit all Phase 6 documentation updates and OpenSpec archives
...
- devops docs: 8 files updated for Phase 6 state; field-trial.md added (946-line runbook)
- developer docs: api-reference (50+ endpoints), quick-start, 5 existing guides updated, 5 new guides added
- engineering docs: all 12 files updated (services, architecture, SDK guide, testing, overview)
- OpenSpec archives: phase-7-devops-field-trial, developer-docs-phase6-update, engineering-docs-phase6-update
- VALIDATOR.md + scripts/start-validator.sh: V&V Architect tooling added
- .gitignore: exclude session artifacts, build artifacts, and agent workspaces
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-07 02:24:24 +00:00
SentryAgent.ai Developer
fd90b2acd1
feat(phase-3): workstream 6 — SOC 2 Type II Preparation
...
Implements all 22 WS6 tasks completing Phase 3 Enterprise.
Column-level encryption (AES-256-CBC, Vault-backed key) via EncryptionService
applied to credentials.secret_hash, credentials.vault_path,
webhook_subscriptions.vault_secret_path, and agent_did_keys.vault_key_path.
Backward-compatible: isEncrypted() guard skips decryption for existing
plaintext rows until next read-write cycle.
Audit chain integrity (CC7.2): AuditRepository computes SHA-256 Merkle hash
on every INSERT (hash = SHA-256(eventId+timestamp+action+outcome+agentId+orgId+prevHash)).
AuditVerificationService walks the full chain verifying hash continuity.
AuditChainVerificationJob runs hourly; sets agentidp_audit_chain_integrity
Prometheus gauge to 1 (pass) or 0 (fail).
TLS enforcement (CC6.7): TLSEnforcementMiddleware registered as first
middleware in Express stack; 301 redirect on non-https X-Forwarded-Proto
in production.
SecretsRotationJob (CC9.2): hourly scan for credentials expiring within 7
days; increments agentidp_credentials_expiring_soon_total.
ComplianceController + routes: GET /audit/verify (auth+audit:read scope,
30/min rate-limit); GET /compliance/controls (public, Cache-Control 60s).
ComplianceStatusStore: module-level map updated by jobs, consumed by controller.
Prometheus: 2 new metrics (agentidp_credentials_expiring_soon_total,
agentidp_audit_chain_integrity); 6 alerting rules in alerts.yml.
Compliance docs: soc2-controls-matrix.md, encryption-runbook.md,
audit-log-runbook.md, incident-response.md, secrets-rotation.md.
Tests: 557 unit tests passing (35 suites); 26 new tests (EncryptionService,
AuditVerificationService); 19 compliance integration tests. TypeScript clean.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-31 00:41:53 +00:00
SentryAgent.ai Developer
eced5f8699
docs: engineering knowledge base for new hires
...
Complete docs/engineering/ suite — 12 documents covering company overview,
system architecture, tech stack ADRs, codebase structure, service deep dives,
annotated code walkthroughs, dev setup, engineering workflow, testing strategy,
deployment/ops, SDK guide, and README index. All content verified against
source files. All 82 tasks in openspec/changes/engineering-docs/tasks.md
marked complete.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-29 12:38:42 +00:00
SentryAgent.ai Developer
6913d62648
feat(phase-2): workstream 8 — Multi-Region Terraform Deployment
...
AWS environment:
- VPC (3-AZ, public + private subnets, NAT gateways, VPC endpoints for ECR/SM/CW)
- ECS Fargate service (sentryagent/agentidp) — secrets from Secrets Manager
- RDS PostgreSQL 14 (Multi-AZ, encrypted, VPC-internal, storage autoscaling)
- ElastiCache Redis 7 (primary + replica, at-rest + in-transit encryption)
- ALB with HTTPS/443, HTTP→HTTPS redirect, ACM certificate
- Route 53 alias record
GCP environment:
- VPC + private services access + Serverless VPC connector
- Cloud Run service — secrets from Secret Manager
- Cloud SQL PostgreSQL 14 (private IP, no public endpoint)
- Cloud Memorystore Redis 7 (VPC-internal, AUTH enabled)
Shared:
- 4 reusable modules: agentidp (dual AWS/GCP), rds, redis, lb
- No hardcoded secrets; all sensitive vars marked sensitive=true
- terraform.tfvars.example for both environments
- docs/devops/deployment.md — AWS + GCP step-by-step walkthrough, rollback procedures
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-29 06:25:14 +00:00
SentryAgent.ai Developer
a504964e5f
feat(phase-2): workstream 7 — Prometheus + Grafana Monitoring
...
- Add prom-client 15; shared registry in src/metrics/registry.ts (7 metrics)
- HTTP request counter + duration histogram via metricsMiddleware
- DB query duration histogram wrapping pg Pool.query
- Redis command duration histogram via typed instrumentRedisMethod wrapper
- agentidp_tokens_issued_total in OAuth2Service
- agentidp_agents_registered_total in AgentService
- GET /metrics unauthenticated endpoint (Prometheus text format)
- docker-compose.monitoring.yml overlay (Prometheus + Grafana)
- Grafana auto-provisioned datasource + pre-built AgentIdP dashboard
- docs/devops/operations.md monitoring section added
- 36/36 unit tests passing, 100% coverage on new metrics code
- Fix pre-existing unused import in tests/integration/agents.test.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-29 06:13:41 +00:00
SentryAgent.ai Developer
7328a61c44
feat(phase-2): workstream 5 — OPA Policy Engine
...
- policies/authz.rego: Rego policy with path normalisation and scope enforcement
- policies/data/scopes.json: all 13 endpoint → scope mappings
- src/middleware/opa.ts: OpaMiddleware with Wasm primary path + scopes.json fallback;
exports createOpaMiddleware() and reloadOpaPolicy() for SIGHUP hot-reload
- All four route files: opaMiddleware wired after authMiddleware
- AuditController, OAuth2Service: manual scope checks removed (now centralised in OPA)
- src/server.ts: SIGHUP handler calls reloadOpaPolicy()
- docs/devops/environment-variables.md: POLICY_DIR documented
- 38 new tests; 302/302 passing; opa.ts coverage 98.66% statements
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-28 23:02:11 +00:00
SentryAgent.ai Developer
90a4addb21
feat(phase-2): workstream 1 — HashiCorp Vault credential storage
...
Vault is optional — server falls back to bcrypt (Phase 1 behaviour)
when VAULT_ADDR is not set. Full coexistence: existing bcrypt credentials
continue to work until rotated.
Changes:
- src/vault/VaultClient.ts — wraps node-vault KV v2; writeSecret,
readSecret, verifySecret (constant-time), deleteSecret
- src/db/migrations/005_add_vault_path.sql — vault_path column on credentials
- CredentialRepository — createWithVaultPath, updateVaultPath methods
- CredentialService — routes generate/rotate through Vault when configured;
bcrypt path unchanged
- OAuth2Service — verifies via Vault when vaultPath set, bcrypt otherwise
- src/app.ts — createVaultClientFromEnv() wired into service layer
- ICredentialRow — vaultPath field added
- docs/devops/environment-variables.md — VAULT_ADDR, VAULT_TOKEN, VAULT_MOUNT
- docs/devops/vault-setup.md — dev quickstart, production config, migration guide
- tests: 33/33 unit tests pass (VaultClient + CredentialService Vault path)
- node-vault + @types/node-vault installed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-28 15:02:33 +00:00
SentryAgent.ai Developer
aa5167835e
feat: Phase 1 P1 — Dockerfile, AGNTCY alignment docs, Node.js SDK
...
Three remaining Phase 1 P1 deliverables:
1. Dockerfile — multi-stage build (builder + production), node:18-alpine,
non-root USER node, .dockerignore excluding secrets and dev artifacts
2. AGNTCY alignment docs (docs/agntcy/) — README and alignment.md mapping
all 6 AGNTCY domains to AgentIdP features with Phase 2/3 pending items noted
3. Node.js SDK (@sentryagent/idp-sdk) — TypeScript strict, zero any, native
fetch (Node 18+), TokenManager with 60s auto-refresh, service clients for
all 14 endpoints (agents, credentials, tokens, audit), AgentIdPError typed
error hierarchy, full README
All three changes tracked under openspec/changes/ with tasks marked complete.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-28 14:46:53 +00:00
SentryAgent.ai Developer
d94a8cedc0
docs: DevOps documentation — complete docs/devops/ set
...
Adds the full devops-documentation OpenSpec change implementation.
Separate from docs/developers/ — serves a different audience (operators,
not API consumers).
docs/devops/:
- README.md — index and system overview
- architecture.md — components, ports, data flow, Redis key patterns
- environment-variables.md — all 7 env vars (required + optional, formats, .env example)
- database.md — 4-table schema, indexes, constraints, migration runner
- local-development.md — docker-compose setup, health checks, startup, Dockerfile gap noted
- security.md — RSA key generation/rotation, CORS, bcrypt, secret storage guidance
- operations.md — startup order, graceful shutdown, log reference, troubleshooting
QA gates: 48/48 tasks complete. All env vars verified against source.
All table names verified against migrations. All ports verified against
docker-compose.yml. All internal links resolve.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-28 14:28:55 +00:00
SentryAgent.ai Developer
61ea975c79
docs: bedroom developer documentation — complete docs/developers/ set
...
Adds the full bedroom-developer-docs OpenSpec change implementation:
- docs/developers/README.md — index page
- docs/developers/quick-start.md — bootstrap to working token in 7 steps
- docs/developers/concepts.md — AgentIdP, AGNTCY, lifecycle, OAuth 2.0, free tier
- docs/developers/guides/README.md — guide index
- docs/developers/guides/register-an-agent.md — all fields, validation, common errors
- docs/developers/guides/manage-credentials.md — generate, list, rotate, revoke
- docs/developers/guides/issue-and-revoke-tokens.md — OAuth 2.0 flow, introspect, revoke
- docs/developers/guides/query-audit-logs.md — filters, pagination, 90-day retention
- docs/developers/api-reference.md — all 14 endpoints, all error codes, curl examples
Also commits deferred OpenSpec housekeeping from previous session:
- Archives phase-1-mvp-implementation change to openspec/changes/archive/
- Adds bedroom-developer-docs change artifacts (30/30 tasks complete)
- Syncs 4 delta specs to openspec/specs/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-28 14:13:03 +00:00
SentryAgent.ai Developer
d3530285b9
feat: Phase 1 MVP — complete AgentIdP implementation
...
Implements all P0 features per OpenSpec change phase-1-mvp-implementation:
- Agent Registry Service (CRUD) — full lifecycle management
- OAuth 2.0 Token Service (Client Credentials flow)
- Credential Management (generate, rotate, revoke)
- Immutable Audit Log Service
Tech: Node.js 18+, TypeScript 5.3+ strict, Express 4.18+, PostgreSQL 14+, Redis 7+
Standards: OpenAPI 3.0 specs, DRY/SOLID, zero `any` types
Quality: 18 unit test suites, 244 tests passing, 97%+ coverage
OpenAPI: 4 complete specs (14 endpoints total)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-28 09:14:41 +00:00