AnasSarkiz/tscircuit-ai-agent-remote

A mixed embedded-audio PCB component library featuring ESP32-S3 control, digital microphones, I²S audio amplification, power/battery management, USB protection, logic interfaces, connectors, switches, MOSFETs, diodes, and assorted passive components.

Version
0.0.11-wip-generator-qualification
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone AnasSarkiz/tscircuit-ai-agent-remote  # download the package files into ./tscircuit-ai-agent-remote
tsci add AnasSarkiz/tscircuit-ai-agent-remote    # add it to your project as @tsci/AnasSarkiz.tscircuit-ai-agent-remote

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

src/board/viaGeometry.ts

import { fanoutTracePath } from "@tscircuit/props"
import { z } from "zod"

export const viaHoleDiameterMm = 0.3
export const viaPadDiameterMm = 0.45

// Authored dimensional changes to replay inputs, not new solver output.
// Preserve every original saved route, position, layer and wire width on disk.
export function parseReplayWithRequestedVias(replayInput: unknown) {
  return z
    .array(fanoutTracePath)
    .parse(replayInput)
    .map((path) => ({
      ...path,
      route: path.route.map((point) =>
        point.route_type === "via"
          ? { ...point, via_diameter: viaPadDiameterMm, via_hole_diameter: viaHoleDiameterMm }
          : point,
      ),
    }))
}