This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
package artifact
|
||||
|
||||
// Package artifact contains stable boundary contract types for the artifact semantic owner.
|
||||
@@ -0,0 +1,5 @@
|
||||
package artifact
|
||||
|
||||
import "git.cin.su/m/Assistant/platform/ids"
|
||||
|
||||
type ArtifactID ids.ID
|
||||
@@ -0,0 +1,3 @@
|
||||
package authority
|
||||
|
||||
// Package authority contains stable boundary contract types for the authority semantic owner.
|
||||
@@ -0,0 +1,40 @@
|
||||
package authority
|
||||
|
||||
import (
|
||||
"git.cin.su/m/Assistant/contracts/identity"
|
||||
"git.cin.su/m/Assistant/platform/ids"
|
||||
)
|
||||
|
||||
type ScopeID ids.ID
|
||||
type GrantID ids.ID
|
||||
type AuthorityRevision uint64
|
||||
|
||||
type GrantClass string
|
||||
|
||||
const GrantClassCreator GrantClass = "CREATOR"
|
||||
|
||||
type Scope struct {
|
||||
ID ScopeID
|
||||
Global bool
|
||||
Label string
|
||||
}
|
||||
|
||||
// AuthorityGrant is an explicit, revisable authority record. It does not
|
||||
// derive authority from a capability, provider, or product display name.
|
||||
type AuthorityGrant struct {
|
||||
ID GrantID
|
||||
ActorID identity.ActorID
|
||||
PrincipalID identity.PrincipalID
|
||||
ScopeID ScopeID
|
||||
Class GrantClass
|
||||
Revision AuthorityRevision
|
||||
Active bool
|
||||
}
|
||||
|
||||
// AuthorizationContext is the Authority owner's serializable validation
|
||||
// input. Consumers do not depend directly on Identity's contract.
|
||||
type AuthorizationContext struct {
|
||||
Binding identity.PrincipalBinding
|
||||
Scope Scope
|
||||
Grant AuthorityGrant
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package capability
|
||||
|
||||
// Package capability contains stable boundary contract types for the capability semantic owner.
|
||||
@@ -0,0 +1,39 @@
|
||||
package capability
|
||||
|
||||
import "git.cin.su/m/Assistant/platform/ids"
|
||||
|
||||
type CapabilityID ids.ID
|
||||
type CapabilityBindingID ids.ID
|
||||
|
||||
type HealthState string
|
||||
|
||||
const (
|
||||
HealthAvailable HealthState = "AVAILABLE"
|
||||
HealthDegraded HealthState = "DEGRADED"
|
||||
HealthUnavailable HealthState = "UNAVAILABLE"
|
||||
)
|
||||
|
||||
type HealthReason string
|
||||
|
||||
const (
|
||||
ReasonCognitiveProvidersUnavailable HealthReason = "COGNITIVE_PROVIDERS_UNAVAILABLE"
|
||||
ReasonNone HealthReason = "NONE"
|
||||
)
|
||||
|
||||
type HealthSemanticVersion int
|
||||
|
||||
const (
|
||||
HealthV1 HealthSemanticVersion = 1
|
||||
HealthV2 HealthSemanticVersion = 2
|
||||
)
|
||||
|
||||
// Health is the Capability owner's current, explicit statement about whether
|
||||
// a capability can be used. It is not an authority grant.
|
||||
type Health struct {
|
||||
CapabilityID CapabilityID
|
||||
State HealthState
|
||||
Reason HealthReason
|
||||
Revision int64
|
||||
SemanticVersion HealthSemanticVersion
|
||||
ObservedAtUnixMillis *int64
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package commit
|
||||
|
||||
// Package commit contains stable boundary contract types for the commit semantic owner.
|
||||
@@ -0,0 +1,51 @@
|
||||
package commit
|
||||
|
||||
import (
|
||||
"git.cin.su/m/Assistant/contracts/authority"
|
||||
"git.cin.su/m/Assistant/contracts/capability"
|
||||
"git.cin.su/m/Assistant/contracts/identity"
|
||||
"git.cin.su/m/Assistant/contracts/work"
|
||||
"git.cin.su/m/Assistant/platform/ids"
|
||||
)
|
||||
|
||||
type ActionIntentID ids.ID
|
||||
type ActionAttemptID ids.ID
|
||||
type AttemptID = ActionAttemptID
|
||||
type AuthorizedActionID ids.ID
|
||||
|
||||
type ActionState string
|
||||
|
||||
const (
|
||||
ActionProposed ActionState = "PROPOSED"
|
||||
ActionAuthorized ActionState = "AUTHORIZED"
|
||||
ActionExecuting ActionState = "EXECUTING"
|
||||
ActionSucceeded ActionState = "SUCCEEDED"
|
||||
ActionFailed ActionState = "FAILED"
|
||||
ActionUnknownOutcome ActionState = "UNKNOWN_OUTCOME"
|
||||
)
|
||||
|
||||
type ExternalOperation string
|
||||
|
||||
type ActionProposal struct {
|
||||
IntentID ActionIntentID
|
||||
ActorID identity.ActorID
|
||||
CapabilityID capability.CapabilityID
|
||||
Target work.TaskTarget
|
||||
Operation ExternalOperation
|
||||
State ActionState
|
||||
}
|
||||
|
||||
type AuthorizedAction struct {
|
||||
ID AuthorizedActionID
|
||||
Proposal ActionProposal
|
||||
GrantID authority.GrantID
|
||||
ScopeID authority.ScopeID
|
||||
State ActionState
|
||||
}
|
||||
|
||||
type ActionAttempt struct {
|
||||
ID ActionAttemptID
|
||||
AuthorizedID AuthorizedActionID
|
||||
IntentID ActionIntentID
|
||||
State ActionState
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package continuity
|
||||
|
||||
// Package continuity contains stable boundary contract types for the continuity semantic owner.
|
||||
@@ -0,0 +1,38 @@
|
||||
package continuity
|
||||
|
||||
import (
|
||||
"git.cin.su/m/Assistant/contracts/authority"
|
||||
"git.cin.su/m/Assistant/contracts/identity"
|
||||
"git.cin.su/m/Assistant/contracts/work"
|
||||
"git.cin.su/m/Assistant/platform/ids"
|
||||
)
|
||||
|
||||
type CommitmentID ids.ID
|
||||
type ProspectiveItemID ids.ID
|
||||
type ProspectiveRevision uint64
|
||||
|
||||
type ProspectiveState string
|
||||
|
||||
const (
|
||||
ProspectiveRegistered ProspectiveState = "REGISTERED"
|
||||
ProspectiveArmed ProspectiveState = "ARMED"
|
||||
ProspectiveTriggered ProspectiveState = "TRIGGERED"
|
||||
ProspectiveRevalidating ProspectiveState = "REVALIDATING"
|
||||
ProspectiveDelivered ProspectiveState = "DELIVERED"
|
||||
ProspectiveSatisfied ProspectiveState = "SATISFIED"
|
||||
ProspectiveSuppressed ProspectiveState = "SUPPRESSED"
|
||||
ProspectiveExpired ProspectiveState = "EXPIRED"
|
||||
)
|
||||
|
||||
// ProspectiveItem is canonical future relevance. TriggerAtUnixMillis is an
|
||||
// absolute instant; scheduling engines are derived delivery mechanisms only.
|
||||
type ProspectiveItem struct {
|
||||
ID ProspectiveItemID
|
||||
CommitmentID CommitmentID
|
||||
OwnerPrincipalID identity.PrincipalID
|
||||
ScopeID authority.ScopeID
|
||||
GoalID work.GoalID
|
||||
TriggerAtUnixMillis int64
|
||||
State ProspectiveState
|
||||
Revision ProspectiveRevision
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package epistemics
|
||||
|
||||
// Package epistemics contains stable boundary contract types for the epistemics semantic owner.
|
||||
@@ -0,0 +1,7 @@
|
||||
package epistemics
|
||||
|
||||
import "git.cin.su/m/Assistant/platform/ids"
|
||||
|
||||
type ObservationID ids.ID
|
||||
type ClaimID ids.ID
|
||||
type BeliefID ids.ID
|
||||
@@ -0,0 +1,3 @@
|
||||
package identity
|
||||
|
||||
// Package identity contains stable boundary contract types for the identity semantic owner.
|
||||
@@ -0,0 +1,7 @@
|
||||
package identity
|
||||
|
||||
type CreatorSession struct {
|
||||
ActorID ActorID
|
||||
PrincipalID PrincipalID
|
||||
ExpiresAtUnix int64
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package identity
|
||||
|
||||
import "git.cin.su/m/Assistant/platform/ids"
|
||||
|
||||
type ActorID ids.ID
|
||||
type PrincipalID ids.ID
|
||||
type IdentityID ids.ID
|
||||
|
||||
// PrincipalBinding keeps the operational actor separate from the interest on
|
||||
// whose behalf it acts. A Creator is not exempt from this distinction.
|
||||
type PrincipalBinding struct {
|
||||
ActorID ActorID
|
||||
PrincipalID PrincipalID
|
||||
Active bool
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package situation
|
||||
|
||||
// Package situation contains stable boundary contract types for the situation semantic owner.
|
||||
@@ -0,0 +1,32 @@
|
||||
package situation
|
||||
|
||||
import (
|
||||
"git.cin.su/m/Assistant/contracts/authority"
|
||||
"git.cin.su/m/Assistant/contracts/identity"
|
||||
"git.cin.su/m/Assistant/contracts/work"
|
||||
"git.cin.su/m/Assistant/platform/ids"
|
||||
)
|
||||
|
||||
type SituationID ids.ID
|
||||
type FocusBindingID ids.ID
|
||||
type SessionID ids.ID
|
||||
type WorkspaceID ids.ID
|
||||
type ProjectID ids.ID
|
||||
|
||||
// FocusBinding is the situation-owned runtime context used to resolve a request.
|
||||
// User text is deliberately absent: textual similarity is not a routing signal.
|
||||
type FocusBinding struct {
|
||||
ID FocusBindingID
|
||||
ActorID identity.ActorID
|
||||
SessionID SessionID
|
||||
Workspace WorkspaceID
|
||||
ProjectID ProjectID
|
||||
GoalID work.GoalID
|
||||
ScopeID authority.ScopeID
|
||||
Active bool
|
||||
}
|
||||
|
||||
type RuntimeBinding struct {
|
||||
SessionID SessionID
|
||||
Workspace WorkspaceID
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package work
|
||||
|
||||
// Package work contains stable boundary contract types for the work semantic owner.
|
||||
@@ -0,0 +1,19 @@
|
||||
package work
|
||||
|
||||
import (
|
||||
"git.cin.su/m/Assistant/contracts/authority"
|
||||
"git.cin.su/m/Assistant/platform/ids"
|
||||
)
|
||||
|
||||
type GoalID ids.ID
|
||||
type TaskID ids.ID
|
||||
type DecisionID ids.ID
|
||||
type TaskRevision uint64
|
||||
|
||||
// TaskTarget carries the integrity context that a work-owned mutation must match.
|
||||
type TaskTarget struct {
|
||||
TaskID TaskID
|
||||
GoalID GoalID
|
||||
ScopeID authority.ScopeID
|
||||
Revision TaskRevision
|
||||
}
|
||||
Reference in New Issue
Block a user