support

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: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptedCommandResults

func AcceptedCommandResults(count int) []workers.CommandResult

func AcceptedProviderResponse

func AcceptedProviderResponse() interfaces.InferenceResponse

func AgentFactoryPath

func AgentFactoryPath(t *testing.T, rel string) string

func AssertArgsContainSequence

func AssertArgsContainSequence(t *testing.T, args, want []string)

func AssertSingleWorkRequestEvent

func AssertSingleWorkRequestEvent(t *testing.T, events []factoryapi.FactoryEvent, requestID, workID, workTypeName string)

func AssertSingleWorkRequestEventByWorkName

func AssertSingleWorkRequestEventByWorkName(t *testing.T, events []factoryapi.FactoryEvent, workName, workTypeName string)

func BuildModelWorkerConfig

func BuildModelWorkerConfig(provider interfaces.ModelProvider, model string) string

func ClearSeedInputs

func ClearSeedInputs(t *testing.T, dir string)

func CountFactoryEvents

func CountFactoryEvents(events []factoryapi.FactoryEvent, eventType factoryapi.FactoryEventType) int

func DispatchInputWorksFromHistory added in v0.0.3

func DispatchInputWorksFromHistory(
	t *testing.T,
	events []factoryapi.FactoryEvent,
	event factoryapi.FactoryEvent,
	payload factoryapi.DispatchRequestEventPayload,
) []factoryapi.Work

func FactoryRelationsValue added in v0.0.4

func FactoryRelationsValue(value *[]factoryapi.Relation) []factoryapi.Relation

func FactoryWorksValue

func FactoryWorksValue(value *[]factoryapi.Work) []factoryapi.Work

func FirstInputToken

func FirstInputToken(rawTokens any) interfaces.Token

func HasWorkTokenInPlace

func HasWorkTokenInPlace(marking petri.MarkingSnapshot, placeID, workID string) bool

func LastFactoryEventTick

func LastFactoryEventTick(events []factoryapi.FactoryEvent) int

func LegacyFixtureDir

func LegacyFixtureDir(t *testing.T, name string) string

func NewStaticSuccessCommandRunner added in v0.0.4

func NewStaticSuccessCommandRunner(stdout string) workers.CommandRunner

func PlaceTokenCount

func PlaceTokenCount(marking petri.MarkingSnapshot, placeID string) int

func ProviderCallsForWorker

func ProviderCallsForWorker(provider *testutil.MockProvider, workerType string) []interfaces.ProviderInferenceRequest

func ProviderCommandRequestsForWorker

func ProviderCommandRequestsForWorker(runner *testutil.ProviderCommandRunner, workerType string) []workers.CommandRequest

func ProviderErrorCorpusEntry

func ProviderErrorCorpusEntry(t *testing.T, name string) workerprovider.ProviderErrorCorpusEntry

func RejectedProviderResponse

func RejectedProviderResponse(content string) interfaces.InferenceResponse

func ResolvedRuntimePath

func ResolvedRuntimePath(factoryDir, configuredPath string) string

func ScaffoldFactory

func ScaffoldFactory(t *testing.T, cfg map[string]any) string

func ScaffoldFactoryFromExamplePNG added in v0.0.5

func ScaffoldFactoryFromExamplePNG(t *testing.T, relPath string) string

func SetWorkingDirectory

func SetWorkingDirectory(t *testing.T, dir string)

func SkipLongFunctional

func SkipLongFunctional(t *testing.T, reason string)

func StringPointerValue

func StringPointerValue[T ~string](value *T) string

func UpdateFactoryConfig

func UpdateFactoryConfig(t *testing.T, dir string, mutate func(map[string]any))

func WaitForHarnessPlaceTokenCount

func WaitForHarnessPlaceTokenCount(
	t *testing.T,
	h *testutil.ServiceTestHarness,
	placeID string,
	want int,
	timeout time.Duration,
)

func WithWorkingDirectory

func WithWorkingDirectory(t *testing.T, dir string, fn func())

func WriteAgentConfig

func WriteAgentConfig(t *testing.T, dir, workerName, content string)

func WriteWorkRequestFile

func WriteWorkRequestFile(t *testing.T, path string, request interfaces.SubmitRequest)

func WriteWorkstationConfig

func WriteWorkstationConfig(t *testing.T, dir, workstationName, content string)

Types

type FunctionalAPIServer added in v0.0.4

type FunctionalAPIServer struct {
	// contains filtered or unexported fields
}

func StartFunctionalAPIServer added in v0.0.4

func StartFunctionalAPIServer(t *testing.T, cfg FunctionalAPIServerConfig) *FunctionalAPIServer

func (*FunctionalAPIServer) Done added in v0.0.4

func (fs *FunctionalAPIServer) Done() <-chan struct{}

func (*FunctionalAPIServer) GetEngineStateSnapshot added in v0.0.4

func (*FunctionalAPIServer) GetFactoryEvents added in v0.0.4

func (fs *FunctionalAPIServer) GetFactoryEvents(t *testing.T) []factoryapi.FactoryEvent

func (*FunctionalAPIServer) Stop added in v0.0.4

func (fs *FunctionalAPIServer) Stop(t *testing.T)

func (*FunctionalAPIServer) URL added in v0.0.4

func (fs *FunctionalAPIServer) URL() string

type FunctionalAPIServerConfig added in v0.0.4

type FunctionalAPIServerConfig struct {
	FactoryDir                string
	UseMockWorkers            bool
	WaitForServiceModeRuntime bool
	Configure                 func(*service.FactoryServiceConfig)
	ExtraOptions              []factory.FactoryOption
	CaptureAPISurface         func(apisurface.APISurface)
	CaptureService            func(*service.FactoryService)
	CaptureHTTPServer         func(*httptest.Server)
	CaptureShutdown           func(context.CancelFunc, <-chan struct{})
}

type RecordingCommandRunner

type RecordingCommandRunner struct {
	// contains filtered or unexported fields
}

func NewRecordingCommandRunner

func NewRecordingCommandRunner(stdout string) *RecordingCommandRunner

func (*RecordingCommandRunner) CallCount

func (r *RecordingCommandRunner) CallCount() int

func (*RecordingCommandRunner) LastRequest

func (*RecordingCommandRunner) Run

type TokenIdentitySet

type TokenIdentitySet struct {
	WorkIDs    []string
	WorkTypes  []string
	TokenNames []string
}

func DeriveTokenIdentities

func DeriveTokenIdentities(
	consumedTokens []interfaces.Token,
	outputMutations []interfaces.TokenMutationRecord,
) TokenIdentitySet

Jump to

Keyboard shortcuts

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