The best way to control Claude Code, Codex and more from any computer or phone

main
ts 19 lines 557 Bytes
Raw
1 import * as Duration from "effect/Duration"
2 import * as Effect from "effect/Effect"
3 import * as Schema from "effect/Schema"
4 import * as SchemaTransformation from "effect/SchemaTransformation"
5
6 const schema = Schema.String.pipe(Schema.decodeTo(
7 Schema.String,
8 SchemaTransformation.transformEffect({
9 decode: Effect.fnUntraced(function*(s) {
10 yield* Effect.clockWith((clock) => clock.sleep(Duration.millis(300)))
11 return s
12 }),
13 encode: (_) => Effect.succeed(_)
14 })
15 ))
16
17 Schema.decodeUnknownEffect(schema)("a").pipe(
18 Effect.runFork
19 )