submit

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package submit implements agent-factory submit command behavior.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Submit

func Submit(cfg SubmitConfig) error

Submit posts work to a running factory via HTTP.

func SubmitBatch added in v0.0.5

func SubmitBatch(cfg BatchConfig) error

SubmitBatch upserts a canonical FACTORY_REQUEST_BATCH to a running factory.

Types

type BatchConfig added in v0.0.5

type BatchConfig struct {
	FilePath    string
	FileFlag    string
	DryRun      bool
	Server      string
	SessionID   string
	JSON        bool
	Verbose     bool
	Debug       bool
	Args        []string
	Stdin       io.Reader
	StdinIsTTY  func() bool
	Output      io.Writer
	Diagnostics io.Writer
}

BatchConfig holds parameters for the submit batch command.

type BatchSubmitJSONResult added in v0.0.5

type BatchSubmitJSONResult struct {
	DryRun        bool                  `json:"dryRun,omitempty"`
	RequestID     string                `json:"requestId"`
	TraceID       string                `json:"traceId,omitempty"`
	WorkCount     int                   `json:"workCount"`
	RelationCount int                   `json:"relationCount"`
	SessionID     string                `json:"sessionId"`
	EndpointPath  string                `json:"endpointPath"`
	BatchSource   string                `json:"batchSource"`
	WorkNames     []string              `json:"workNames,omitempty"`
	Works         []BatchSubmitJSONWork `json:"works,omitempty"`
}

BatchSubmitJSONResult is the structured stdout payload for `you submit batch --json`.

type BatchSubmitJSONWork added in v0.0.5

type BatchSubmitJSONWork struct {
	Name         string `json:"name"`
	WorkTypeName string `json:"workTypeName"`
	WorkID       string `json:"workId,omitempty"`
}

BatchSubmitJSONWork is one accepted work entry in structured batch submit output.

type SubmitConfig

type SubmitConfig struct {
	Name         string
	WorkTypeName string
	Payload      string
	Server       string
	SessionID    string
	JSON         bool
	Output       io.Writer
	Verbose      bool
	Debug        bool
	Diagnostics  io.Writer
}

SubmitConfig holds parameters for the submit command.

type SubmitSuccessResult added in v0.0.5

type SubmitSuccessResult struct {
	WorkID       *string `json:"workId"`
	Name         string  `json:"name"`
	WorkTypeName string  `json:"workTypeName"`
	TraceID      string  `json:"traceId"`
	SessionID    string  `json:"sessionId"`
	EndpointPath string  `json:"endpointPath"`
}

SubmitSuccessResult is the stable CLI JSON confirmation emitted after HTTP 201.

Jump to

Keyboard shortcuts

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