Documentation
¶
Overview ¶
Package domain contains the public, transport-neutral M1 facts.
Index ¶
- Constants
- Variables
- func Contains(values []string, v string) bool
- func Decode[T any](v any) (T, error)
- func N(o Object, key string) int64
- func NewID(prefix string) string
- func ParseTime(s string) time.Time
- func Ptr[T any](v T) *T
- func S(o Object, key string) string
- func Stamp(t time.Time) string
- func String(v *string) string
- type Actor
- type Assignment
- type Audit
- type CommandResult
- type CommitBatch
- type Contract
- type Decision
- type Error
- type ErrorData
- type Event
- type Grant
- type LeasePolicy
- type Object
- type Record
- type Relation
- type Report
- type Run
- type Submission
- type Task
Constants ¶
View Source
const MaxInteger int64 = 9007199254740991
View Source
const TimeFormat = "2006-01-02T15:04:05.000Z"
View Source
const Version = "bridge-m1-1"
Variables ¶
View Source
var Codes = map[string]int{"FORBIDDEN": -32001, "NOT_FOUND": -32002, "STALE_REVISION": -32003, "LEASE_FENCED": -32004, "INVALID_STATE": -32005, "GATE_CLOSED": -32006, "POLICY_DENIED": -32007, "IDEMPOTENCY_CONFLICT": -32008, "REINITIALIZE_REQUIRED": -32009, "INVALID_CURSOR": -32010, "RECEIPT_NOT_FOUND": -32011, "RECEIPT_UNAVAILABLE": -32012, "AUTHORITY_MISMATCH": -32013, "RESOURCE_LIMIT": -32014, "UNAVAILABLE": -32015, "PARSE_ERROR": -32700, "INVALID_REQUEST": -32600, "METHOD_NOT_FOUND": -32601, "INVALID_PARAMS": -32602, "INTERNAL_ERROR": -32603, "UNAUTHENTICATED": 401}
Functions ¶
Types ¶
type Assignment ¶
type Assignment struct {
AssignmentID string `json:"assignment_id"`
TaskID string `json:"task_id"`
PrincipalID string `json:"principal_id"`
AgentID string `json:"agent_id"`
ClaimGrantID string `json:"claim_grant_id"`
State string `json:"state"`
Generation int64 `json:"generation"`
LeaseExpiresAt string `json:"lease_expires_at"`
CreatedAt string `json:"created_at"`
EndedAt *string `json:"ended_at"`
EndReason *string `json:"end_reason"`
EffectiveAt *string `json:"effective_at"`
BindingID string `json:"binding_id"`
}
type CommandResult ¶
type CommitBatch ¶
type Contract ¶
type Contract struct {
Profile string `json:"profile"`
OwnerPrincipalID string `json:"owner_principal_id"`
Goal string `json:"goal"`
Constraints []string `json:"constraints"`
InputRefs []Object `json:"input_refs"`
ExpectedOutput string `json:"expected_output"`
AcceptanceRefs []Object `json:"acceptance_refs"`
ContextRefs []Object `json:"context_refs"`
EligibleAgentIDs []string `json:"eligible_agent_ids"`
AcceptancePrincipalID string `json:"acceptance_principal_id"`
RecoveryPolicy string `json:"recovery_policy"`
AllowRework bool `json:"allow_rework"`
LeasePolicy LeasePolicy `json:"lease_policy"`
Extensions Object `json:"extensions"`
}
type Decision ¶
type Decision struct {
DecisionID string `json:"decision_id"`
TaskID string `json:"task_id"`
SubmissionID string `json:"submission_id"`
Outcome string `json:"outcome"`
PrincipalID string `json:"principal_id"`
Reason string `json:"reason"`
EvidenceRefs []Object `json:"evidence_refs"`
DecidedAt string `json:"decided_at"`
}
type Error ¶
type Grant ¶
type Grant struct {
GrantID string `json:"grant_id"`
TaskID string `json:"task_id"`
OwnerPrincipalID string `json:"owner_principal_id"`
SubjectPrincipalID string `json:"subject_principal_id"`
AgentID *string `json:"agent_id"`
Actions []string `json:"actions"`
NotBefore string `json:"not_before"`
ExpiresAt string `json:"expires_at"`
IssuedByPrincipalID string `json:"issued_by_principal_id"`
RevokedAt *string `json:"revoked_at"`
}
type LeasePolicy ¶
type Report ¶
type Report struct {
ReportID string `json:"report_id"`
TaskID string `json:"task_id"`
RunID string `json:"run_id"`
AssignmentID string `json:"assignment_id"`
Message string `json:"message"`
EvidenceRefs []Object `json:"evidence_refs"`
Extensions Object `json:"extensions"`
ReportedAt string `json:"reported_at"`
}
type Submission ¶
type Submission struct {
SubmissionID string `json:"submission_id"`
TaskID string `json:"task_id"`
RunID string `json:"run_id"`
AssignmentID string `json:"assignment_id"`
ContentVersion int64 `json:"content_version"`
Summary string `json:"summary"`
ArtifactRefs []Object `json:"artifact_refs"`
EvidenceRefs []Object `json:"evidence_refs"`
Extensions Object `json:"extensions"`
SubmittedAt string `json:"submitted_at"`
}
type Task ¶
type Task struct {
TaskID string `json:"task_id"`
State string `json:"state"`
Revision int64 `json:"revision"`
Generation int64 `json:"generation"`
ContentVersion *int64 `json:"content_version"`
ContractDigest *string `json:"contract_digest"`
Contract Contract `json:"contract"`
CurrentAssignmentID *string `json:"current_assignment_id"`
PendingSubmissionID *string `json:"pending_submission_id"`
RecoveryGate string `json:"recovery_gate"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.