packages/core/src/__tests__/migration-storage-v2.test.ts |
+1,561 / -0 |
Adds comprehensive migration coverage for V1-to-V2 layout conversion, rollback, dry-run, archives, worktrees, collisions, malformed data, active sessions, and idempotency. |
packages/core/src/migration/storage-v2.ts |
+1,367 / -0 |
Adds the storage migration engine: inventory, dry-run, active session checks, JSON conversion, archive flattening, worktree repair, rollback, idempotency, and recovery logging. |
packages/core/src/metadata.ts |
+229 / -179 |
Replaces key=value metadata with JSON read/write/mutate flows, handles typed runtime/dashboard/lifecycle fields, treats empty reserved files safely, and removes archive metadata APIs. |
packages/core/src/__tests__/metadata.test.ts |
+210 / -171 |
Replaces flat-file metadata tests with JSON serialization, typed-field migration, displayName preservation, empty-file mutation, and archive-removal expectations. |
packages/core/src/session-manager.ts |
+181 / -211 |
Rewires session CRUD to projectId paths, JSON metadata, lifecycle-derived status, stale runtime reconciliation, terminated-session restore, and permanent metadata deletion without archive APIs. |
packages/core/src/__tests__/global-config.test.ts |
+128 / -183 |
Replaces suffix/storageKey/relink coverage with deterministic hashed ID registration, same-path reconnect, global config behavior, and collision handling. |
packages/core/src/global-config.ts |
+107 / -309 |
Deletes storageKey collision/relink machinery and replaces suffix allocation with deterministic hashed project IDs, same-path reconnection, and explicit collision failure. |
packages/core/src/paths.ts |
+107 / -17 |
Adds V2 path helpers for projects, sessions, metadata files, worktrees, migration markers, and V1 detection while removing archive path helpers. |
packages/core/src/__tests__/recovery-actions.test.ts |
+87 / -71 |
Reworks cleanup tests so terminated sessions stay in sessions/ with lifecycle state instead of moving to archive. |
packages/core/src/__tests__/paths.test.ts |
+81 / -0 |
Adds path helper tests for V2 project/session/worktree paths, metadata extension behavior, and V1 detection. |
packages/core/src/__tests__/session-manager/restore.test.ts |
+64 / -104 |
Removes archive restore expectations and adds restore coverage for terminated/merged sessions, permission preservation, and runtimeHandle object shape. |
packages/core/src/__tests__/session-manager/lifecycle.test.ts |
+51 / -40 |
Adds/updates lifecycle tests for terminal reasons, stale runtime persistence, and derived legacy status behavior. |
packages/core/src/portfolio-session-service.ts |
+42 / -20 |
Reads sessions from project-scoped JSON metadata and enriches cross-project session listings without archive fallback. |
packages/core/src/__tests__/portfolio-session-service.test.ts |
+35 / -40 |
Updates portfolio session listing fixtures for JSON metadata, V2 paths, and no archive fallback. |
packages/core/src/lifecycle-state.ts |
+35 / -20 |
Expands lifecycle derivation so legacy display status is computed from canonical state, terminal reason, and PR state rather than persisted separately. |
packages/core/src/agent-workspace-hooks.ts |
+34 / -11 |
Reworks hook-side metadata mutation for JSON files and V2 session paths, including safer handling around session metadata writes. |
packages/core/src/__tests__/session-manager/claim-pr.test.ts |
+29 / -29 |
Refreshes PR claim fixtures to new metadata shape while preserving the claim behavior under test. |
packages/core/src/lifecycle-manager.ts |
+28 / -24 |
Moves polling and session status decisions onto canonical lifecycle state/reason, including persistence for lost runtimes. |
packages/core/src/__tests__/lifecycle-transition.test.ts |
+26 / -32 |
Rewrites transition assertions around canonical lifecycle and removes previousStatus expectations. |
packages/core/src/index.ts |
+24 / -4 |
Exports the new storage V2, lifecycle, migration, and metadata helpers while dropping removed archive/storageKey exports. |
packages/core/src/__tests__/lifecycle-state.test.ts |
+23 / -10 |
Adds coverage for new state/reason to legacy status mapping, including terminal runtime-lost behavior. |
packages/core/src/__tests__/session-manager/query.test.ts |
+21 / -22 |
Updates query/list tests for sessions retained in the active sessions directory and lifecycle-derived status. |
packages/core/src/types.ts |
+20 / -39 |
Changes core types by removing storageKey, nesting runtime/dashboard/lifecycle metadata, and tightening lifecycle/status shapes. |
packages/core/src/lifecycle-status-decisions.ts |
+19 / -21 |
Updates status decision output to the nested lifecycle/detecting shape and removes previousStatus as an input dependency. |
packages/core/src/__tests__/session-manager/communication.test.ts |
+17 / -17 |
Updates communication tests for JSON metadata and projectId session lookup paths. |
packages/core/src/lifecycle-transition.ts |
+15 / -19 |
Simplifies transitions around canonical lifecycle fields and removes now-stale legacy status preservation paths. |
packages/core/src/__tests__/lifecycle-manager.test.ts |
+15 / -15 |
Adjusts lifecycle polling expectations to canonical lifecycle state and derived legacy status. |
packages/core/src/__tests__/plugin-integration.test.ts |
+14 / -6 |
Updates plugin integration fixtures to use projectId identity and new metadata layout. |
packages/core/src/utils/metadata-flatten.ts |
+13 / -0 |
Adds a shared flattening helper for metadata compatibility paths that still need string-record views. |
packages/core/src/__tests__/lifecycle-status-decisions.test.ts |
+10 / -10 |
Updates decision fixtures for the nested lifecycle/detecting result shape. |
packages/core/src/__tests__/test-utils.ts |
+10 / -16 |
Simplifies shared test helpers around the new metadata/config shape and removes legacy storageKey setup. |
packages/core/src/__tests__/recovery-validator.test.ts |
+9 / -9 |
Updates validator fixtures for V2 path names and lifecycle metadata shape. |
packages/core/src/__tests__/session-manager/spawn.test.ts |
+9 / -4 |
Updates spawn fixtures for projectId storage paths and new metadata defaults. |
packages/core/src/recovery/scanner.ts |
+8 / -6 |
Scans V2 project/session directories and skips migration artifacts that should not be treated as live projects. |
packages/core/src/portfolio-registry.ts |
+7 / -17 |
Aligns portfolio registry entries with projectId identity and removes storageKey fields from registry persistence. |
packages/core/src/__tests__/agent-report.test.ts |
+6 / -6 |
Updates report fixtures and expectations for JSON metadata/V2 paths. |
packages/core/src/__tests__/session-manager.test.ts |
+6 / -6 |
Adjusts high-level session manager expectations for JSON metadata files and derived status. |
packages/core/src/recovery/actions.ts |
+5 / -6 |
Stops cleanup from moving sessions into archives and instead marks terminated lifecycle state in-place. |
packages/core/src/__tests__/session-manager/cache.test.ts |
+5 / -3 |
Updates cache tests for the V2 metadata source and stale runtime enrichment path. |
packages/core/package.json |
+4 / -0 |
Adds package dependencies or exports needed by the storage migration/runtime changes. |
packages/core/src/__tests__/portfolio-registry.test.ts |
+3 / -4 |
Adjusts registry expectations after storageKey was removed from persisted project entries. |
packages/core/src/agent-report.ts |
+3 / -3 |
Swaps report lookup path usage to the new project/session metadata conventions without changing the report surface. |
packages/core/src/config.ts |
+2 / -21 |
Removes storageKey-era config plumbing and narrows project identity to the project ID based resolver path. |
packages/core/rollup.config.ts |
+1 / -0 |
Updates the build input/external handling so the new core module graph bundles cleanly. |
packages/core/src/utils/session-from-metadata.ts |
+1 / -1 |
Updates session materialization to use the new lifecycle/status derivation semantics. |
packages/core/__tests__/config.test.ts |
+0 / -43 |
Removes storageKey config assertions that no longer apply after project identity moved to projectId. |
packages/core/src/__tests__/config-validation.test.ts |
+0 / -24 |
Drops validation cases for removed storageKey fields. |
packages/core/src/__tests__/portfolio-projects.test.ts |
+0 / -2 |
Removes storageKey assertions from portfolio project shape tests. |
packages/core/src/__tests__/project-resolver.test.ts |
+0 / -9 |
Deletes resolver expectations tied to storageKey wrapping and legacy project identity. |