Skip to content

feat(agentos): registry ObjectId addressing, cascade delete, session-…#24

Merged
abhi-bhat-lyzr merged 2 commits into
deployfrom
feat/agentos-overhaul
Jun 5, 2026
Merged

feat(agentos): registry ObjectId addressing, cascade delete, session-…#24
abhi-bhat-lyzr merged 2 commits into
deployfrom
feat/agentos-overhaul

Conversation

@abhi-bhat-lyzr
Copy link
Copy Markdown
Collaborator

…transcript fix

Registry data model + addressing

  • agent_registry/_id is now a Mongo ObjectId with name as a separate unique-indexed field (chat_pins/agent_policies likewise → agentName).
  • Public API + SPA address agents by ObjectId (/agents/:id, agentId params); a resolve-by-id helper maps id → registry doc → name for the name-keyed cross-collection FKs (sessions, logs, messages, schedules, S3 prefix).
  • Boot migration converts legacy string-_id rows + ensures unique indexes.
  • Python/library telemetry ingest stays name-addressed (server mints _id).

Cascade delete

  • Deleting an agent removes its sessions, live sandboxes, S3 snapshots, logs, messages, schedules, and pins; per-session delete mirrors it.

Session transcript display fix

  • Rebuild runtime-local harness-bundle.mjs so the pinSessionStoreKey wrapper is actually shipped — the running harness was writing sessions._id under the derived engine UUID instead of the harness sessionId, so the dashboard couldn't find transcripts ("Resumed — no stored transcript").
  • Harden the projectKey-suffix fallback (looseProjectKeySuffix) so agent names with spaces match the CLI's hyphen-sanitized projectKey; recovers transcripts orphaned under the engine UUID.

SPA

  • Sidebar items are real routed pages (/agents/:id); modal legibility + auto-close; observability default range 15m; register shows typed name.

scripts/

  • drop-collections.mjs: guarded clean-slate admin tool (requires CONFIRM_DROP to echo the DB name; dry-run otherwise).

Summary

Type of change

  • Bug fix (no API change)
  • New feature (additive — opt-in or new export, no existing-behavior change)
  • Breaking change (requires major version bump on affected packages)
  • Docs / CI / tooling only

Verification

  • pnpm -r build clean
  • pnpm -r typecheck clean
  • pnpm -r test clean (note any flaky tests in the comment)
  • If a plug-in: runConformanceSuite() passes (paste report below)

Versioning

  • pnpm changeset was run for any change to a published package
  • N/A — internal-only change

Notes for the reviewer

abhi-bhat-lyzr and others added 2 commits June 5, 2026 15:48
…transcript fix

Registry data model + addressing
- agent_registry/_id is now a Mongo ObjectId with `name` as a separate
  unique-indexed field (chat_pins/agent_policies likewise → agentName).
- Public API + SPA address agents by ObjectId (/agents/:id, agentId params);
  a resolve-by-id helper maps id → registry doc → name for the name-keyed
  cross-collection FKs (sessions, logs, messages, schedules, S3 prefix).
- Boot migration converts legacy string-_id rows + ensures unique indexes.
- Python/library telemetry ingest stays name-addressed (server mints _id).

Cascade delete
- Deleting an agent removes its sessions, live sandboxes, S3 snapshots,
  logs, messages, schedules, and pins; per-session delete mirrors it.

Session transcript display fix
- Rebuild runtime-local harness-bundle.mjs so the pinSessionStoreKey wrapper
  is actually shipped — the running harness was writing sessions._id under
  the derived engine UUID instead of the harness sessionId, so the dashboard
  couldn't find transcripts ("Resumed — no stored transcript").
- Harden the projectKey-suffix fallback (looseProjectKeySuffix) so agent
  names with spaces match the CLI's hyphen-sanitized projectKey; recovers
  transcripts orphaned under the engine UUID.

SPA
- Sidebar items are real routed pages (/agents/:id); modal legibility +
  auto-close; observability default range 15m; register shows typed name.

scripts/
- drop-collections.mjs: guarded clean-slate admin tool (requires CONFIRM_DROP
  to echo the DB name; dry-run otherwise).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts:
#	agentos/src/App.tsx
#	packages/agentos-server/src/mongo.ts
@abhi-bhat-lyzr abhi-bhat-lyzr merged commit f9b9111 into deploy Jun 5, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant