Repository navigation
fix/issues/02 no casts core - #259
Merged
Merged
Conversation
…th no cast Red: removing the double cast made every definitionOf(node).method(node) call fail with TS2345 (parameter of type 'never'), 10 errors. Green: definitionOf<T> returns NodeDefinition of the node of type T over a registry typed per node type; check-types and 1232 flows tests pass. Closes #251 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sander boer <mail@sanderboer.nl>
Red: without the cast, valueDeciderNameSchema.options[0] is ValueDeciderName | undefined (zod types options as an array); annotating it fails with TS2322, and the optional decider field hid the undefined. Green: FIRST_VALUE_DECIDER comes from the as-const tuple that builds the enum; check-types and flows tests pass. Refs #252 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sander boer <mail@sanderboer.nl>
…ng needs no cast Red: without the cast, apply(suggestion, selection) failed with TS2345 (parameter of type 'never'). Green: applierOf<K> reads the table by kind and returns the applier for that kind; check-types and assistant tests pass. Closes #250 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sander boer <mail@sanderboer.nl>
Red: without the cast, withoutRun failed with TS2322 (Omit<T, "run"> is not T); returning Omit<T, "run"> collapsed the session input union (TS2345). Green: each case destructures run from its own input, so TypeScript drops the key from every member of the union; the helper is gone. check-types and 162 work and placement tests pass. Closes #237 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sander boer <mail@sanderboer.nl>
…h no cast Red: without the cast to a record, indexing the router client by a contract name failed with TS7053 (implicit any). Green: the network drop and the copies run as an oRPC interceptor, and the client is a plain HostClient listed per procedure, so a test replaces one procedure by a typed spread. Three casts are gone. check-types and 315 devices tests (testing, host, secrets, exchange) pass. Closes #236 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sander boer <mail@sanderboer.nl>
Red: without the casts, kindOf/kindOfType failed with TS2322 (a union of KindOf<T> is not NodeKind), and the goto Command failed with TS2322 (the compiled graph knew only the node name __start__). Green: kindOf<T> returns KindOf<T> from the registry typed per node type; the StateGraph names its nodes as strings, so a goto to any node id and the START edges type-check (two more casts gone). check-types and 4918 engine tests pass. Refs #241 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sander boer <mail@sanderboer.nl>
…st have the real types Red: without the casts, archive.tail failed with TS2322 (event was a record, not a StepEvent) and devices.call failed with TS2322 (the request's call was a loose object, not a WorkCall). Green: the step event schema moves from api to the devices contract, and transcriptEntrySchema is exact<TranscriptEntry>; workRequestSchema is exact over a run work request built from the call schemas, so the casts in host-router.ts and the Device's work serve go, and WORK_KINDS goes with the loose schema. The contract shape changed, so the peer protocol is version 6. check-types (all workspaces), 1082 devices, 118 api, 8 refusal and 556 client tests pass. Refs #234 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sander boer <mail@sanderboer.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Test plan
Related