| ... | ... | @@ -11,6 +11,7 @@ import { |
| 11 | 11 | ProjectId, |
| 12 | 12 | ProviderSessionId, |
| 13 | 13 | ProviderThreadId, |
| 14 | ProviderTurnId, |
| 14 | 15 | ThreadId, |
| 15 | 16 | TurnId, |
| 16 | 17 | } from "@t3tools/contracts"; |
| ... | ... | @@ -40,6 +41,7 @@ import { checkpointRefForThreadTurn } from "../../checkpointing/Utils.ts"; |
| 40 | 41 | const asProjectId = (value: string): ProjectId => ProjectId.makeUnsafe(value); |
| 41 | 42 | const asSessionId = (value: string): ProviderSessionId => ProviderSessionId.makeUnsafe(value); |
| 42 | 43 | const asProviderThreadId = (value: string): ProviderThreadId => ProviderThreadId.makeUnsafe(value); |
| 44 | const asProviderTurnId = (value: string): ProviderTurnId => ProviderTurnId.makeUnsafe(value); |
| 43 | 45 | const asTurnId = (value: string): TurnId => TurnId.makeUnsafe(value); |
| 44 | 46 | |
| 45 | 47 | function createProviderServiceHarness(cwd: string, hasSession = true, sessionCwd = cwd) { |
| ... | ... | @@ -334,7 +336,7 @@ describe("CheckpointReactor", () => { |
| 334 | 336 | sessionId: asSessionId("sess-1"), |
| 335 | 337 | createdAt: new Date().toISOString(), |
| 336 | 338 | threadId: ProviderThreadId.makeUnsafe("provider-thread-1"), |
| 337 | | turnId: asTurnId("turn-1"), |
| 339 | turnId: asProviderTurnId("turn-1"), |
| 338 | 340 | }); |
| 339 | 341 | await waitForGitRefExists( |
| 340 | 342 | harness.cwd, |
| ... | ... | @@ -349,7 +351,7 @@ describe("CheckpointReactor", () => { |
| 349 | 351 | sessionId: asSessionId("sess-1"), |
| 350 | 352 | createdAt: new Date().toISOString(), |
| 351 | 353 | threadId: ProviderThreadId.makeUnsafe("provider-thread-1"), |
| 352 | | turnId: asTurnId("turn-1"), |
| 354 | turnId: asProviderTurnId("turn-1"), |
| 353 | 355 | status: "completed", |
| 354 | 356 | }); |
| 355 | 357 | |
| ... | ... | @@ -413,7 +415,7 @@ describe("CheckpointReactor", () => { |
| 413 | 415 | sessionId: asSessionId("sess-1"), |
| 414 | 416 | createdAt: new Date().toISOString(), |
| 415 | 417 | threadId: ProviderThreadId.makeUnsafe("provider-thread-1"), |
| 416 | | turnId: asTurnId("turn-main"), |
| 418 | turnId: asProviderTurnId("turn-main"), |
| 417 | 419 | }); |
| 418 | 420 | await waitForGitRefExists( |
| 419 | 421 | harness.cwd, |
| ... | ... | @@ -429,7 +431,7 @@ describe("CheckpointReactor", () => { |
| 429 | 431 | sessionId: asSessionId("sess-1"), |
| 430 | 432 | createdAt: new Date().toISOString(), |
| 431 | 433 | threadId: ProviderThreadId.makeUnsafe("provider-thread-aux"), |
| 432 | | turnId: asTurnId("turn-aux"), |
| 434 | turnId: asProviderTurnId("turn-aux"), |
| 433 | 435 | status: "completed", |
| 434 | 436 | }); |
| 435 | 437 | |
| ... | ... | @@ -445,7 +447,7 @@ describe("CheckpointReactor", () => { |
| 445 | 447 | sessionId: asSessionId("sess-1"), |
| 446 | 448 | createdAt: new Date().toISOString(), |
| 447 | 449 | threadId: ProviderThreadId.makeUnsafe("provider-thread-1"), |
| 448 | | turnId: asTurnId("turn-main"), |
| 450 | turnId: asProviderTurnId("turn-main"), |
| 449 | 451 | status: "completed", |
| 450 | 452 | }); |
| 451 | 453 | |
| ... | ... | @@ -488,7 +490,7 @@ describe("CheckpointReactor", () => { |
| 488 | 490 | sessionId: asSessionId("sess-1"), |
| 489 | 491 | createdAt: new Date().toISOString(), |
| 490 | 492 | threadId: ProviderThreadId.makeUnsafe("provider-thread-1"), |
| 491 | | turnId: asTurnId("turn-missing-baseline"), |
| 493 | turnId: asProviderTurnId("turn-missing-baseline"), |
| 492 | 494 | status: "completed", |
| 493 | 495 | }); |
| 494 | 496 | |
| ... | ... | @@ -580,7 +582,7 @@ describe("CheckpointReactor", () => { |
| 580 | 582 | sessionId: asSessionId("sess-missing"), |
| 581 | 583 | createdAt: new Date().toISOString(), |
| 582 | 584 | threadId: ProviderThreadId.makeUnsafe("provider-thread-missing"), |
| 583 | | turnId: asTurnId("turn-missing-cwd"), |
| 585 | turnId: asProviderTurnId("turn-missing-cwd"), |
| 584 | 586 | status: "completed", |
| 585 | 587 | }); |
| 586 | 588 | |
| ... | ... | @@ -629,7 +631,7 @@ describe("CheckpointReactor", () => { |
| 629 | 631 | sessionId: asSessionId("sess-1"), |
| 630 | 632 | createdAt: new Date().toISOString(), |
| 631 | 633 | threadId: ProviderThreadId.makeUnsafe("provider-thread-1"), |
| 632 | | turnId: asTurnId("turn-3"), |
| 634 | turnId: asProviderTurnId("turn-3"), |
| 633 | 635 | turnCount: 3, |
| 634 | 636 | status: "completed", |
| 635 | 637 | }); |
| ... | ... | @@ -682,7 +684,7 @@ describe("CheckpointReactor", () => { |
| 682 | 684 | sessionId: asSessionId("sess-1"), |
| 683 | 685 | createdAt: new Date().toISOString(), |
| 684 | 686 | threadId: ProviderThreadId.makeUnsafe("provider-thread-1"), |
| 685 | | turnId: asTurnId("turn-runtime-failure"), |
| 687 | turnId: asProviderTurnId("turn-runtime-failure"), |
| 686 | 688 | turnCount: 1, |
| 687 | 689 | status: "completed", |
| 688 | 690 | }); |
| ... | ... | @@ -694,7 +696,7 @@ describe("CheckpointReactor", () => { |
| 694 | 696 | sessionId: asSessionId("sess-1"), |
| 695 | 697 | createdAt: new Date().toISOString(), |
| 696 | 698 | threadId: ProviderThreadId.makeUnsafe("provider-thread-1"), |
| 697 | | turnId: asTurnId("turn-after-runtime-failure"), |
| 699 | turnId: asProviderTurnId("turn-after-runtime-failure"), |
| 698 | 700 | }); |
| 699 | 701 | |
| 700 | 702 | await waitForGitRefExists( |