Taubyte Tau

repository·main·Indexed 26 days ago

https://github.com/taubyte/tau

A fullstack workspace for humans and AI agents providing cloud-native primitives including Functions, Web Hosting, KV Databases, Object Storage, and Pub/Sub Messaging. The repository includes the spore-drive library for TypeScript and Python to deploy and operate Taubyte Cloud, the taucorder management tool, a Go-based Docker API abstraction layer (go-simple-container), a Raft cluster implementation for KV operations, and the go-patrick-http REST client.

Tokens
53.4K
Snippets
113
Records
450
Agent score
89%

What's inside tau

  1. Overview of the HTTP Auto Package

    main

    The http-auto package manages automatic HTTP services. It provides:

    • Automatic Domain Validation: Validates service or alias domains using TLS client hello information.
    • TLS Support: Integrates with ACME for certificate management.
    • Caching: Implements positive and negative caching for domain validation results.
  2. Understand the role of config-compiler in parity testing

    main
    The config-compiler package is a legacy compiler maintained solely as a conformance oracle for the tcc compiler. It is not used at runtime and is not part of the modern tcc compiler. Its purpose is to provide a byte-for-byte reference for the tcc test suite (specifically pkg/tcc/taubyte/v1's TestCompile) to ensure that the new compiler's output matches the original compiler's output exactly.
  3. Understand the purpose of the parity package

    main
    The parity/ directory contains frozen legacy code used as conformance oracles for the tcc pipeline. This code is not used in production. Its sole purpose is to allow tcc tests to perform diffing between new output and old output to ensure functional parity. Packages in this directory are temporary and are removed once their new counterparts have proven stable across multiple releases.
  4. Edit a project using Session typed accessors

    main

    The open and decompile functions return a Session. A Session provides a typed, editable representation of the configuration. Instead of manual YAML manipulation, you use generated getters and setters that handle the YAML serialization/deserialization inside the WASM module.

    Workflow

    1. Open/Decompile: Create a session from a filesystem or a compiled object.
    2. Modify: Use typed accessors (e.g., .function(), .setMemory()) to change values.
    3. Compile: Generate the updated compiled state.
    4. Save: Write the changes back to the filesystem as YAML.
    5. Close: Release the session.
    import { open, decompile } from "@taubyte/tcc";
    
    // From a cloned repo's YAML...
    const session = await open(fs, "/my-project");
    // ...or by decompiling a compiled object:
    // const session = await decompile(compiledObject);
    
    const fn = session.function("api");          // typed accessor, addressed by name
    await fn.setMemory("64GB");                   // source form is human-readable
    await fn.setType("https");                    // "http" | "https" | "pubsub" | "p2p"
    const t = await fn.type();                    // typed read
    
    const { object } = await session.compile();   // compile the edited state
    await session.save(fs, "/my-project");         // write the edits back as YAML
    await session.close();
  5. Install and run StepCA for local ACME testing

    main

    To test automatic TLS management with a custom ACME server, you can run a local instance of StepCA using Docker. This allows you to simulate an ACME provider for domain validation and certificate management.

    # 1. Pull the StepCA Docker image
    docker pull smallstep/step-ca
    
    # 2. Run the StepCA container
    docker run -d --name step-ca \
      -v step:/home/step \
      -p 9000:9000 \
      -e DOCKER_STEPCA_INIT_NAME=StepCA \
      -e DOCKER_STEPCA_INIT_DNS_NAMES=localhost \
      smallstep/step-ca
    
    # 3. Verify it is running
    curl http://localhost:9000/health
    
    # 4. Add an ACME provider inside the container
    docker exec -it step-ca sh
    # Inside the container shell:
    step ca provisioner add acme --type ACME
    
    # 5. Restart the container to apply changes
    docker restart step-ca
  6. Login to Taubyte via Tau CLI

    main

    Use the tau login command to authenticate with a Taubyte-based Cloud.

    • tau login: Opens a selection menu (with default selected) or logs in directly if only one profile exists. If no profiles are found, it opens a new one.
    • tau login --new: Starts the process for a new profile.
    • tau login --set-default: Use this with --new to make the new authentication profile your default.
    • tau login <profile-name>: Log in using a specific existing profile name.
    tau login