Documentation
¶
Overview ¶
Package daemonclient communicates with the local HTTP service; it never opens USB.
Index ¶
- Constants
- func ParseSequenceColorInput(input string) (json.RawMessage, error)
- func SequenceSubmissionRejected(err error) bool
- func ValidSequenceColorName(name string) bool
- func ValidateLightV2Progress(previous, current control.FrameJob) error
- func ValidatePatternV2Progress(previous, current control.PatternJobEnvelope) error
- type Client
- func (c *Client) Cancel(ctx context.Context, id string) (out control.Job, err error)
- func (c *Client) CancelLightV2(ctx context.Context, serial string, data []byte, ...) (LightV2CancelResult, error)
- func (c *Client) CancelPatternV2Request(ctx context.Context, serial string, ref patternidentity.Ref, ...) (PatternCancelResultV2, error)
- func (c *Client) CancelSequenceJob(ctx context.Context, id string) (control.SequenceJob, error)
- func (c *Client) CancelSequenceJobOnDevice(ctx context.Context, id, serial string) (control.SequenceJob, error)
- func (c *Client) Capabilities(ctx context.Context) (control.CapabilityCatalog, error)
- func (c *Client) CheckSequenceTriggers(ctx context.Context) (triggerv1.CheckReport, error)
- func (c *Client) Close()
- func (c *Client) Device(ctx context.Context, serial string) (out control.DeviceState, err error)
- func (c *Client) Devices(ctx context.Context) (out []control.DeviceState, err error)
- func (c *Client) ExportPatterns(ctx context.Context, id string) ([]byte, error)
- func (c *Client) ExportPatternsV2(ctx context.Context, id string) ([]byte, error)
- func (c *Client) GetPattern(ctx context.Context, id string) (patterns.Record, error)
- func (c *Client) GetPatternV2(ctx context.Context, id string) (PatternRecordV2, error)
- func (c *Client) Health(ctx context.Context) (out Health, err error)
- func (c *Client) ImportPatterns(ctx context.Context, data []byte) (patternstore.ImportResult, error)
- func (c *Client) ImportPatternsV2(ctx context.Context, data []byte) (PatternWriteResultV2, error)
- func (c *Client) InspectNative(ctx context.Context, serial string, request nativeinspection.Request) (nativeinspection.Result, error)
- func (c *Client) Instance(ctx context.Context) (out control.InstanceInfo, err error)
- func (c *Client) Job(ctx context.Context, id string) (out control.Job, err error)
- func (c *Client) ListPatterns(ctx context.Context) (httpapi.PatternList, error)
- func (c *Client) ListPatternsV2(ctx context.Context) (PatternListV2, error)
- func (c *Client) LookupLightRequest(ctx context.Context, serial string, data []byte, ...) (control.Job, error)
- func (c *Client) LookupLightV2Request(ctx context.Context, serial string, data []byte, ...) (control.FrameJob, error)
- func (c *Client) LookupPatternRequest(ctx context.Context, serial string, receipt control.ReceiptRequest, ...) (control.Job, error)
- func (c *Client) LookupPatternV2Request(ctx context.Context, serial string, ref patternidentity.Ref, ...) (control.PatternJobEnvelope, error)
- func (c *Client) Prepare(ctx context.Context) (control.ReceiptRequest, error)
- func (c *Client) Preview(ctx context.Context, input httpapi.PreviewRequest) (control.PreviewResult, error)
- func (c *Client) PreviewLight(ctx context.Context, data []byte, serial *string) (LightPreview, error)
- func (c *Client) PreviewLightV2(ctx context.Context, data []byte, serial *string) (LightV2Preview, error)
- func (c *Client) PreviewPattern(ctx context.Context, ref httpapi.PatternRef, serial *string) (httpapi.PatternPreview, error)
- func (c *Client) PreviewPatternDraftV2(ctx context.Context, data []byte) (PatternDraftPreviewV2, error)
- func (c *Client) PreviewPatternRefV2(ctx context.Context, ref patternidentity.Ref, serial *string) (PatternRefPreviewV2, error)
- func (c *Client) PreviewSequence(ctx context.Context, input SequenceInput, serial string) (SequencePreview, error)
- func (c *Client) Request(ctx context.Context, serial string, receipt control.ReceiptRequest) (out control.Job, err error)
- func (c *Client) ResetFlash(ctx context.Context, serial, preset string) (flashreset.Result, error)
- func (c *Client) ResolveColor(ctx context.Context, color json.RawMessage) (colorinput.Result, error)
- func (c *Client) ResolveSequenceColor(ctx context.Context, raw json.RawMessage, timeout time.Duration) (ResolvedSequenceColor, error)
- func (c *Client) SavePatternV2(ctx context.Context, data []byte) (PatternWriteResultV2, error)
- func (c *Client) SaveSequenceColor(ctx context.Context, name string, color json.RawMessage) (SequenceColor, error)
- func (c *Client) SaveSequencePattern(ctx context.Context, id string, input SequenceInput, title string) (SequencePattern, error)
- func (c *Client) SequenceColors(ctx context.Context) ([]SequenceColor, error)
- func (c *Client) SequenceJob(ctx context.Context, id string) (control.SequenceJob, error)
- func (c *Client) SequencePattern(ctx context.Context, id string) (SequencePattern, error)
- func (c *Client) SequencePatterns(ctx context.Context) ([]SequencePatternSummary, error)
- func (c *Client) SequenceTriggers(ctx context.Context) ([]triggerv1.Trigger, error)
- func (c *Client) Submit(ctx context.Context, serial string, program control.Program, policy string) (out control.Job, err error)
- func (c *Client) SubmitDefaultSequence(ctx context.Context, input SequenceInput, id string) (control.SequenceJob, error)
- func (c *Client) SubmitDefaultSequenceWithPolicy(ctx context.Context, input SequenceInput, id, policy string) (control.SequenceJob, error)
- func (c *Client) SubmitEffect(ctx context.Context, serial string, effect control.Effect, policy string) (out control.Job, err error)
- func (c *Client) SubmitEffectWithReceipt(ctx context.Context, serial string, effect control.Effect, policy string, ...) (out control.ReceiptResult, err error)
- func (c *Client) SubmitLightV2WithReceipt(ctx context.Context, serial string, data []byte, ...) (control.FrameReceiptResult, error)
- func (c *Client) SubmitLightWithReceipt(ctx context.Context, serial string, data []byte, ...) (control.ReceiptResult, error)
- func (c *Client) SubmitPatternV2WithReceipt(ctx context.Context, serial string, ref patternidentity.Ref, policy string, ...) (control.PatternReceiptResult, error)
- func (c *Client) SubmitPatternWithReceipt(ctx context.Context, serial string, ref httpapi.PatternRef, ...) (control.ReceiptResult, error)
- func (c *Client) SubmitSequence(ctx context.Context, input SequenceInput, serial, id string) (control.SequenceJob, error)
- func (c *Client) SubmitSequenceWithPolicy(ctx context.Context, input SequenceInput, serial, id, policy string) (control.SequenceJob, error)
- func (c *Client) SubmitTrigger(ctx context.Context, name, serial, id string) (control.SequenceJob, error)
- func (c *Client) SubmitTriggerWithPolicy(ctx context.Context, name, serial, id, policy string) (control.SequenceJob, error)
- func (c *Client) SubmitWithReceipt(ctx context.Context, serial string, program control.Program, policy string, ...) (out control.ReceiptResult, err error)
- type DecodeError
- type Error
- type Health
- type InspectionError
- type LightPreview
- type LightV2CancelResult
- type LightV2FramePreview
- type LightV2Preview
- type LightV2PreviewDevice
- type PatternCancelResultV2
- type PatternDraftPreviewV2
- type PatternExecutionAvailabilityV2
- type PatternImportError
- type PatternLibraryInfoV2
- type PatternListV2
- type PatternRecordV2
- type PatternRefPreviewV2
- type PatternSnapshotImportErrorV2
- type PatternSummaryV2
- type PatternWriteResultV2
- type ReceiptError
- type ResolvedSequenceColor
- type SequenceColor
- type SequenceDeviceCheck
- type SequenceInput
- type SequencePattern
- type SequencePatternSummary
- type SequencePreview
Constants ¶
const DefaultEndpoint = "http://" + daemonaddr.Listen
Variables ¶
This section is empty.
Functions ¶
func ParseSequenceColorInput ¶
func ParseSequenceColorInput(input string) (json.RawMessage, error)
ParseSequenceColorInput accepts a CLI color string or a JSON ColorInput. Color references are retained for the daemon to resolve when it saves.
func SequenceSubmissionRejected ¶ added in v0.1.3
SequenceSubmissionRejected identifies subsystem errors that are returned before admission. Generic 5xx or transport failures can leave a Job active.
func ValidSequenceColorName ¶
func ValidateLightV2Progress ¶
ValidateLightV2Progress compares two individually validated snapshots from one original action. Callers retaining history must also bind immutable job timestamps and monotonic progress; a valid isolated snapshot is not enough.
func ValidatePatternV2Progress ¶
func ValidatePatternV2Progress(previous, current control.PatternJobEnvelope) error
ValidatePatternV2Progress revalidates both mutable exported envelopes and requires identity, timestamps and progress to remain bound to one receipt.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithToken ¶ added in v0.1.3
NewWithToken sends a bearer credential only to the configured loopback HTTP origin. An empty token keeps the unauthenticated client behavior.
func (*Client) CancelLightV2 ¶
func (c *Client) CancelLightV2(ctx context.Context, serial string, data []byte, receipt control.ReceiptRequest, jobID string) (LightV2CancelResult, error)
CancelLightV2 binds cancellation to the original high-level action and receipt before selecting a Job ID. It never submits a light action or retries a cancellation POST. The POST includes an instance precondition and requires the same instance in its response, then rechecks the original receipt.
func (*Client) CancelPatternV2Request ¶
func (c *Client) CancelPatternV2Request(ctx context.Context, serial string, ref patternidentity.Ref, key control.ReceiptRequest, knownJobID, knownDigest string) (PatternCancelResultV2, error)
func (*Client) CancelSequenceJob ¶
func (*Client) CancelSequenceJobOnDevice ¶ added in v0.1.3
func (c *Client) CancelSequenceJobOnDevice(ctx context.Context, id, serial string) (control.SequenceJob, error)
CancelSequenceJobOnDevice requests cancellation only if the Job has this accepted serial. A server that rejects the guard is never retried without it.
func (*Client) Capabilities ¶
Capabilities returns the daemon's software compiler catalog, not hardware discovery. An older daemon is explicitly unsupported; no fallback is made.
func (*Client) CheckSequenceTriggers ¶ added in v0.1.3
CheckSequenceTriggers checks stored Pattern references and device bindings without playing anything.
func (*Client) ExportPatterns ¶
ExportPatterns validates the complete canonical snapshot before returning bytes. id="" means the library. Returned path metadata is never opened.
func (*Client) ExportPatternsV2 ¶
ExportPatternsV2 returns an integrity-checked canonical frozen snapshot. id="" selects the library. Valid unknown source/recipe records are preserved for read-only backup; returning them does not make them importable or runnable.
func (*Client) GetPattern ¶
func (*Client) GetPatternV2 ¶
GetPatternV2 makes one bounded HTTP read and verifies identity, complete source/recipe integrity and the server's verification/digest metadata.
func (*Client) ImportPatterns ¶
func (c *Client) ImportPatterns(ctx context.Context, data []byte) (patternstore.ImportResult, error)
ImportPatterns validates locally but sends the original authoring/snapshot bytes once. It never creates a Job, retries, or substitutes a different file.
func (*Client) ImportPatternsV2 ¶
ImportPatternsV2 validates the complete verified snapshot before one POST. Original bytes are sent without a retry, redirect, authoring conversion or device operation. Unsupported read-only exports cannot be imported.
func (*Client) InspectNative ¶
func (c *Client) InspectNative(ctx context.Context, serial string, request nativeinspection.Request) (nativeinspection.Result, error)
InspectNative performs one daemon GET, never preparation, retry, discovery or direct USB fallback. A request timeout does not forcibly cancel native I/O.
func (*Client) ListPatterns ¶
func (*Client) ListPatternsV2 ¶
func (c *Client) ListPatternsV2(ctx context.Context) (PatternListV2, error)
ListPatternsV2 performs one bounded GET, without per-record fetches, tickets, preview, device work or local filesystem access. Unknown summaries stay visible and read-only; advertised verification is never promoted to execution consent.
func (*Client) LookupLightRequest ¶
func (c *Client) LookupLightRequest(ctx context.Context, serial string, data []byte, receipt control.ReceiptRequest, jobID string) (control.Job, error)
LookupLightRequest reads the original receipt with a fixed accepted Job ID. A lookup failure never establishes that the original execution did not occur.
func (*Client) LookupLightV2Request ¶
func (c *Client) LookupLightV2Request(ctx context.Context, serial string, data []byte, receipt control.ReceiptRequest, jobID string) (control.FrameJob, error)
LookupLightV2Request can recover a lost acceptance response without a Job ID. If a Job ID was already confirmed, require that same ID on every later read. Any failed lookup preserves uncertainty about the original accepted action.
func (*Client) LookupPatternRequest ¶
func (c *Client) LookupPatternRequest(ctx context.Context, serial string, receipt control.ReceiptRequest, accepted control.Job) (control.Job, error)
LookupPatternRequest never resolves the library again. It binds only to the accepted Job's ID and frozen Program and the original receipt.
func (*Client) LookupPatternV2Request ¶
func (c *Client) LookupPatternV2Request(ctx context.Context, serial string, ref patternidentity.Ref, key control.ReceiptRequest, knownJobID, knownDigest string) (control.PatternJobEnvelope, error)
LookupPatternV2Request reads only the exact original receipt. Optional known job/digest values constrain recovery; empty strings mean no extra constraint.
func (*Client) Prepare ¶
Prepare generates a binding without reserving a receipt or submitting a job.
func (*Client) Preview ¶
func (c *Client) Preview(ctx context.Context, input httpapi.PreviewRequest) (control.PreviewResult, error)
Preview invokes the daemon's authoritative compiler exactly once. It never submits a Job, prepares a receipt, retries a POST or opens a device.
func (*Client) PreviewLight ¶
func (c *Client) PreviewLight(ctx context.Context, data []byte, serial *string) (LightPreview, error)
PreviewLight sends original Action JSON, not the locally compiled Program. The shared compiler is used here only to bind the response to this input.
func (*Client) PreviewLightV2 ¶
func (c *Client) PreviewLightV2(ctx context.Context, data []byte, serial *string) (LightV2Preview, error)
PreviewLightV2 sends the original high-level action. Local compilation only verifies the returned deterministic recipe and never replaces its request.
func (*Client) PreviewPattern ¶
func (c *Client) PreviewPattern(ctx context.Context, ref httpapi.PatternRef, serial *string) (httpapi.PatternPreview, error)
func (*Client) PreviewPatternDraftV2 ¶
func (c *Client) PreviewPatternDraftV2(ctx context.Context, data []byte) (PatternDraftPreviewV2, error)
PreviewPatternDraftV2 sends the author's exact bytes once. Local pure compilation only binds the response; no record is saved and no job is made.
func (*Client) PreviewPatternRefV2 ¶
func (c *Client) PreviewPatternRefV2(ctx context.Context, ref patternidentity.Ref, serial *string) (PatternRefPreviewV2, error)
func (*Client) PreviewSequence ¶
func (c *Client) PreviewSequence(ctx context.Context, input SequenceInput, serial string) (SequencePreview, error)
func (*Client) ResetFlash ¶ added in v0.1.4
ResetFlash obtains one short-lived ticket, then posts it once. A returned result records the transaction stage even if the Flash save was uncertain.
func (*Client) ResolveColor ¶
func (c *Client) ResolveColor(ctx context.Context, color json.RawMessage) (colorinput.Result, error)
ResolveColor computes a color through the daemon exactly once. Input and response use the shared software contract; no device or execution API is used.
func (*Client) ResolveSequenceColor ¶ added in v0.1.3
func (c *Client) ResolveSequenceColor(ctx context.Context, raw json.RawMessage, timeout time.Duration) (ResolvedSequenceColor, error)
ResolveSequenceColor resolves a color input, including names from the local Sequence library, through the current v1 color endpoint.
func (*Client) SavePatternV2 ¶
SavePatternV2 validates confirmation against the complete candidate, sends the exact bytes once and accepts only the original saved record. Publication uncertainty is separate from execution: this method never creates a job.
func (*Client) SaveSequenceColor ¶
func (c *Client) SaveSequenceColor(ctx context.Context, name string, color json.RawMessage) (SequenceColor, error)
func (*Client) SaveSequencePattern ¶
func (c *Client) SaveSequencePattern(ctx context.Context, id string, input SequenceInput, title string) (SequencePattern, error)
func (*Client) SequenceColors ¶
func (c *Client) SequenceColors(ctx context.Context) ([]SequenceColor, error)
func (*Client) SequenceJob ¶
func (*Client) SequencePattern ¶
func (*Client) SequencePatterns ¶
func (c *Client) SequencePatterns(ctx context.Context) ([]SequencePatternSummary, error)
func (*Client) SequenceTriggers ¶ added in v0.1.3
func (*Client) SubmitDefaultSequence ¶ added in v0.1.3
func (c *Client) SubmitDefaultSequence(ctx context.Context, input SequenceInput, id string) (control.SequenceJob, error)
func (*Client) SubmitDefaultSequenceWithPolicy ¶ added in v0.1.4
func (c *Client) SubmitDefaultSequenceWithPolicy(ctx context.Context, input SequenceInput, id, policy string) (control.SequenceJob, error)
func (*Client) SubmitEffect ¶
func (c *Client) SubmitEffect(ctx context.Context, serial string, effect control.Effect, policy string) (out control.Job, err error)
SubmitEffect sends the high-level intent to the daemon's authoritative compiler; this HTTP adapter does not maintain a second effect compiler.
func (*Client) SubmitEffectWithReceipt ¶
func (*Client) SubmitLightV2WithReceipt ¶
func (c *Client) SubmitLightV2WithReceipt(ctx context.Context, serial string, data []byte, receipt control.ReceiptRequest) (control.FrameReceiptResult, error)
SubmitLightV2WithReceipt issues one high-level POST with the original ticket. It never prepares a replacement, falls back to low-level frames, or retries.
func (*Client) SubmitLightWithReceipt ¶
func (c *Client) SubmitLightWithReceipt(ctx context.Context, serial string, data []byte, receipt control.ReceiptRequest) (control.ReceiptResult, error)
SubmitLightWithReceipt makes exactly one bound POST with policy reject. It never prepares a replacement ticket, retries, or falls back to /jobs/direct.
func (*Client) SubmitPatternV2WithReceipt ¶
func (c *Client) SubmitPatternV2WithReceipt(ctx context.Context, serial string, ref patternidentity.Ref, policy string, key control.ReceiptRequest) (control.PatternReceiptResult, error)
SubmitPatternV2WithReceipt sends exactly one execution POST. It neither prepares a ticket nor resolves/previews a library first: accepted receipts must replay even when the source library later disappears.
func (*Client) SubmitPatternWithReceipt ¶
func (c *Client) SubmitPatternWithReceipt(ctx context.Context, serial string, ref httpapi.PatternRef, receipt control.ReceiptRequest) (control.ReceiptResult, error)
SubmitPatternWithReceipt performs one target preview and at most one bound jobs POST. The preview's independent frozen Program binds the accepted Job.
func (*Client) SubmitSequence ¶
func (c *Client) SubmitSequence(ctx context.Context, input SequenceInput, serial, id string) (control.SequenceJob, error)
func (*Client) SubmitSequenceWithPolicy ¶ added in v0.1.4
func (c *Client) SubmitSequenceWithPolicy(ctx context.Context, input SequenceInput, serial, id, policy string) (control.SequenceJob, error)
func (*Client) SubmitTrigger ¶ added in v0.1.3
func (*Client) SubmitTriggerWithPolicy ¶ added in v0.1.4
func (*Client) SubmitWithReceipt ¶
type DecodeError ¶
DecodeError means an HTTP response arrived but its body could not be decoded. It is distinct from an API rejection: callers cannot infer a submission's outcome from malformed response data.
func (*DecodeError) Error ¶
func (e *DecodeError) Error() string
func (*DecodeError) Unwrap ¶
func (e *DecodeError) Unwrap() error
type InspectionError ¶
type InspectionError struct {
Result nativeinspection.Result
}
InspectionError means a valid collection envelope arrived but the requested native observation is incomplete. Result retains partial data and errors; this is not a malformed response or an API admission rejection.
func (*InspectionError) Error ¶
func (e *InspectionError) Error() string
type LightPreview ¶
type LightPreview struct {
Result lightaction.Result `json:"result"`
Preview control.PreviewResult `json:"preview"`
}
LightPreview preserves both the authoring result and the device-aware Program preview. Every field is checked against the original request.
type LightV2CancelResult ¶
type LightV2CancelResult struct {
Job control.FrameJob
DaemonInstanceID string
CancelAttempted bool
AlreadyTerminal bool
// Only transport/server uncertainty permits further receipt-only polling.
// Integrity errors must not be hidden by a subsequent plausible response.
QueryRecoveryAllowed bool
// A validated POST snapshot also constrains recovery if its confirming GET
// failed. Job remains the last fully receipt-confirmed display snapshot.
RecoveryAnchor *control.FrameJob
}
LightV2CancelResult retains the last receipt-verified Job even when the cancellation response is lost or inconsistent. Attempted does not mean the request reached the daemon, or that cancellation/cleanup has completed.
type LightV2FramePreview ¶
type LightV2FramePreview struct {
Contract string `json:"contract"`
Program control.FrameProgram `json:"program"`
TotalFrames int `json:"total_frames"`
StoredTargetWrites int `json:"stored_target_writes"`
PlannedTargetWrites int `json:"planned_target_writes"`
CycleDurationMS int64 `json:"cycle_duration_ms"`
NominalInitialMS int64 `json:"nominal_initial_ms"`
NominalTailMS int64 `json:"nominal_tail_ms"`
NominalDurationMS int64 `json:"nominal_duration_ms"`
TimingBasis string `json:"timing_basis"`
RequiredCapabilities []string `json:"required_capabilities"`
Execution control.FrameExecutionAvailability `json:"execution"`
Device *LightV2PreviewDevice `json:"device,omitempty"`
}
Keep this wire type flat: the strict JSON checker deliberately does not flatten anonymous embedded structs when collecting permitted JSON fields.
type LightV2Preview ¶
type LightV2Preview struct {
Result lightactionv2.Result `json:"result"`
Preview LightV2FramePreview `json:"preview"`
}
func LocalLightV2Preview ¶
func LocalLightV2Preview(data []byte) (LightV2Preview, error)
LocalLightV2Preview performs pure compilation only; execution remains unchecked. Neither this helper nor the compiler opens a device or a socket.
type LightV2PreviewDevice ¶
type PatternCancelResultV2 ¶
type PatternCancelResultV2 struct {
Job *control.PatternJobEnvelope `json:"job,omitempty"`
DaemonInstanceID string `json:"daemon_instance_id,omitempty"`
CancelAttempted bool `json:"cancel_attempted"`
AlreadyTerminal bool `json:"already_terminal"`
}
PatternCancelResultV2 retains the last trusted snapshot on every later failure. CancelAttempted only records the one POST attempt, not delivery or completed cleanup. No failed POST is followed by a good GET to hide failure.
type PatternDraftPreviewV2 ¶
type PatternDraftPreviewV2 struct {
SchemaVersion int `json:"schema_version"`
Contract string `json:"contract"`
Record json.RawMessage `json:"record"`
Verification patternsv2.Support `json:"verification"`
ExecutionDigest string `json:"execution_digest"`
Preview patternsv2.PreviewFacts `json:"preview"`
PatternExecution PatternExecutionAvailabilityV2 `json:"pattern_execution"`
}
Keep this wire type flat for the common strict JSON field checker.
type PatternImportError ¶
PatternImportError is about publication, never execution. A lost or malformed response may follow a successful import; inspect the original IDs/revisions.
func (*PatternImportError) Error ¶
func (e *PatternImportError) Error() string
func (*PatternImportError) Unwrap ¶
func (e *PatternImportError) Unwrap() error
type PatternLibraryInfoV2 ¶
type PatternLibraryInfoV2 struct {
Path string `json:"path"`
State string `json:"state"`
CreateOnly bool `json:"create_only"`
MaxRecords int `json:"max_records"`
MaxPackageBytes int `json:"max_package_bytes"`
RecordContract string `json:"record_contract"`
SnapshotKind string `json:"snapshot_kind"`
}
PatternLibraryInfoV2 describes the daemon's selected library. Path is display metadata only, including when the daemon runs on a different OS.
type PatternListV2 ¶
type PatternListV2 struct {
SchemaVersion int `json:"schema_version"`
Contract string `json:"contract"`
Library PatternLibraryInfoV2 `json:"library"`
PatternExecution PatternExecutionAvailabilityV2 `json:"pattern_execution"`
Patterns []PatternSummaryV2 `json:"patterns"`
}
type PatternRecordV2 ¶
type PatternRecordV2 struct {
SchemaVersion int `json:"schema_version"`
Contract string `json:"contract"`
Record json.RawMessage `json:"record"`
Verification patternsv2.Support `json:"verification"`
ExecutionDigest string `json:"execution_digest"`
}
PatternRecordV2 keeps the complete original record as JSON. InspectRecord validates its typed execution without losing valid future source/recipe data. A successful read does not grant permission to execute an unknown recipe.
type PatternRefPreviewV2 ¶
type PatternRefPreviewV2 struct {
SchemaVersion int `json:"schema_version"`
Contract string `json:"contract"`
PatternRef patternidentity.Ref `json:"pattern_ref"`
ExecutionDigest string `json:"execution_digest"`
Execution json.RawMessage `json:"execution"`
Preview json.RawMessage `json:"preview"`
PatternExecution PatternExecutionAvailabilityV2 `json:"pattern_execution"`
}
PatternRefPreviewV2 preserves the exact frozen execution and pure preview wire JSON after validating both against closed typed core data. It verifies an execution digest, not the server's original source compiler or hardware.
type PatternSnapshotImportErrorV2 ¶
type PatternSnapshotImportErrorV2 struct {
Err error
// contains filtered or unexported fields
}
PatternSnapshotImportErrorV2 retains the exact import input and requested references after an uncertain or rejected publication. It is not an execution receipt. Errors.As can still find the underlying PatternImportError.
func (*PatternSnapshotImportErrorV2) Error ¶
func (e *PatternSnapshotImportErrorV2) Error() string
func (*PatternSnapshotImportErrorV2) OriginalSnapshotJSON ¶
func (e *PatternSnapshotImportErrorV2) OriginalSnapshotJSON() []byte
func (*PatternSnapshotImportErrorV2) RequestedRefs ¶
func (e *PatternSnapshotImportErrorV2) RequestedRefs() []patternidentity.Ref
func (*PatternSnapshotImportErrorV2) Unwrap ¶
func (e *PatternSnapshotImportErrorV2) Unwrap() error
type PatternSummaryV2 ¶
type PatternSummaryV2 struct {
PatternRef patternidentity.Ref `json:"pattern_ref"`
Title string `json:"title"`
SourceContract string `json:"source_contract"`
ExecutionKind string `json:"execution_kind"`
ExecutionContract string `json:"execution_contract"`
Verification patternsv2.Support `json:"verification"`
ExecutionDigest string `json:"execution_digest"`
}
PatternSummaryV2 contains advertised metadata, not a complete verified Record. Use GetPatternV2 for independent source/recipe/revision/digest verification.
type PatternWriteResultV2 ¶
type ReceiptError ¶
type ReceiptError struct {
Err error
Receipt control.ReceiptRequest
OutcomeUnknown bool
}
ReceiptError preserves the binding after an uncertain submission or lookup. Expiry/instance changes cannot establish whether the original intent ran.
func (*ReceiptError) Error ¶
func (e *ReceiptError) Error() string
func (*ReceiptError) Unwrap ¶
func (e *ReceiptError) Unwrap() error
type ResolvedSequenceColor ¶ added in v0.1.3
type ResolvedSequenceColor struct {
Color string `json:"color"`
}
type SequenceColor ¶
type SequenceDeviceCheck ¶
type SequenceInput ¶
type SequenceInput struct {
Action json.RawMessage `json:"action,omitempty"`
Sequence json.RawMessage `json:"sequence,omitempty"`
PatternID *string `json:"pattern_id,omitempty"`
}
SequenceInput retains the original author input used to identify a Job.
func DecodeSequenceInput ¶
func DecodeSequenceInput(data []byte) (SequenceInput, error)