| author | |
| committer | |
| log | dbfd5173131deb1a7ad2a9438b8941ade43f9a89 |
| tree | e501586ffcb81d3859d13c8c07b586e7947baa26 |
| parent | 0671e34279d42faf69fccfd46ceae305ccfa7c6d |
| signature | Signed by PGP key B5690EEEBB952194 |
40 files changed, 42 insertions(+), 208 deletions(-)
apps/web/src/components/Sidebar.logic.ts+1-5| ... | @@ -600,11 +600,7 @@ export function sortThreadsForSidebar< | ... | @@ -600,11 +600,7 @@ export function sortThreadsForSidebar< |
| 600 | 600 | ||
| 601 | // Pinned-reorder key math and the keyed sort live in client-runtime | 601 | // Pinned-reorder key math and the keyed sort live in client-runtime |
| 602 | // (state/thread-sort) so web and mobile compute identical pinned orders. | 602 | // (state/thread-sort) so web and mobile compute identical pinned orders. |
| 603 | export { | 603 | export { pinOrderKeyBetween, planPinnedReorder } from "@t3tools/client-runtime/state/thread-sort"; |
| 604 | generateSpreadPinOrderKeys, | ||
| 605 | pinOrderKeyBetween, | ||
| 606 | planPinnedReorder, | ||
| 607 | } from "@t3tools/client-runtime/state/thread-sort"; | ||
| 608 | export { sortPinnedThreadsByOrderKey as sortPinnedThreadsForSidebar } from "@t3tools/client-runtime/state/thread-sort"; | 604 | export { sortPinnedThreadsByOrderKey as sortPinnedThreadsForSidebar } from "@t3tools/client-runtime/state/thread-sort"; |
| 609 | 605 | ||
| 610 | /** | 606 | /** |
apps/web/src/components/chat/MessagesTimeline.logic.ts-1| ... | @@ -16,7 +16,6 @@ export { | ... | @@ -16,7 +16,6 @@ export { |
| 16 | normalizeCompactToolLabel, | 16 | normalizeCompactToolLabel, |
| 17 | summarizeToolGroup, | 17 | summarizeToolGroup, |
| 18 | toolGroupAction, | 18 | toolGroupAction, |
| 19 | workLogEntryIsLocalCodeSearch, | ||
| 20 | } from "@t3tools/client-runtime/work-log/presentation"; | 19 | } from "@t3tools/client-runtime/work-log/presentation"; |
| 21 | import { | 20 | import { |
| 22 | formatDuration, | 21 | formatDuration, |
apps/web/src/logicalProject.ts-1| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | export { | 1 | export { |
| 2 | buildProjectGroups, | 2 | buildProjectGroups, |
| 3 | deriveLogicalProjectKey, | 3 | deriveLogicalProjectKey, |
| 4 | deriveLogicalProjectKeyFromRef, | ||
| 5 | deriveLogicalProjectKeyFromSettings, | 4 | deriveLogicalProjectKeyFromSettings, |
| 6 | derivePhysicalProjectKey, | 5 | derivePhysicalProjectKey, |
| 7 | derivePhysicalProjectKeyFromPath, | 6 | derivePhysicalProjectKeyFromPath, |
packages/client-runtime/src/authorization/index.ts-1| ... | @@ -2,6 +2,5 @@ export * from "./remote.ts"; | ... | @@ -2,6 +2,5 @@ export * from "./remote.ts"; |
| 2 | export { | 2 | export { |
| 3 | type AuthorizedRemoteEnvironment, | 3 | type AuthorizedRemoteEnvironment, |
| 4 | type AuthorizedRemoteHttpEnvironment, | 4 | type AuthorizedRemoteHttpEnvironment, |
| 5 | RemoteEnvironmentAuthorization, | ||
| 6 | } from "./service.ts"; | 5 | } from "./service.ts"; |
| 7 | export * as TokenStore from "./tokenStore.ts"; | 6 | export * as TokenStore from "./tokenStore.ts"; |
packages/client-runtime/src/authorization/remote.ts-1| ... | @@ -16,7 +16,6 @@ import { | ... | @@ -16,7 +16,6 @@ import { |
| 16 | } from "../rpc/http.ts"; | 16 | } from "../rpc/http.ts"; |
| 17 | 17 | ||
| 18 | export { | 18 | export { |
| 19 | RemoteEnvironmentAuthFetchError, | ||
| 20 | RemoteEnvironmentAuthInvalidJsonError, | 19 | RemoteEnvironmentAuthInvalidJsonError, |
| 21 | RemoteEnvironmentAuthTimeoutError, | 20 | RemoteEnvironmentAuthTimeoutError, |
| 22 | RemoteEnvironmentAuthUndeclaredStatusError, | 21 | RemoteEnvironmentAuthUndeclaredStatusError, |
packages/client-runtime/src/codexArtifactTemplates.ts+3-3| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | export const CODEX_ARTIFACT_TEMPLATE_KINDS = [ | 1 | const CODEX_ARTIFACT_TEMPLATE_KINDS = [ |
| 2 | "document", | 2 | "document", |
| 3 | "presentation", | 3 | "presentation", |
| 4 | "spreadsheet", | 4 | "spreadsheet", |
| ... | @@ -13,7 +13,7 @@ export const CODEX_ARTIFACT_TEMPLATE_KINDS = [ | ... | @@ -13,7 +13,7 @@ export const CODEX_ARTIFACT_TEMPLATE_KINDS = [ |
| 13 | 13 | ||
| 14 | export type CodexArtifactTemplateKind = (typeof CODEX_ARTIFACT_TEMPLATE_KINDS)[number]; | 14 | export type CodexArtifactTemplateKind = (typeof CODEX_ARTIFACT_TEMPLATE_KINDS)[number]; |
| 15 | 15 | ||
| 16 | export const CODEX_ARTIFACT_TEMPLATE_GALLERY_KINDS = ["imagegen", "product-design"] as const; | 16 | const CODEX_ARTIFACT_TEMPLATE_GALLERY_KINDS = ["imagegen", "product-design"] as const; |
| 17 | 17 | ||
| 18 | export type CodexArtifactTemplateGalleryKind = | 18 | export type CodexArtifactTemplateGalleryKind = |
| 19 | (typeof CODEX_ARTIFACT_TEMPLATE_GALLERY_KINDS)[number]; | 19 | (typeof CODEX_ARTIFACT_TEMPLATE_GALLERY_KINDS)[number]; |
| ... | @@ -26,7 +26,7 @@ export interface CodexArtifactTemplate { | ... | @@ -26,7 +26,7 @@ export interface CodexArtifactTemplate { |
| 26 | readonly skillName: string; | 26 | readonly skillName: string; |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | export const CODEX_ARTIFACT_TEMPLATE_LABEL_BY_KIND = { | 29 | const CODEX_ARTIFACT_TEMPLATE_LABEL_BY_KIND = { |
| 30 | document: "Document template", | 30 | document: "Document template", |
| 31 | presentation: "Presentation template", | 31 | presentation: "Presentation template", |
| 32 | spreadsheet: "Spreadsheet template", | 32 | spreadsheet: "Spreadsheet template", |
packages/client-runtime/src/connection/connectivity.ts+1-1| ... | @@ -13,7 +13,7 @@ export class Connectivity extends Context.Service< | ... | @@ -13,7 +13,7 @@ export class Connectivity extends Context.Service< |
| 13 | } | 13 | } |
| 14 | >()("@t3tools/client-runtime/connection/connectivity") {} | 14 | >()("@t3tools/client-runtime/connection/connectivity") {} |
| 15 | 15 | ||
| 16 | export const make = (service: Connectivity["Service"]) => Connectivity.of(service); | 16 | const make = (service: Connectivity["Service"]) => Connectivity.of(service); |
| 17 | 17 | ||
| 18 | export const layer = (service: Connectivity["Service"]) => | 18 | export const layer = (service: Connectivity["Service"]) => |
| 19 | Layer.succeed(Connectivity, make(service)); | 19 | Layer.succeed(Connectivity, make(service)); |
packages/client-runtime/src/connection/credentialStore.ts-4| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | import * as Context from "effect/Context"; | 1 | import * as Context from "effect/Context"; |
| 2 | import type * as Effect from "effect/Effect"; | 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Layer from "effect/Layer"; | ||
| 4 | import type * as Option from "effect/Option"; | 3 | import type * as Option from "effect/Option"; |
| 5 | 4 | ||
| 6 | import type { ConnectionCredential } from "./catalog.ts"; | 5 | import type { ConnectionCredential } from "./catalog.ts"; |
| ... | @@ -22,6 +21,3 @@ export class ConnectionCredentialStore extends Context.Service< | ... | @@ -22,6 +21,3 @@ export class ConnectionCredentialStore extends Context.Service< |
| 22 | 21 | ||
| 23 | export const make = (service: ConnectionCredentialStore["Service"]) => | 22 | export const make = (service: ConnectionCredentialStore["Service"]) => |
| 24 | ConnectionCredentialStore.of(service); | 23 | ConnectionCredentialStore.of(service); |
| 25 | |||
| 26 | export const layer = (service: ConnectionCredentialStore["Service"]) => | ||
| 27 | Layer.succeed(ConnectionCredentialStore, make(service)); |
packages/client-runtime/src/connection/driver.ts+1| ... | @@ -36,6 +36,7 @@ export class ConnectionDriver extends Context.Service< | ... | @@ -36,6 +36,7 @@ export class ConnectionDriver extends Context.Service< |
| 36 | } | 36 | } |
| 37 | >()("@t3tools/client-runtime/connection/driver/ConnectionDriver") {} | 37 | >()("@t3tools/client-runtime/connection/driver/ConnectionDriver") {} |
| 38 | 38 | ||
| 39 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 39 | export const make = Effect.gen(function* () { | 40 | export const make = Effect.gen(function* () { |
| 40 | const resolver = yield* ConnectionResolver.ConnectionResolver; | 41 | const resolver = yield* ConnectionResolver.ConnectionResolver; |
| 41 | const sessions = yield* RpcSession.RpcSessionFactory; | 42 | const sessions = yield* RpcSession.RpcSessionFactory; |
packages/client-runtime/src/connection/index.ts+1-12| ... | @@ -1,11 +1,7 @@ | ... | @@ -1,11 +1,7 @@ |
| 1 | export * from "./catalog.ts"; | 1 | export * from "./catalog.ts"; |
| 2 | export * as Connectivity from "./connectivity.ts"; | 2 | export * as Connectivity from "./connectivity.ts"; |
| 3 | export * as CredentialStore from "./credentialStore.ts"; | 3 | export * as CredentialStore from "./credentialStore.ts"; |
| 4 | export { | 4 | export { type ConnectionDriverProgress, type EnvironmentConnectionLease } from "./driver.ts"; |
| 5 | ConnectionDriver, | ||
| 6 | type ConnectionDriverProgress, | ||
| 7 | type EnvironmentConnectionLease, | ||
| 8 | } from "./driver.ts"; | ||
| 9 | export * from "./errors.ts"; | 5 | export * from "./errors.ts"; |
| 10 | export * as Connection from "./layer.ts"; | 6 | export * as Connection from "./layer.ts"; |
| 11 | export * from "./model.ts"; | 7 | export * from "./model.ts"; |
| ... | @@ -14,12 +10,6 @@ export { | ... | @@ -14,12 +10,6 @@ export { |
| 14 | ConnectionOnboarding, | 10 | ConnectionOnboarding, |
| 15 | type PairingConnectionInput, | 11 | type PairingConnectionInput, |
| 16 | type SshConnectionInput, | 12 | type SshConnectionInput, |
| 17 | prepareBearerConnectionUpdate, | ||
| 18 | preparePairingRegistration, | ||
| 19 | prepareSshRegistration, | ||
| 20 | registerPairingConnection, | ||
| 21 | registerSshConnection, | ||
| 22 | updateBearerConnection, | ||
| 23 | } from "./onboarding.ts"; | 13 | } from "./onboarding.ts"; |
| 24 | export * from "./presentation.ts"; | 14 | export * from "./presentation.ts"; |
| 25 | export * as ProfileStore from "./profileStore.ts"; | 15 | export * as ProfileStore from "./profileStore.ts"; |
| ... | @@ -28,6 +18,5 @@ export { | ... | @@ -28,6 +18,5 @@ export { |
| 28 | EnvironmentRegistry, | 18 | EnvironmentRegistry, |
| 29 | PlatformEnvironmentRemovalError, | 19 | PlatformEnvironmentRemovalError, |
| 30 | } from "./registry.ts"; | 20 | } from "./registry.ts"; |
| 31 | export { ConnectionResolver } from "./resolver.ts"; | ||
| 32 | export { EnvironmentSupervisor, type EnvironmentSupervisorOptions } from "./supervisor.ts"; | 21 | export { EnvironmentSupervisor, type EnvironmentSupervisorOptions } from "./supervisor.ts"; |
| 33 | export * as Wakeups from "./wakeups.ts"; | 22 | export * as Wakeups from "./wakeups.ts"; |
packages/client-runtime/src/connection/onboarding.ts+4-3| ... | @@ -118,7 +118,7 @@ export const preparePairingRegistration = Effect.fn( | ... | @@ -118,7 +118,7 @@ export const preparePairingRegistration = Effect.fn( |
| 118 | }); | 118 | }); |
| 119 | }); | 119 | }); |
| 120 | 120 | ||
| 121 | export const registerPairingConnection = Effect.fn( | 121 | const registerPairingConnection = Effect.fn( |
| 122 | "clientRuntime.connection.onboarding.registerPairingConnection", | 122 | "clientRuntime.connection.onboarding.registerPairingConnection", |
| 123 | )(function* (input: PairingConnectionInput) { | 123 | )(function* (input: PairingConnectionInput) { |
| 124 | const registration = yield* preparePairingRegistration(input); | 124 | const registration = yield* preparePairingRegistration(input); |
| ... | @@ -130,7 +130,7 @@ export const registerPairingConnection = Effect.fn( | ... | @@ -130,7 +130,7 @@ export const registerPairingConnection = Effect.fn( |
| 130 | const isBearerCredential = Schema.is(BearerConnectionCredential); | 130 | const isBearerCredential = Schema.is(BearerConnectionCredential); |
| 131 | const isBearerProfile = Schema.is(BearerConnectionProfile); | 131 | const isBearerProfile = Schema.is(BearerConnectionProfile); |
| 132 | 132 | ||
| 133 | export const updateBearerConnection = Effect.fn( | 133 | const updateBearerConnection = Effect.fn( |
| 134 | "clientRuntime.connection.onboarding.updateBearerConnection", | 134 | "clientRuntime.connection.onboarding.updateBearerConnection", |
| 135 | )(function* (input: BearerConnectionUpdateInput) { | 135 | )(function* (input: BearerConnectionUpdateInput) { |
| 136 | const registry = yield* EnvironmentRegistry.EnvironmentRegistry; | 136 | const registry = yield* EnvironmentRegistry.EnvironmentRegistry; |
| ... | @@ -233,7 +233,7 @@ export const prepareSshRegistration = Effect.fn( | ... | @@ -233,7 +233,7 @@ export const prepareSshRegistration = Effect.fn( |
| 233 | }); | 233 | }); |
| 234 | }); | 234 | }); |
| 235 | 235 | ||
| 236 | export const registerSshConnection = Effect.fn( | 236 | const registerSshConnection = Effect.fn( |
| 237 | "clientRuntime.connection.onboarding.registerSshConnection", | 237 | "clientRuntime.connection.onboarding.registerSshConnection", |
| 238 | )(function* (input: SshConnectionInput) { | 238 | )(function* (input: SshConnectionInput) { |
| 239 | const registration = yield* prepareSshRegistration(input); | 239 | const registration = yield* prepareSshRegistration(input); |
| ... | @@ -242,6 +242,7 @@ export const registerSshConnection = Effect.fn( | ... | @@ -242,6 +242,7 @@ export const registerSshConnection = Effect.fn( |
| 242 | return registration.target.environmentId; | 242 | return registration.target.environmentId; |
| 243 | }); | 243 | }); |
| 244 | 244 | ||
| 245 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 245 | export const make = Effect.gen(function* () { | 246 | export const make = Effect.gen(function* () { |
| 246 | const registry = yield* EnvironmentRegistry.EnvironmentRegistry; | 247 | const registry = yield* EnvironmentRegistry.EnvironmentRegistry; |
| 247 | const presentation = yield* ClientCapabilities.ClientPresentation; | 248 | const presentation = yield* ClientCapabilities.ClientPresentation; |
packages/client-runtime/src/connection/profileStore.ts-4| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | import * as Context from "effect/Context"; | 1 | import * as Context from "effect/Context"; |
| 2 | import type * as Effect from "effect/Effect"; | 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Layer from "effect/Layer"; | ||
| 4 | import type * as Option from "effect/Option"; | 3 | import type * as Option from "effect/Option"; |
| 5 | 4 | ||
| 6 | import type { ConnectionProfile } from "./catalog.ts"; | 5 | import type { ConnectionProfile } from "./catalog.ts"; |
| ... | @@ -19,6 +18,3 @@ export class ConnectionProfileStore extends Context.Service< | ... | @@ -19,6 +18,3 @@ export class ConnectionProfileStore extends Context.Service< |
| 19 | 18 | ||
| 20 | export const make = (service: ConnectionProfileStore["Service"]) => | 19 | export const make = (service: ConnectionProfileStore["Service"]) => |
| 21 | ConnectionProfileStore.of(service); | 20 | ConnectionProfileStore.of(service); |
| 22 | |||
| 23 | export const layer = (service: ConnectionProfileStore["Service"]) => | ||
| 24 | Layer.succeed(ConnectionProfileStore, make(service)); |
packages/client-runtime/src/connection/registry.ts+1| ... | @@ -125,6 +125,7 @@ interface EnvironmentServiceScope { | ... | @@ -125,6 +125,7 @@ interface EnvironmentServiceScope { |
| 125 | readonly scope: Scope.Closeable; | 125 | readonly scope: Scope.Closeable; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 128 | export const make = Effect.gen(function* () { | 129 | export const make = Effect.gen(function* () { |
| 129 | const registryScope = yield* Scope.Scope; | 130 | const registryScope = yield* Scope.Scope; |
| 130 | const storage = yield* Persistence.ConnectionTargetStore; | 131 | const storage = yield* Persistence.ConnectionTargetStore; |
packages/client-runtime/src/connection/resolver.ts+1| ... | @@ -218,6 +218,7 @@ const makeSshBroker = Effect.fn("clientRuntime.connection.broker.makeSsh")(funct | ... | @@ -218,6 +218,7 @@ const makeSshBroker = Effect.fn("clientRuntime.connection.broker.makeSsh")(funct |
| 218 | }); | 218 | }); |
| 219 | }); | 219 | }); |
| 220 | 220 | ||
| 221 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 221 | export const make = Effect.gen(function* () { | 222 | export const make = Effect.gen(function* () { |
| 222 | const primary = yield* makePrimaryBroker(); | 223 | const primary = yield* makePrimaryBroker(); |
| 223 | const bearer = yield* makeBearerBroker(); | 224 | const bearer = yield* makeBearerBroker(); |
packages/client-runtime/src/connection/supervisor.ts-12| ... | @@ -5,7 +5,6 @@ import * as Context from "effect/Context"; | ... | @@ -5,7 +5,6 @@ import * as Context from "effect/Context"; |
| 5 | import * as Effect from "effect/Effect"; | 5 | import * as Effect from "effect/Effect"; |
| 6 | import * as Exit from "effect/Exit"; | 6 | import * as Exit from "effect/Exit"; |
| 7 | import * as Fiber from "effect/Fiber"; | 7 | import * as Fiber from "effect/Fiber"; |
| 8 | import * as Layer from "effect/Layer"; | ||
| 9 | import * as Option from "effect/Option"; | 8 | import * as Option from "effect/Option"; |
| 10 | import * as Queue from "effect/Queue"; | 9 | import * as Queue from "effect/Queue"; |
| 11 | import * as Ref from "effect/Ref"; | 10 | import * as Ref from "effect/Ref"; |
| ... | @@ -798,14 +797,3 @@ export const make = Effect.fn("EnvironmentSupervisor.make")(function* ( | ... | @@ -798,14 +797,3 @@ export const make = Effect.fn("EnvironmentSupervisor.make")(function* ( |
| 798 | retryNow, | 797 | retryNow, |
| 799 | }); | 798 | }); |
| 800 | }); | 799 | }); |
| 801 | |||
| 802 | export const layer = ( | ||
| 803 | entry: ConnectionCatalogEntry, | ||
| 804 | options?: EnvironmentSupervisorOptions, | ||
| 805 | ): Layer.Layer< | ||
| 806 | EnvironmentSupervisor, | ||
| 807 | never, | ||
| 808 | | Connectivity.Connectivity | ||
| 809 | | ConnectionDriver.ConnectionDriver | ||
| 810 | | ConnectionWakeups.ConnectionWakeups | ||
| 811 | > => Layer.effect(EnvironmentSupervisor, make(entry, options)); |
packages/client-runtime/src/connection/wakeups.ts+1-1| ... | @@ -27,7 +27,7 @@ export class ConnectionWakeups extends Context.Service< | ... | @@ -27,7 +27,7 @@ export class ConnectionWakeups extends Context.Service< |
| 27 | } | 27 | } |
| 28 | >()("@t3tools/client-runtime/connection/wakeups/ConnectionWakeups") {} | 28 | >()("@t3tools/client-runtime/connection/wakeups/ConnectionWakeups") {} |
| 29 | 29 | ||
| 30 | export const make = (service: ConnectionWakeups["Service"]) => ConnectionWakeups.of(service); | 30 | const make = (service: ConnectionWakeups["Service"]) => ConnectionWakeups.of(service); |
| 31 | 31 | ||
| 32 | export const layer = (service: ConnectionWakeups["Service"]) => | 32 | export const layer = (service: ConnectionWakeups["Service"]) => |
| 33 | Layer.succeed(ConnectionWakeups, make(service)); | 33 | Layer.succeed(ConnectionWakeups, make(service)); |
packages/client-runtime/src/relay/discovery.ts+1| ... | @@ -102,6 +102,7 @@ function relayAccountId(clerkToken: string): Option.Option<string> { | ... | @@ -102,6 +102,7 @@ function relayAccountId(clerkToken: string): Option.Option<string> { |
| 102 | } | 102 | } |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 105 | export const make = Effect.fn("RelayEnvironmentDiscovery.make")(function* () { | 106 | export const make = Effect.fn("RelayEnvironmentDiscovery.make")(function* () { |
| 106 | const relay = yield* ManagedRelay.ManagedRelayClient; | 107 | const relay = yield* ManagedRelay.ManagedRelayClient; |
| 107 | const session = yield* ClientCapabilities.CloudSession; | 108 | const session = yield* ClientCapabilities.CloudSession; |
packages/client-runtime/src/relay/errorPresentation.ts+1-1| ... | @@ -11,7 +11,7 @@ export const DPOP_UNKNOWN_HINT = | ... | @@ -11,7 +11,7 @@ export const DPOP_UNKNOWN_HINT = |
| 11 | 11 | ||
| 12 | export const DPOP_RETRY_HINT = "Hint: Try again. If the problem continues, copy the trace ID."; | 12 | export const DPOP_RETRY_HINT = "Hint: Try again. If the problem continues, copy the trace ID."; |
| 13 | 13 | ||
| 14 | export function dpopFailureHint(reason: DpopFailureReason | undefined): string { | 14 | function dpopFailureHint(reason: DpopFailureReason | undefined): string { |
| 15 | if (reason === "time_window") return DPOP_CLOCK_HINT; | 15 | if (reason === "time_window") return DPOP_CLOCK_HINT; |
| 16 | if (reason === undefined) return DPOP_UNKNOWN_HINT; | 16 | if (reason === undefined) return DPOP_UNKNOWN_HINT; |
| 17 | return DPOP_RETRY_HINT; | 17 | return DPOP_RETRY_HINT; |
packages/client-runtime/src/relay/managedRelay.ts+1| ... | @@ -429,6 +429,7 @@ function disabledManagedRelayClient(relayUrl: string): ManagedRelayClient["Servi | ... | @@ -429,6 +429,7 @@ function disabledManagedRelayClient(relayUrl: string): ManagedRelayClient["Servi |
| 429 | }); | 429 | }); |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 432 | export const make = Effect.fn("ManagedRelayClient.make")(function* ( | 433 | export const make = Effect.fn("ManagedRelayClient.make")(function* ( |
| 433 | options: ManagedRelayClientLayerOptions, | 434 | options: ManagedRelayClientLayerOptions, |
| 434 | ) { | 435 | ) { |
packages/client-runtime/src/rpc/client.ts-5| ... | @@ -325,8 +325,3 @@ export function subscribe<TTag extends EnvironmentSubscriptionRpcTag>( | ... | @@ -325,8 +325,3 @@ export function subscribe<TTag extends EnvironmentSubscriptionRpcTag>( |
| 325 | > { | 325 | > { |
| 326 | return subscribeDynamic(tag, () => Effect.succeed(input), options); | 326 | return subscribeDynamic(tag, () => Effect.succeed(input), options); |
| 327 | } | 327 | } |
| 328 | |||
| 329 | export const config = Effect.gen(function* () { | ||
| 330 | const session = yield* currentSession(); | ||
| 331 | return yield* session.initialConfig; | ||
| 332 | }).pipe(Effect.withSpan("EnvironmentRpc.config")); |
packages/client-runtime/src/rpc/index.ts+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | export * from "./client.ts"; | 1 | export * from "./client.ts"; |
| 2 | export * from "./http.ts"; | 2 | export * from "./http.ts"; |
| 3 | export * from "./protocol.ts"; | 3 | export * from "./protocol.ts"; |
| 4 | export { type RpcSession, RpcSessionFactory } from "./session.ts"; | 4 | export { type RpcSession } from "./session.ts"; |
packages/client-runtime/src/rpc/session.ts+1-2| ... | @@ -145,6 +145,7 @@ function mapSessionRpcError( | ... | @@ -145,6 +145,7 @@ function mapSessionRpcError( |
| 145 | } | 145 | } |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 148 | export const make = Effect.fn("RpcSessionFactory.make")(function* ( | 149 | export const make = Effect.fn("RpcSessionFactory.make")(function* ( |
| 149 | options: RpcSessionOptions = {}, | 150 | options: RpcSessionOptions = {}, |
| 150 | ) { | 151 | ) { |
| ... | @@ -369,5 +370,3 @@ export const make = Effect.fn("RpcSessionFactory.make")(function* ( | ... | @@ -369,5 +370,3 @@ export const make = Effect.fn("RpcSessionFactory.make")(function* ( |
| 369 | 370 | ||
| 370 | export const layerWithOptions = (options: RpcSessionOptions) => | 371 | export const layerWithOptions = (options: RpcSessionOptions) => |
| 371 | Layer.effect(RpcSessionFactory, make(options)); | 372 | Layer.effect(RpcSessionFactory, make(options)); |
| 372 | |||
| 373 | export const layer = layerWithOptions({}); |
packages/client-runtime/src/state/auth.ts+1-1| ... | @@ -61,7 +61,7 @@ export function applyAuthAccessStreamEvent( | ... | @@ -61,7 +61,7 @@ export function applyAuthAccessStreamEvent( |
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | export function projectAuthAccessSnapshot( | 64 | function projectAuthAccessSnapshot( |
| 65 | current: AuthAccessSnapshot, | 65 | current: AuthAccessSnapshot, |
| 66 | event: AuthAccessStreamEvent, | 66 | event: AuthAccessStreamEvent, |
| 67 | ): readonly [AuthAccessSnapshot, ReadonlyArray<AuthAccessStreamEvent>] { | 67 | ): readonly [AuthAccessSnapshot, ReadonlyArray<AuthAccessStreamEvent>] { |
packages/client-runtime/src/state/connections.ts+1-1| ... | @@ -20,7 +20,7 @@ export interface EnvironmentCatalogState { | ... | @@ -20,7 +20,7 @@ export interface EnvironmentCatalogState { |
| 20 | readonly entries: ReadonlyMap<EnvironmentIdType, ConnectionCatalogEntry>; | 20 | readonly entries: ReadonlyMap<EnvironmentIdType, ConnectionCatalogEntry>; |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | export const EMPTY_ENVIRONMENT_CATALOG_STATE: EnvironmentCatalogState = Object.freeze({ | 23 | const EMPTY_ENVIRONMENT_CATALOG_STATE: EnvironmentCatalogState = Object.freeze({ |
| 24 | isReady: false, | 24 | isReady: false, |
| 25 | entries: new Map(), | 25 | entries: new Map(), |
| 26 | }); | 26 | }); |
packages/client-runtime/src/state/environmentHttpAuth.ts+2-2| ... | @@ -27,7 +27,7 @@ export interface EnvironmentHttpAuthHeaders { | ... | @@ -27,7 +27,7 @@ export interface EnvironmentHttpAuthHeaders { |
| 27 | * per-request via `FetchHttpClient.RequestInit`, which the fetch client reads | 27 | * per-request via `FetchHttpClient.RequestInit`, which the fetch client reads |
| 28 | * from the fiber context at request time. | 28 | * from the fiber context at request time. |
| 29 | */ | 29 | */ |
| 30 | export const withEnvironmentCredentials = <A, E, R>( | 30 | const withEnvironmentCredentials = <A, E, R>( |
| 31 | authorization: PreparedHttpAuthorization | null, | 31 | authorization: PreparedHttpAuthorization | null, |
| 32 | request: Effect.Effect<A, E, R>, | 32 | request: Effect.Effect<A, E, R>, |
| 33 | ): Effect.Effect<A, E, R> => | 33 | ): Effect.Effect<A, E, R> => |
| ... | @@ -46,7 +46,7 @@ export const withEnvironmentCredentials = <A, E, R>( | ... | @@ -46,7 +46,7 @@ export const withEnvironmentCredentials = <A, E, R>( |
| 46 | * for relay/DPoP connections, so bearer/primary connections work even when no | 46 | * for relay/DPoP connections, so bearer/primary connections work even when no |
| 47 | * signer is available. | 47 | * signer is available. |
| 48 | */ | 48 | */ |
| 49 | export const buildEnvironmentAuthHeaders = ( | 49 | const buildEnvironmentAuthHeaders = ( |
| 50 | authorization: PreparedHttpAuthorization | null, | 50 | authorization: PreparedHttpAuthorization | null, |
| 51 | method: HttpMethod.HttpMethod, | 51 | method: HttpMethod.HttpMethod, |
| 52 | url: string, | 52 | url: string, |
packages/client-runtime/src/state/gitActions.ts-82| ... | @@ -1,10 +1,8 @@ | ... | @@ -1,10 +1,8 @@ |
| 1 | import type { | 1 | import type { |
| 2 | GitRunStackedActionInput, | 2 | GitRunStackedActionInput, |
| 3 | GitRunStackedActionResult, | ||
| 4 | GitStackedAction, | 3 | GitStackedAction, |
| 5 | VcsStatusResult, | 4 | VcsStatusResult, |
| 6 | } from "@t3tools/contracts"; | 5 | } from "@t3tools/contracts"; |
| 7 | import { isTemporaryWorktreeBranch } from "@t3tools/shared/git"; | ||
| 8 | 6 | ||
| 9 | export type GitActionIconName = "commit" | "push" | "pr"; | 7 | export type GitActionIconName = "commit" | "push" | "pr"; |
| 10 | 8 | ||
| ... | @@ -44,44 +42,6 @@ export type GitActionRequestInput = Pick< | ... | @@ -44,44 +42,6 @@ export type GitActionRequestInput = Pick< |
| 44 | "action" | "commitMessage" | "featureBranch" | "filePaths" | 42 | "action" | "commitMessage" | "featureBranch" | "filePaths" |
| 45 | >; | 43 | >; |
| 46 | 44 | ||
| 47 | export function buildGitActionProgressStages(input: { | ||
| 48 | action: GitStackedAction; | ||
| 49 | hasCustomCommitMessage: boolean; | ||
| 50 | hasWorkingTreeChanges: boolean; | ||
| 51 | pushTarget?: string; | ||
| 52 | featureBranch?: boolean; | ||
| 53 | shouldPushBeforePr?: boolean; | ||
| 54 | }): string[] { | ||
| 55 | const branchStages = input.featureBranch ? ["Preparing feature branch..."] : []; | ||
| 56 | const pushStage = input.pushTarget ? `Pushing to ${input.pushTarget}...` : "Pushing..."; | ||
| 57 | const prStages = [ | ||
| 58 | "Preparing PR...", | ||
| 59 | "Generating PR content...", | ||
| 60 | "Creating GitHub pull request...", | ||
| 61 | ]; | ||
| 62 | |||
| 63 | if (input.action === "push") { | ||
| 64 | return [pushStage]; | ||
| 65 | } | ||
| 66 | if (input.action === "create_pr") { | ||
| 67 | return input.shouldPushBeforePr ? [pushStage, ...prStages] : prStages; | ||
| 68 | } | ||
| 69 | |||
| 70 | const shouldIncludeCommitStages = input.action === "commit" || input.hasWorkingTreeChanges; | ||
| 71 | const commitStages = !shouldIncludeCommitStages | ||
| 72 | ? [] | ||
| 73 | : input.hasCustomCommitMessage | ||
| 74 | ? ["Committing..."] | ||
| 75 | : ["Generating commit message...", "Committing..."]; | ||
| 76 | if (input.action === "commit") { | ||
| 77 | return [...branchStages, ...commitStages]; | ||
| 78 | } | ||
| 79 | if (input.action === "commit_push") { | ||
| 80 | return [...branchStages, ...commitStages, pushStage]; | ||
| 81 | } | ||
| 82 | return [...branchStages, ...commitStages, pushStage, ...prStages]; | ||
| 83 | } | ||
| 84 | |||
| 85 | export function buildMenuItems( | 45 | export function buildMenuItems( |
| 86 | gitStatus: VcsStatusResult | null, | 46 | gitStatus: VcsStatusResult | null, |
| 87 | isBusy: boolean, | 47 | isBusy: boolean, |
| ... | @@ -396,45 +356,3 @@ export function resolveDefaultBranchActionDialogCopy(input: { | ... | @@ -396,45 +356,3 @@ export function resolveDefaultBranchActionDialogCopy(input: { |
| 396 | continueLabel: "Push & create PR", | 356 | continueLabel: "Push & create PR", |
| 397 | }; | 357 | }; |
| 398 | } | 358 | } |
| 399 | |||
| 400 | export function resolveThreadBranchUpdate( | ||
| 401 | result: GitRunStackedActionResult, | ||
| 402 | ): { branch: string } | null { | ||
| 403 | if (result.branch.status !== "created" || !result.branch.name) { | ||
| 404 | return null; | ||
| 405 | } | ||
| 406 | |||
| 407 | return { | ||
| 408 | branch: result.branch.name, | ||
| 409 | }; | ||
| 410 | } | ||
| 411 | |||
| 412 | export function resolveLiveThreadBranchUpdate(input: { | ||
| 413 | threadBranch: string | null; | ||
| 414 | gitStatus: VcsStatusResult | null; | ||
| 415 | }): { branch: string | null } | null { | ||
| 416 | if (!input.gitStatus) { | ||
| 417 | return null; | ||
| 418 | } | ||
| 419 | |||
| 420 | if (input.gitStatus.refName === null && input.threadBranch !== null) { | ||
| 421 | return null; | ||
| 422 | } | ||
| 423 | |||
| 424 | if (input.threadBranch === input.gitStatus.refName) { | ||
| 425 | return null; | ||
| 426 | } | ||
| 427 | |||
| 428 | if ( | ||
| 429 | input.threadBranch !== null && | ||
| 430 | input.gitStatus.refName !== null && | ||
| 431 | !isTemporaryWorktreeBranch(input.threadBranch) && | ||
| 432 | isTemporaryWorktreeBranch(input.gitStatus.refName) | ||
| 433 | ) { | ||
| 434 | return null; | ||
| 435 | } | ||
| 436 | |||
| 437 | return { | ||
| 438 | branch: input.gitStatus.refName, | ||
| 439 | }; | ||
| 440 | } |
packages/client-runtime/src/state/projectGrouping.ts-13| ... | @@ -152,19 +152,6 @@ export function deriveLogicalProjectKeyFromSettings( | ... | @@ -152,19 +152,6 @@ export function deriveLogicalProjectKeyFromSettings( |
| 152 | }); | 152 | }); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | export function deriveLogicalProjectKeyFromRef( | ||
| 156 | projectRef: ScopedProjectRef, | ||
| 157 | project: | ||
| 158 | | Pick<EnvironmentProject, "environmentId" | "id" | "workspaceRoot" | "repositoryIdentity"> | ||
| 159 | | null | ||
| 160 | | undefined, | ||
| 161 | options?: { | ||
| 162 | readonly groupingMode?: SidebarProjectGroupingMode; | ||
| 163 | }, | ||
| 164 | ): string { | ||
| 165 | return project ? deriveLogicalProjectKey(project, options) : scopedProjectKey(projectRef); | ||
| 166 | } | ||
| 167 | |||
| 168 | export function deriveProjectGroupLabel(input: { | 155 | export function deriveProjectGroupLabel(input: { |
| 169 | readonly representative: Pick<EnvironmentProject, "title" | "repositoryIdentity">; | 156 | readonly representative: Pick<EnvironmentProject, "title" | "repositoryIdentity">; |
| 170 | readonly members: ReadonlyArray<Pick<EnvironmentProject, "title" | "repositoryIdentity">>; | 157 | readonly members: ReadonlyArray<Pick<EnvironmentProject, "title" | "repositoryIdentity">>; |
packages/client-runtime/src/state/pullRequests.ts+2-1| ... | @@ -29,11 +29,12 @@ export { | ... | @@ -29,11 +29,12 @@ export { |
| 29 | pullRequestDiffLoaderLayer, | 29 | pullRequestDiffLoaderLayer, |
| 30 | } from "./pullRequestDiffHttp.ts"; | 30 | } from "./pullRequestDiffHttp.ts"; |
| 31 | 31 | ||
| 32 | /** @public Required to name the error in consumers' inferred pull request results. */ | ||
| 32 | export class EnvironmentHttpConnectionNotReadyError extends Data.TaggedError( | 33 | export class EnvironmentHttpConnectionNotReadyError extends Data.TaggedError( |
| 33 | "EnvironmentHttpConnectionNotReadyError", | 34 | "EnvironmentHttpConnectionNotReadyError", |
| 34 | )<{ readonly message: string }> {} | 35 | )<{ readonly message: string }> {} |
| 35 | 36 | ||
| 36 | export const LINKED_PULL_REQUEST_IDLE_TTL_MS = 5_000; | 37 | const LINKED_PULL_REQUEST_IDLE_TTL_MS = 5_000; |
| 37 | 38 | ||
| 38 | function createPullRequestRefreshAtomFamily<R, E>( | 39 | function createPullRequestRefreshAtomFamily<R, E>( |
| 39 | runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>, | 40 | runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>, |
packages/client-runtime/src/state/runtime.ts+1-26| ... | @@ -390,31 +390,6 @@ export function createRuntimeCommand<R, ER, W, A, E>( | ... | @@ -390,31 +390,6 @@ export function createRuntimeCommand<R, ER, W, A, E>( |
| 390 | }; | 390 | }; |
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | export function createRuntimeStreamCommand<R, ER, W, A, E>( | ||
| 394 | runtime: Atom.AtomRuntime<R, ER>, | ||
| 395 | options: { | ||
| 396 | readonly label: string; | ||
| 397 | readonly execute: (input: W, registry: AtomRegistry.AtomRegistry) => Stream.Stream<A, E, R>; | ||
| 398 | readonly scheduler?: AtomCommandScheduler; | ||
| 399 | readonly concurrency?: AtomCommandConcurrency<W>; | ||
| 400 | }, | ||
| 401 | ): AtomCommand<W, A, E | ER | Cause.NoSuchElementError> { | ||
| 402 | const scheduler = options.scheduler ?? createAtomCommandScheduler(); | ||
| 403 | const concurrency = options.concurrency ?? { mode: "parallel" as const }; | ||
| 404 | return { | ||
| 405 | label: options.label, | ||
| 406 | run: (registry, input) => | ||
| 407 | settleAtomCommandResult(() => | ||
| 408 | scheduler.schedule(registry, concurrency, input, () => { | ||
| 409 | const atom = runtime | ||
| 410 | .atom(options.execute(input, registry)) | ||
| 411 | .pipe(Atom.withLabel(options.label)); | ||
| 412 | return executeAtomQuery(registry, atom, { reportDefect: false, reportFailure: false }); | ||
| 413 | }), | ||
| 414 | ), | ||
| 415 | }; | ||
| 416 | } | ||
| 417 | |||
| 418 | export function reportAtomCommandResult( | 393 | export function reportAtomCommandResult( |
| 419 | result: AtomCommandResult<unknown, unknown>, | 394 | result: AtomCommandResult<unknown, unknown>, |
| 420 | options: AtomCommandOptions = {}, | 395 | options: AtomCommandOptions = {}, |
| ... | @@ -462,7 +437,7 @@ function parseEnvironmentRpcKey<Input>(key: string): { | ... | @@ -462,7 +437,7 @@ function parseEnvironmentRpcKey<Input>(key: string): { |
| 462 | }; | 437 | }; |
| 463 | } | 438 | } |
| 464 | 439 | ||
| 465 | export function runInEnvironment<A, E, R>( | 440 | function runInEnvironment<A, E, R>( |
| 466 | environmentId: EnvironmentIdType, | 441 | environmentId: EnvironmentIdType, |
| 467 | effect: Effect.Effect<A, E, R>, | 442 | effect: Effect.Effect<A, E, R>, |
| 468 | ): Effect.Effect< | 443 | ): Effect.Effect< |
packages/client-runtime/src/state/server.ts+2-2| ... | @@ -455,7 +455,7 @@ export const makeEnvironmentServerConfigState = Effect.fn("EnvironmentServerConf | ... | @@ -455,7 +455,7 @@ export const makeEnvironmentServerConfigState = Effect.fn("EnvironmentServerConf |
| 455 | }, | 455 | }, |
| 456 | ); | 456 | ); |
| 457 | 457 | ||
| 458 | export function serverConfigStateChanges( | 458 | function serverConfigStateChanges( |
| 459 | environmentId: EnvironmentId, | 459 | environmentId: EnvironmentId, |
| 460 | subscription: ServerConfigSubscriptionOptions, | 460 | subscription: ServerConfigSubscriptionOptions, |
| 461 | ) { | 461 | ) { |
| ... | @@ -580,7 +580,7 @@ export const makeEnvironmentServerWelcomeState = Effect.fn("EnvironmentServerWel | ... | @@ -580,7 +580,7 @@ export const makeEnvironmentServerWelcomeState = Effect.fn("EnvironmentServerWel |
| 580 | }, | 580 | }, |
| 581 | ); | 581 | ); |
| 582 | 582 | ||
| 583 | export function serverWelcomeStateChanges(environmentId: EnvironmentId) { | 583 | function serverWelcomeStateChanges(environmentId: EnvironmentId) { |
| 584 | return followStreamInEnvironment( | 584 | return followStreamInEnvironment( |
| 585 | environmentId, | 585 | environmentId, |
| 586 | Stream.unwrap( | 586 | Stream.unwrap( |
packages/client-runtime/src/state/sharedSettings.ts+1-1| ... | @@ -20,7 +20,7 @@ import * as Struct from "effect/Struct"; | ... | @@ -20,7 +20,7 @@ import * as Struct from "effect/Struct"; |
| 20 | import type { EnvironmentConnectionPhase } from "../connection/presentation.ts"; | 20 | import type { EnvironmentConnectionPhase } from "../connection/presentation.ts"; |
| 21 | 21 | ||
| 22 | /** Server keys that hold a user preference rather than machine config. */ | 22 | /** Server keys that hold a user preference rather than machine config. */ |
| 23 | export const SHARED_SERVER_SETTING_KEYS = [ | 23 | const SHARED_SERVER_SETTING_KEYS = [ |
| 24 | "continueThreadsAfterServerUpdate", | 24 | "continueThreadsAfterServerUpdate", |
| 25 | "sidebarAutoSettleAfterDays", | 25 | "sidebarAutoSettleAfterDays", |
| 26 | "sidebarAutoSettleOnMerge", | 26 | "sidebarAutoSettleOnMerge", |
packages/client-runtime/src/state/shell.ts+1-1| ... | @@ -269,7 +269,7 @@ export const makeEnvironmentShellState = Effect.fn("EnvironmentShellState.make") | ... | @@ -269,7 +269,7 @@ export const makeEnvironmentShellState = Effect.fn("EnvironmentShellState.make") |
| 269 | return state; | 269 | return state; |
| 270 | }); | 270 | }); |
| 271 | 271 | ||
| 272 | export function shellStateChanges(environmentId: EnvironmentId) { | 272 | function shellStateChanges(environmentId: EnvironmentId) { |
| 273 | return followStreamInEnvironment( | 273 | return followStreamInEnvironment( |
| 274 | environmentId, | 274 | environmentId, |
| 275 | Stream.unwrap(makeEnvironmentShellState().pipe(Effect.map(SubscriptionRef.changes))), | 275 | Stream.unwrap(makeEnvironmentShellState().pipe(Effect.map(SubscriptionRef.changes))), |
packages/client-runtime/src/state/terminalSession.ts+1-1| ... | @@ -96,7 +96,7 @@ export function nextTerminalAttachSeedState(): TerminalBufferState { | ... | @@ -96,7 +96,7 @@ export function nextTerminalAttachSeedState(): TerminalBufferState { |
| 96 | }; | 96 | }; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | export function terminalBufferStateFromSnapshot( | 99 | function terminalBufferStateFromSnapshot( |
| 100 | snapshot: TerminalSessionSnapshot, | 100 | snapshot: TerminalSessionSnapshot, |
| 101 | maxBufferBytes: number, | 101 | maxBufferBytes: number, |
| 102 | current: TerminalBufferState = EMPTY_TERMINAL_BUFFER_STATE, | 102 | current: TerminalBufferState = EMPTY_TERMINAL_BUFFER_STATE, |
packages/client-runtime/src/state/threadSort.ts+1-1| ... | @@ -209,7 +209,7 @@ export function pinOrderKeyBetween(before: string | null, after: string | null): | ... | @@ -209,7 +209,7 @@ export function pinOrderKeyBetween(before: string | null, after: string | null): |
| 209 | drop lands next to keyless threads, so single-key insertion has nothing | 209 | drop lands next to keyless threads, so single-key insertion has nothing |
| 210 | to anchor on). Two base-26 digits give 675 slots — far beyond any real | 210 | to anchor on). Two base-26 digits give 675 slots — far beyond any real |
| 211 | pinned section — with monotonicity enforced as a belt-and-braces. */ | 211 | pinned section — with monotonicity enforced as a belt-and-braces. */ |
| 212 | export function generateSpreadPinOrderKeys(count: number): string[] { | 212 | function generateSpreadPinOrderKeys(count: number): string[] { |
| 213 | const space = PIN_ORDER_DIGITS.length * PIN_ORDER_DIGITS.length; | 213 | const space = PIN_ORDER_DIGITS.length * PIN_ORDER_DIGITS.length; |
| 214 | const step = space / (count + 1); | 214 | const step = space / (count + 1); |
| 215 | const keys: string[] = []; | 215 | const keys: string[] = []; |
packages/client-runtime/src/state/threads.ts+3-3| ... | @@ -47,7 +47,7 @@ function statusWithoutLiveData(data: Option.Option<OrchestrationThread>): Enviro | ... | @@ -47,7 +47,7 @@ function statusWithoutLiveData(data: Option.Option<OrchestrationThread>): Enviro |
| 47 | * observed threads stays around 100K gzipped while median threads load fully. | 47 | * observed threads stays around 100K gzipped while median threads load fully. |
| 48 | */ | 48 | */ |
| 49 | export const INITIAL_THREAD_USER_TURN_LIMIT = 10; | 49 | export const INITIAL_THREAD_USER_TURN_LIMIT = 10; |
| 50 | export const OLDER_THREAD_PAGE_USER_TURN_LIMIT = 20; | 50 | const OLDER_THREAD_PAGE_USER_TURN_LIMIT = 20; |
| 51 | 51 | ||
| 52 | function pageStateFromSnapshot( | 52 | function pageStateFromSnapshot( |
| 53 | page: OrchestrationThreadDetailPage | undefined, | 53 | page: OrchestrationThreadDetailPage | undefined, |
| ... | @@ -101,7 +101,7 @@ const defaultOlderTurnRequestRegistry = makeThreadOlderTurnRequestRegistry(); | ... | @@ -101,7 +101,7 @@ const defaultOlderTurnRequestRegistry = makeThreadOlderTurnRequestRegistry(); |
| 101 | * instance is shared with the sync `requestOlderThreadTurns` entry point so | 101 | * instance is shared with the sync `requestOlderThreadTurns` entry point so |
| 102 | * the apps get working wiring without providing anything. | 102 | * the apps get working wiring without providing anything. |
| 103 | */ | 103 | */ |
| 104 | export class ThreadOlderTurnRequests extends Context.Reference<ThreadOlderTurnRequestRegistry>( | 104 | class ThreadOlderTurnRequests extends Context.Reference<ThreadOlderTurnRequestRegistry>( |
| 105 | "@t3tools/client-runtime/state/threads/ThreadOlderTurnRequests", | 105 | "@t3tools/client-runtime/state/threads/ThreadOlderTurnRequests", |
| 106 | { defaultValue: () => defaultOlderTurnRequestRegistry }, | 106 | { defaultValue: () => defaultOlderTurnRequestRegistry }, |
| 107 | ) {} | 107 | ) {} |
| ... | @@ -812,7 +812,7 @@ export const makeEnvironmentThreadState = Effect.fn("EnvironmentThreadState.make | ... | @@ -812,7 +812,7 @@ export const makeEnvironmentThreadState = Effect.fn("EnvironmentThreadState.make |
| 812 | return state; | 812 | return state; |
| 813 | }); | 813 | }); |
| 814 | 814 | ||
| 815 | export function threadStateChanges( | 815 | function threadStateChanges( |
| 816 | environmentId: EnvironmentIdType, | 816 | environmentId: EnvironmentIdType, |
| 817 | threadId: ThreadIdType, | 817 | threadId: ThreadIdType, |
| 818 | resumeCache?: ThreadResumeCache, | 818 | resumeCache?: ThreadResumeCache, |
packages/client-runtime/src/state/vcs.ts+2-3| ... | @@ -33,7 +33,7 @@ const OFFLINE_BRANCH_LIST_LIMIT = 100; | ... | @@ -33,7 +33,7 @@ const OFFLINE_BRANCH_LIST_LIMIT = 100; |
| 33 | const VCS_REFS_IDLE_TTL_MS = 30_000; | 33 | const VCS_REFS_IDLE_TTL_MS = 30_000; |
| 34 | // Rows keep the last status they rendered, so the live stream only needs a | 34 | // Rows keep the last status they rendered, so the live stream only needs a |
| 35 | // short grace period when virtualization or scrolling releases its consumer. | 35 | // short grace period when virtualization or scrolling releases its consumer. |
| 36 | export const VCS_STATUS_IDLE_TTL_MS = 10_000; | 36 | const VCS_STATUS_IDLE_TTL_MS = 10_000; |
| 37 | const VCS_REFS_RETRY_SCHEDULE = Schedule.exponential("1 second").pipe( | 37 | const VCS_REFS_RETRY_SCHEDULE = Schedule.exponential("1 second").pipe( |
| 38 | Schedule.modifyDelay(({ duration }) => | 38 | Schedule.modifyDelay(({ duration }) => |
| 39 | Effect.succeed(Duration.min(duration, Duration.seconds(30))), | 39 | Effect.succeed(Duration.min(duration, Duration.seconds(30))), |
| ... | @@ -214,7 +214,7 @@ export const makeCachedVcsRefsChanges = Effect.fn("CachedVcsRefsState.makeChange | ... | @@ -214,7 +214,7 @@ export const makeCachedVcsRefsChanges = Effect.fn("CachedVcsRefsState.makeChange |
| 214 | return Stream.concat(cachedRefs, refreshedRefs); | 214 | return Stream.concat(cachedRefs, refreshedRefs); |
| 215 | }); | 215 | }); |
| 216 | 216 | ||
| 217 | export function cachedVcsRefsChanges( | 217 | function cachedVcsRefsChanges( |
| 218 | environmentId: EnvironmentId, | 218 | environmentId: EnvironmentId, |
| 219 | input: VcsListRefsInput, | 219 | input: VcsListRefsInput, |
| 220 | expectedRevision: number, | 220 | expectedRevision: number, |
| ... | @@ -345,4 +345,3 @@ export function createVcsEnvironmentAtoms<R, E>( | ... | @@ -345,4 +345,3 @@ export function createVcsEnvironmentAtoms<R, E>( |
| 345 | export * from "./gitActions.ts"; | 345 | export * from "./gitActions.ts"; |
| 346 | export * from "./vcsAction.ts"; | 346 | export * from "./vcsAction.ts"; |
| 347 | export * from "./vcsRef.ts"; | 347 | export * from "./vcsRef.ts"; |
| 348 | export * from "./vcsStatus.ts"; |
packages/client-runtime/src/state/vcsAction.ts+4-4| ... | @@ -163,14 +163,14 @@ const decodeVcsActionTargetKey = Schema.decodeUnknownSync( | ... | @@ -163,14 +163,14 @@ const decodeVcsActionTargetKey = Schema.decodeUnknownSync( |
| 163 | Schema.Tuple([EnvironmentId, Schema.String]), | 163 | Schema.Tuple([EnvironmentId, Schema.String]), |
| 164 | ); | 164 | ); |
| 165 | 165 | ||
| 166 | export const vcsActionStateAtom = Atom.family((key: string) => { | 166 | const vcsActionStateAtom = Atom.family((key: string) => { |
| 167 | return Atom.make(EMPTY_VCS_ACTION_STATE).pipe( | 167 | return Atom.make(EMPTY_VCS_ACTION_STATE).pipe( |
| 168 | Atom.keepAlive, | 168 | Atom.keepAlive, |
| 169 | Atom.withLabel(`vcs-action:${key}`), | 169 | Atom.withLabel(`vcs-action:${key}`), |
| 170 | ); | 170 | ); |
| 171 | }); | 171 | }); |
| 172 | 172 | ||
| 173 | export const EMPTY_VCS_ACTION_ATOM = Atom.make(EMPTY_VCS_ACTION_STATE).pipe( | 173 | const EMPTY_VCS_ACTION_ATOM = Atom.make(EMPTY_VCS_ACTION_STATE).pipe( |
| 174 | Atom.keepAlive, | 174 | Atom.keepAlive, |
| 175 | Atom.withLabel("vcs-action:null"), | 175 | Atom.withLabel("vcs-action:null"), |
| 176 | ); | 176 | ); |
| ... | @@ -191,7 +191,7 @@ export function parseVcsActionTargetKey(key: string): ResolvedVcsActionTarget { | ... | @@ -191,7 +191,7 @@ export function parseVcsActionTargetKey(key: string): ResolvedVcsActionTarget { |
| 191 | } | 191 | } |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | export function getVcsActionStateAtom(target: VcsActionTarget) { | 194 | function getVcsActionStateAtom(target: VcsActionTarget) { |
| 195 | const key = getVcsActionTargetKey(target); | 195 | const key = getVcsActionTargetKey(target); |
| 196 | return key === null ? EMPTY_VCS_ACTION_ATOM : vcsActionStateAtom(key); | 196 | return key === null ? EMPTY_VCS_ACTION_ATOM : vcsActionStateAtom(key); |
| 197 | } | 197 | } |
| ... | @@ -217,7 +217,7 @@ export function beginVcsActionState( | ... | @@ -217,7 +217,7 @@ export function beginVcsActionState( |
| 217 | }; | 217 | }; |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | export function failVcsActionState( | 220 | function failVcsActionState( |
| 221 | operation: VcsActionOperation, | 221 | operation: VcsActionOperation, |
| 222 | actionId: string, | 222 | actionId: string, |
| 223 | error: unknown, | 223 | error: unknown, |
packages/client-runtime/src/state/vcsStatus.ts deleted-6| ... | @@ -1,6 +0,0 @@ | ||
| 1 | import type { EnvironmentId } from "@t3tools/contracts"; | ||
| 2 | |||
| 3 | export interface VcsStatusTarget { | ||
| 4 | readonly environmentId: EnvironmentId | null; | ||
| 5 | readonly cwd: string | null; | ||
| 6 | } | ||
packages/client-runtime/src/voice-input/index.ts-1| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | export { | 1 | export { |
| 2 | VoiceInputController, | 2 | VoiceInputController, |
| 3 | VOICE_RECORDING_LIMIT_SECONDS, | 3 | VOICE_RECORDING_LIMIT_SECONDS, |
| 4 | resolveTranscriptCommit, | ||
| 5 | voiceInputBlocksSubmission, | 4 | voiceInputBlocksSubmission, |
| 6 | voiceInputFreezesEditor, | 5 | voiceInputFreezesEditor, |
| 7 | type VoiceDraftSnapshot, | 6 | type VoiceDraftSnapshot, |
packages/client-runtime/src/work-log/presentation.ts+1-1| ... | @@ -305,7 +305,7 @@ function workLogEntryIsToolLike(entry: WorkLogPresentationEntry): boolean { | ... | @@ -305,7 +305,7 @@ function workLogEntryIsToolLike(entry: WorkLogPresentationEntry): boolean { |
| 305 | return entry.itemType !== undefined && isToolLifecycleItemType(entry.itemType); | 305 | return entry.itemType !== undefined && isToolLifecycleItemType(entry.itemType); |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | export function workLogEntryIsLocalCodeSearch(entry: WorkLogPresentationEntry): boolean { | 308 | function workLogEntryIsLocalCodeSearch(entry: WorkLogPresentationEntry): boolean { |
| 309 | return ( | 309 | return ( |
| 310 | entry.itemType === "web_search" && | 310 | entry.itemType === "web_search" && |
| 311 | /\bgrep\b/i.test(normalizeCompactToolLabel(entry.toolTitle ?? entry.label)) | 311 | /\bgrep\b/i.test(normalizeCompactToolLabel(entry.toolTitle ?? entry.label)) |