amp

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package amp is the Amp module for Amp's threads and orbs, a cloud-only module: Amp keeps every thread on its servers (an orb is a cloud machine a thread runs on), and hopsesh reaches them only through the amp CLI (amp threads list, amp threads markdown), signed in as the user. Amp's local CLI sessions are threads too, so they are listed here. It keeps nothing on any machine, so the file methods come from agent.NoLocal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct{ agent.NoLocal }

Module is the Amp module.

func New

func New() *Module

New returns the module.

func (*Module) CloudURL

func (m *Module) CloudURL(_ string, sid agent.SessionID) string

CloudURL is the thread's page on ampcode.com.

func (*Module) Detect

func (m *Module) Detect(_ context.Context, h agent.Host) (agent.Install, error)

Detect finds the amp CLI; there is no data folder.

func (*Module) FetchCloud

FetchCloud reads a thread as Markdown (amp threads markdown <id>) as the conversation in text. The orb's code stays in the orb.

func (*Module) ListCloud

ListCloud lists the threads (amp threads list). The CLI prints a table; its layout is not documented (a community SDK reads title, last updated, visibility, messages and thread id, split by runs of spaces), so each row is read by its cells' shapes: the T-… cell is the id, a number the message count, the first cell the title. Threads carry no repository or state in the list.

func (m *Module) ParseCloudLink(s string) (string, agent.SessionID, bool)

ParseCloudLink reads a thread's link (https://ampcode.com/threads/T-…) or its id.

func (*Module) SendCloud

func (m *Module) SendCloud(ctx context.Context, h agent.Host, _ agent.Install, r agent.SendRequest) (agent.Sent, error)

SendCloud starts the session without a terminal (send) and returns it.

func (*Module) Spec

func (*Module) Spec() agent.Spec

Spec declares Amp, reached through the amp CLI.

func (*Module) TestCloud

func (m *Module) TestCloud(ctx context.Context, h agent.Host, _ agent.Install, _ string) (agent.CloudTest, error)

TestCloud lists the threads once (read-only; it needs the login), and checks that the CLI still has the commands the module uses. Amp documents no status command. It starts nothing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL