Documentation
¶
Overview ¶
Package projects mounts Projects (the projects/ module, see .design/projects.md) in Tingly Box: a Host that gives it model access through the gateway, and the routes behind the "projects" feature flag.
Index ¶
- type Handler
- type Host
- func (h *Host) CheckLaunch(ctx context.Context, profile, model string) error
- func (h *Host) ClientFor(_ context.Context, model string) (llm.Client, string, error)
- func (h *Host) HandoffLaunch(profile string) []string
- func (h *Host) LaunchEnv(ctx context.Context, profile string) ([]string, string, error)
- func (h *Host) Models(context.Context) ([]llm.Model, error)
- func (h *Host) ThreadEnv(ctx context.Context) ([]string, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler mounts Projects' routes (all under /api/v1/projects) behind user auth and the feature flag.
func NewHandler ¶
func NewHandler(app *projectsapp.App, enabled func() bool, start func()) *Handler
func (*Handler) RegisterRoutes ¶
RegisterRoutes gives Projects a /api/v1 group of its own, so the gate applies to its routes and nothing else.
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host gives Projects model access through Tingly Box's own gateway. The coordinator and the threads both go through the claude_code scenario, so its routing rules, usage records and quotas cover Projects too, and the model names Projects offers are the ones that scenario routes.
func (*Host) CheckLaunch ¶
CheckLaunch accepts the default tier always, and a named tier only where the profile routes tiers separately: under a unified profile every tier is the same model, so choosing one would change nothing.
func (*Host) ClientFor ¶
ClientFor talks Anthropic Messages to the gateway's claude_code scenario with the model token; an empty model means the scenario's default tier.
func (*Host) HandoffLaunch ¶
HandoffLaunch goes through tingly-box (`cc`, or `profile <id>`), by absolute path, so the terminal routes through the same gateway and settings the web turns used, with no token in the command.
func (*Host) LaunchEnv ¶
LaunchEnv routes a session's turn like @cc does: the main claude_code scenario's env, or a profile's settings file, which carries its own routing and so replaces the env rather than adding to it.