Documentation
¶
Overview ¶
Package engine 是 XOps v2 六边形核心(core)面向外部宿主(cmd/xops、internal/entry/{cli,tui,sftpshell,mcpcmd,muxdaemon} 与外部 xops-mcp) 唯一公开的运行期装配与全量业务门面(ADR-001 / ADR-008 / ADR-009 / ADR-010 / Plan P3-T5)。
核心架构与安全不变量:
- 生产源码严格零引用 core/ports/tck 与 core/internal/sim(由 xopsvet/archbound 强制), 仅装配真实主机密钥信任库(sshnet/hostkey)、真实 SSH 拨号器(sshnet/dial)、透明 ControlMaster 客户端复用适配器、双通道纯内存 Actor 连接池(pool)、独占能力门控(gate)、全部 6 大用例服务 (usecase/{inventory,credential,session,transfer,automation,observability})以及沙箱隔离的 MCP 运行时(mcpruntime);
- 严格将 gate.OnHaltFunc 接线至 pool.GateHalted:StrictAgentProfile 下任一 AuditPostWriteError 触发不可逆 Halted 熔断后,连接池立即失效全部活跃句柄并拒绝一切后续租约;
- 为 MCPServer 独立装配共享活跃句柄表但物理零 OperatorReadFS 的 Transfer/Automation 用例服务,阻断沙箱逃逸;
- 完整暴露不透明公开值类型、枚举常量、构造/解析代理、语义哨兵错误映射及两步审批/引用冲突提取契约, 使 internal/entry/** 仅依赖 core/{domain,events,engine,conc} 即可驱动全量业务而零触碰 core/internal/** 或 core/ports;
- 退出期 Close(ctx) 严格按派生 MCPServer & Projection -> 在途 UseCases 排空 -> 连接池 Pool -> 自有 SystemBus 逆序优雅停机, 绝不代为关闭由外部组合根(cmd/xops)持有的 AuditSink、ScopedRootFS 或外部注入的 SystemBus;
- 全包 0 init()、0 可变包级变量、0 裸 go 语句、0 nolint 豁免。
Index ¶
- Constants
- Variables
- type ApprovalChallenge
- type ApprovalSubmission
- type BatchExecReport
- type BatchExecRequest
- type BatchNodeResult
- type CallOptions
- type CommitTransferResult
- type Config
- type ControlMasterInfo
- type ControlMasterRequest
- type ControlMasterStatus
- type CrashReconcileReport
- type CredentialDoctorRep
- type DeleteAssetRequest
- type DeleteSecretRequest
- type DiagnosticRecord
- type DialContextFunc
- type DiskMetric
- type DoctorFinding
- type DoctorSeverity
- type DurabilityOutcome
- type Engine
- func (e *Engine) AbortTransfer(ctx context.Context, req TransferHandleOpRequest) error
- func (e *Engine) ApplyImport(ctx context.Context, req ImportRequest) (ImportResult, error)
- func (e *Engine) BatchExec(ctx context.Context, req BatchExecRequest) (BatchExecReport, error)
- func (e *Engine) CanSuspendProcessGroup() (security.Verdict, error)
- func (e *Engine) CheckSecretReferences(ctx context.Context, req SecretRefCheckRequest) ([]inventory.SecretReference, error)
- func (e *Engine) ChmodRemote(ctx context.Context, req RemotePathOpRequest) error
- func (e *Engine) ChtimesRemote(ctx context.Context, req RemotePathOpRequest) error
- func (e *Engine) Close(ctx context.Context) error
- func (e *Engine) CloseGUISession(ctx context.Context, handle plan.ManagedHandle[plan.KindTunnel]) error
- func (e *Engine) ClosePTY(ctx context.Context, handle plan.ManagedHandle[plan.KindPTY]) error
- func (e *Engine) CommitTransfer(ctx context.Context, req TransferHandleOpRequest) (CommitTransferResult, error)
- func (e *Engine) ControlMux(ctx context.Context, req MuxControlRequest) (MuxControlResponse, error)
- func (e *Engine) CreateHost(ctx context.Context, req HostMutationRequest) (MutationResult, error)
- func (e *Engine) CreateIdentity(ctx context.Context, req IdentityMutationRequest) (MutationResult, error)
- func (e *Engine) CreateNode(ctx context.Context, req NodeMutationRequest) (MutationResult, error)
- func (e *Engine) DeleteHost(ctx context.Context, req DeleteAssetRequest) (MutationResult, error)
- func (e *Engine) DeleteIdentity(ctx context.Context, req DeleteAssetRequest) (MutationResult, error)
- func (e *Engine) DeleteNode(ctx context.Context, req DeleteAssetRequest) (MutationResult, error)
- func (e *Engine) DeleteSecret(ctx context.Context, req DeleteSecretRequest) error
- func (e *Engine) EnrollEncryptedPrivateKeyIdentity(ctx context.Context, req EnrollEncryptedPrivateKeyRequest) (EnrollEncryptedPrivateKeyResult, error)
- func (e *Engine) EnrollEncryptedPrivateKeyIdentityFromBytes(ctx context.Context, req EnrollEncryptedPrivateKeyRequest, ...) (EnrollEncryptedPrivateKeyResult, error)
- func (e *Engine) EnrollEncryptedPrivateKeyIdentityWithSecret(ctx context.Context, req EnrollEncryptedPrivateKeyRequest, ...) (EnrollEncryptedPrivateKeyResult, error)
- func (e *Engine) Exec(ctx context.Context, req ExecRequest) (execution.ExecutionOutcome, error)
- func (e *Engine) ExecPrivileged(ctx context.Context, req PrivilegeExecRequest) (execution.ExecutionOutcome, error)
- func (e *Engine) ExecuteGUI(ctx context.Context, req GUIExecRequest) (GUIExecResult, error)
- func (e *Engine) ExecuteVaultSaga(ctx context.Context, req VaultSagaRequest, newSecret *secret.SecretBox) (SagaResult, error)
- func (e *Engine) ExecuteVaultSagaFromBytes(ctx context.Context, req VaultSagaRequest, rawSecret []byte) (SagaResult, error)
- func (e *Engine) ExecuteVaultSagaInteractive(ctx context.Context, req InteractiveVaultSagaRequest) (SagaResult, error)
- func (e *Engine) FindSecretReferences(ctx context.Context, req FindSecretReferencesRequest) ([]inventory.SecretReference, error)
- func (e *Engine) GCUnreferencedSecrets(ctx context.Context, req GCUnreferencedRequest) (GCUnreferencedResult, error)
- func (e *Engine) GetHost(ctx context.Context, id inventory.HostID, req InventoryQueryRequest) (inventory.Host, Revision, error)
- func (e *Engine) GetIdentity(ctx context.Context, id inventory.IdentityID, req InventoryQueryRequest) (inventory.Identity, Revision, error)
- func (e *Engine) GetInventorySnapshot(ctx context.Context, req InventoryQueryRequest) (InventorySnapshot, error)
- func (e *Engine) GetNode(ctx context.Context, id inventory.NodeID, req InventoryQueryRequest) (inventory.Node, Revision, error)
- func (e *Engine) HaltInfo() (HaltInfo, bool)
- func (e *Engine) InspectControlMaster(ctx context.Context, handle plan.ManagedHandle[plan.KindMux]) (ControlMasterStatus, error)
- func (e *Engine) InspectForward(ctx context.Context, handle plan.ManagedHandle[plan.KindTunnel]) (ForwardStatus, error)
- func (e *Engine) InspectGUISession(ctx context.Context, handle plan.ManagedHandle[plan.KindTunnel]) (GUISessionStatus, error)
- func (e *Engine) InspectPTY(ctx context.Context, handle plan.ManagedHandle[plan.KindPTY]) (PTYStatus, error)
- func (e *Engine) InspectTransfer(ctx context.Context, req InspectTransferRequest) (TransferStatusSnapshot, error)
- func (e *Engine) InteractiveSSH(ctx context.Context, req InteractiveSSHRequest) (execution.ExecutionOutcome, error)
- func (e *Engine) InventoryDoctor(ctx context.Context, req InventoryDoctorRequest) (InventoryDoctorRep, error)
- func (e *Engine) IsClosed() bool
- func (e *Engine) IsHalted() bool
- func (e *Engine) ListHosts(ctx context.Context, req InventoryQueryRequest) ([]inventory.Host, Revision, error)
- func (e *Engine) ListIdentities(ctx context.Context, req InventoryQueryRequest) ([]inventory.Identity, Revision, error)
- func (e *Engine) ListNodes(ctx context.Context, req InventoryQueryRequest) ([]inventory.Node, Revision, error)
- func (e *Engine) ListRemoteDir(ctx context.Context, req RemotePathOpRequest) (ListDirResult, error)
- func (e *Engine) MkdirRemoteAll(ctx context.Context, req RemotePathOpRequest) error
- func (e *Engine) NewMCPServer(cfg MCPConfig) (*MCPServer, error)
- func (e *Engine) NewOperationStream(ctx context.Context, buffer int) (*events.OperationStream, error)
- func (e *Engine) NewProjection(ctx context.Context, cfg ProjectionConfig) (*Projection, error)
- func (e *Engine) OpenGUISession(ctx context.Context, req OpenGUISessionRequest) (GUISessionInfo, error)
- func (e *Engine) OpenPTY(ctx context.Context, req OpenPTYRequest) (plan.ManagedHandle[plan.KindPTY], error)
- func (e *Engine) PatchRemoteFile(ctx context.Context, req RemoteFilePatchRequest) (PatchFileResult, error)
- func (e *Engine) PlanImport(ctx context.Context, req ImportRequest) (ImportPreview, error)
- func (e *Engine) ProbeMux(ctx context.Context, req MuxControlRequest) (MuxControlResponse, error)
- func (e *Engine) ProbePendingEnrollmentTarget(ctx context.Context, lease *PendingEnrollmentLease, ...) (inventory.KeyFingerprint, error)
- func (e *Engine) ProbeShell(ctx context.Context, req ProbeShellRequest) (ShellProbeResult, error)
- func (e *Engine) PullTransferChunk(ctx context.Context, req PullTransferChunkRequest) (PullTransferChunkResult, error)
- func (e *Engine) ReadLinkRemote(ctx context.Context, req RemotePathOpRequest) (string, error)
- func (e *Engine) ReadPTY(ctx context.Context, req PTYReadRequest) (PTYReadResult, error)
- func (e *Engine) ReadRemoteFile(ctx context.Context, req RemoteFileReadRequest) (ReadFileResult, error)
- func (e *Engine) RealPathRemote(ctx context.Context, req RemotePathOpRequest) (pathalg.RemotePath, error)
- func (e *Engine) ReconcileCrashedAudits(ctx context.Context) (ReconcileReport, error)
- func (e *Engine) RecoverAllTransfers(ctx context.Context, req RecoverAllTransfersRequest) (RecoverAllResult, error)
- func (e *Engine) RecoverTransfer(ctx context.Context, req RecoverTransferRequest) (TransferRecoveryResult, error)
- func (e *Engine) RemoveRemoteDir(ctx context.Context, req RemotePathOpRequest) error
- func (e *Engine) RemoveRemoteFile(ctx context.Context, req RemotePathOpRequest) error
- func (e *Engine) RenameRemoteFile(ctx context.Context, req RemoteRenameRequest) error
- func (e *Engine) ResizePTY(ctx context.Context, handle plan.ManagedHandle[plan.KindPTY], ...) error
- func (e *Engine) ResolvePendingEnrollmentTarget(ctx context.Context, lease *PendingEnrollmentLease, cliOpts option.OptionLayer) (ResolvedTarget, error)
- func (e *Engine) ResolveTarget(ctx context.Context, req ResolveTargetRequest) (ResolvedTarget, error)
- func (e *Engine) ResumeTransfer(ctx context.Context, req ResumeTransferRequest) (TransferHandleInfo, error)
- func (e *Engine) RotateSecret(ctx context.Context, req RotateSecretRequest, newSecret *secret.SecretBox) (SagaResult, error)
- func (e *Engine) RotateSecretInteractive(ctx context.Context, req InteractiveRotateSecretRequest) (SagaResult, error)
- func (e *Engine) RunMuxProxy(ctx context.Context, req MuxControlRequest, stdin io.ReadCloser, ...) error
- func (e *Engine) RunPlaybook(ctx context.Context, req PlaybookRequest) (PlaybookRunResult, error)
- func (e *Engine) RunSSH(ctx context.Context, req RunSSHRequest) (execution.ExecutionOutcome, error)
- func (e *Engine) SCPDownload(ctx context.Context, req SCPDownloadRequest) (SCPDownloadResult, error)
- func (e *Engine) SCPUpload(ctx context.Context, req SCPUploadRequest) (SCPUploadResult, error)
- func (e *Engine) SignalPTY(ctx context.Context, handle plan.ManagedHandle[plan.KindPTY], sig string) error
- func (e *Engine) StartControlMaster(ctx context.Context, req ControlMasterRequest) (ControlMasterInfo, error)
- func (e *Engine) StartForward(ctx context.Context, req StartForwardRequest) (ForwardInfo, error)
- func (e *Engine) StartTransfer(ctx context.Context, req StartTransferRequest) (TransferHandleInfo, error)
- func (e *Engine) StatRemoteFile(ctx context.Context, req RemoteStatRequest) (RemoteFileStat, error)
- func (e *Engine) StopControlMaster(ctx context.Context, handle plan.ManagedHandle[plan.KindMux]) error
- func (e *Engine) StopForward(ctx context.Context, handle plan.ManagedHandle[plan.KindTunnel]) error
- func (e *Engine) StreamLogs(ctx context.Context, req LogStreamRequest) (LogStreamResult, error)
- func (e *Engine) StreamMetrics(ctx context.Context, req MetricsStreamRequest) (MetricsStreamResult, error)
- func (e *Engine) SupportedImportFormats() []string
- func (e *Engine) SystemBus() *events.SystemBus
- func (e *Engine) TouchControlMaster(ctx context.Context, handle plan.ManagedHandle[plan.KindMux]) error
- func (e *Engine) UpdateHost(ctx context.Context, req HostMutationRequest) (MutationResult, error)
- func (e *Engine) UpdateIdentity(ctx context.Context, req IdentityMutationRequest) (MutationResult, error)
- func (e *Engine) UpdateNode(ctx context.Context, req NodeMutationRequest) (MutationResult, error)
- func (e *Engine) ValidateDAG(ctx context.Context, req InventoryQueryRequest) (inventory.DAGReport, error)
- func (e *Engine) VaultDoctor(ctx context.Context, req VaultDoctorRequest) (CredentialDoctorRep, error)
- func (e *Engine) VaultInit(ctx context.Context, req VaultOpRequest, pass *secret.SecretBox) error
- func (e *Engine) VaultInitFromBytes(ctx context.Context, req VaultOpRequest, rawPassphrase []byte) error
- func (e *Engine) VaultInitInteractive(ctx context.Context, req InteractiveVaultOpRequest) error
- func (e *Engine) VaultLock(ctx context.Context, req VaultOpRequest) error
- func (e *Engine) VaultStatus(ctx context.Context, req VaultOpRequest) (VaultStatus, error)
- func (e *Engine) VaultUnlock(ctx context.Context, req VaultOpRequest, pass *secret.SecretBox) error
- func (e *Engine) VaultUnlockFromBytes(ctx context.Context, req VaultOpRequest, rawPassphrase []byte) error
- func (e *Engine) VaultUnlockInteractive(ctx context.Context, req InteractiveVaultOpRequest) error
- func (e *Engine) WithPendingEnrollment(ctx context.Context, req PendingEnrollmentRequest, ...) (PendingEnrollmentResult, error)
- func (e *Engine) WithPromptedSecret(ctx context.Context, prompt SecretPromptRequest, ...) error
- func (e *Engine) WithSecret(ctx context.Context, req WithSecretRequest, ...) error
- func (e *Engine) WritePTY(ctx context.Context, handle plan.ManagedHandle[plan.KindPTY], data []byte) (int, error)
- func (e *Engine) WriteRemoteFile(ctx context.Context, req RemoteFileWriteRequest) (WriteFileResult, error)
- func (e *Engine) WriteTransferChunk(ctx context.Context, req WriteTransferChunkRequest) (WriteTransferChunkRes, error)
- type EnrollEncryptedPrivateKeyRequest
- type EnrollEncryptedPrivateKeyResult
- type ExecRequest
- type FindSecretReferencesRequest
- type ForwardDirection
- type ForwardEndpointKind
- type ForwardInfo
- type ForwardSpec
- type ForwardStatus
- type GCUnreferencedRequest
- type GCUnreferencedResult
- type GUIActionKind
- type GUIActionSpec
- type GUIArtifactDest
- type GUIExecRequest
- type GUIExecResult
- type GUISessionInfo
- type GUISessionKind
- type GUISessionSpec
- type GUISessionStatus
- type GraphMutator
- type GuardrailConfig
- type HaltInfo
- type HandleStatus
- type HostMetricsFrame
- type HostMutationRequest
- type IdentityMutationRequest
- type ImportPreview
- type ImportRequest
- type ImportResult
- type InspectTransferRequest
- type InteractiveRotateSecretRequest
- type InteractiveSSHRequest
- type InteractiveVaultOpRequest
- type InteractiveVaultSagaRequest
- type InventoryDoctorRep
- type InventoryDoctorRequest
- type InventoryQueryRequest
- type InventorySnapshot
- type ListDirResult
- type LocalUploadSource
- type LocalUploadSourceKind
- type LogEntry
- type LogStreamRequest
- type LogStreamResult
- type LogTarget
- type LogTargetKind
- type MCPConfig
- type MCPServer
- func (s *MCPServer) Close(ctx context.Context) error
- func (s *MCPServer) HandleMessage(ctx context.Context, raw []byte) ([]byte, bool, error)
- func (s *MCPServer) Handler() http.Handler
- func (s *MCPServer) IsClosed() bool
- func (s *MCPServer) ListenAndServeHTTP(ctx context.Context, addr string) error
- func (s *MCPServer) Prepare(ctx context.Context) (MCPStartupReport, error)
- func (s *MCPServer) ServeHTTPListener(ctx context.Context, ln net.Listener) error
- func (s *MCPServer) ServeStdio(ctx context.Context, in io.Reader, out io.Writer) error
- func (s *MCPServer) StartupReport() MCPStartupReport
- type MCPStartupReport
- type MetricPoint
- type MetricsStreamRequest
- type MetricsStreamResult
- type MutationResult
- type MuxControlAction
- type MuxControlRequest
- type MuxControlResponse
- type NewSecretVerifier
- type NoElicitFallback
- type NodeMutationRequest
- type NodeStreamFactory
- type OldSecretRefsResolver
- type OnHaltFunc
- type OpenGUISessionRequest
- type OpenPTYRequest
- type OperationView
- type PTYReadRequest
- type PTYReadResult
- type PTYStatus
- type PatchFileResult
- type PendingEnrollmentLease
- type PendingEnrollmentRequest
- type PendingEnrollmentResult
- type PendingProbeFunc
- type PlaybookRequest
- type PlaybookRunResult
- type PolicyProfile
- type PoolRecord
- type PrivilegeExecRequest
- type PrivilegeMethod
- type PrivilegeRequest
- type PrivilegeRequestSpec
- type ProbePendingEnrollmentRequest
- type ProbeShellRequest
- type ProcessMetric
- type ProcessSortBy
- type ProcessedScreenshot
- type Projection
- type ProjectionConfig
- type ProjectionSnapshot
- type PullTransferChunkRequest
- type PullTransferChunkResult
- type ReadFileResult
- type ReconcileReport
- type RecoverAllResult
- type RecoverAllTransfersRequest
- type RecoverTransferRequest
- type ReferenceConflict
- func (c ReferenceConflict) AssetKind() string
- func (c ReferenceConflict) AssetReferences() []inventory.AssetReference
- func (c ReferenceConflict) IsValid() bool
- func (c ReferenceConflict) IsZero() bool
- func (c ReferenceConflict) SecretReferences() []inventory.SecretReference
- func (c ReferenceConflict) Subject() string
- type RemoteCall
- type RemoteDirEntry
- type RemoteFSFunc
- type RemoteFileAnchor
- type RemoteFilePatchRequest
- type RemoteFileReadRequest
- type RemoteFileStat
- type RemoteFileType
- type RemoteFileWriteRequest
- type RemotePathOpRequest
- type RemoteRenameRequest
- type RemoteStatRequest
- type RequestTTYMode
- type ResolveTargetRequest
- type ResolvedTarget
- type ResumeTransferRequest
- type RetainedSecret
- type Revision
- type RotateSecretRequest
- type RunSSHRequest
- type SCPDownloadRequest
- type SCPDownloadResult
- type SCPUploadRequest
- type SCPUploadResult
- type SagaResult
- type ScrollDirection
- type SecretPromptRequest
- type SecretPromptRequestSpec
- type SecretRefCheckRequest
- type ShellProbeResult
- type StartForwardRequest
- type StartTransferRequest
- type TUNMode
- type TUNSpec
- type TargetInput
- type TerminalSize
- type TextEdit
- type TransferHandleInfo
- type TransferHandleOpRequest
- type TransferRecSummary
- type TransferRecoveryEntry
- type TransferRecoveryResult
- type TransferSessionOptions
- type TransferStatusSnapshot
- type VaultDoctorRequest
- type VaultOpRequest
- type VaultSagaRequest
- type VaultState
- type VaultStatus
- type WithSecretRequest
- type WriteFileResult
- type WriteTransferChunkRequest
- type WriteTransferChunkRes
Constants ¶
const ( VaultStateInvalid = ports.VaultStateInvalid VaultStateUninitialized = ports.VaultStateUninitialized VaultStateLocked = ports.VaultStateLocked VaultStateUnlocked = ports.VaultStateUnlocked PrivilegeMethodInvalid = ports.PrivilegeMethodInvalid PrivilegeMethodSudo = ports.PrivilegeMethodSudo PrivilegeMethodSu = ports.PrivilegeMethodSu PrivilegeMethodDoas = ports.PrivilegeMethodDoas ForwardDirectionInvalid = ports.ForwardDirectionInvalid ForwardLocal = ports.ForwardLocal ForwardRemote = ports.ForwardRemote ForwardDynamic = ports.ForwardDynamic ForwardTUN = ports.ForwardTUN ForwardEndpointInvalid = ports.ForwardEndpointInvalid ForwardEndpointTCP = ports.ForwardEndpointTCP ForwardEndpointUnix = ports.ForwardEndpointUnix TUNModeInvalid = ports.TUNModeInvalid TUNModePointToPoint = ports.TUNModePointToPoint TUNModeEthernet = ports.TUNModeEthernet TUNUnitAny = ports.TUNUnitAny MuxActionInvalid = ports.MuxActionInvalid MuxActionCheck = ports.MuxActionCheck MuxActionForward = ports.MuxActionForward MuxActionCancel = ports.MuxActionCancel MuxActionExit = ports.MuxActionExit MuxActionStop = ports.MuxActionStop MuxActionProxy = ports.MuxActionProxy RemoteFileTypeInvalid = ports.RemoteFileTypeInvalid RemoteFileRegular = ports.RemoteFileRegular RemoteFileDir = ports.RemoteFileDir RemoteFileSymlink = ports.RemoteFileSymlink RemoteFileOther = ports.RemoteFileOther DoctorSeverityInvalid = uccred.DoctorSeverityInvalid DoctorSeverityInfo = uccred.DoctorSeverityInfo DoctorSeverityWarn = uccred.DoctorSeverityWarn DoctorSeverityError = uccred.DoctorSeverityError LocalUploadSourceInvalid = uctrans.LocalUploadSourceInvalid LocalUploadSourceOperator = uctrans.LocalUploadSourceOperator LocalUploadSourceScoped = uctrans.LocalUploadSourceScoped LogTargetInvalid = ucobs.LogTargetInvalid LogTargetFile = ucobs.LogTargetFile LogTargetDocker = ucobs.LogTargetDocker ProcessSortInvalid = ucobs.ProcessSortInvalid ProcessSortCPU = ucobs.ProcessSortCPU ProcessSortMem = ucobs.ProcessSortMem GUIActionInvalid = ucobs.GUIActionInvalid GUIActionScreenshot = ucobs.GUIActionScreenshot GUIActionClick = ucobs.GUIActionClick GUIActionDoubleClick = ucobs.GUIActionDoubleClick GUIActionRightClick = ucobs.GUIActionRightClick GUIActionMove = ucobs.GUIActionMove GUIActionDrag = ucobs.GUIActionDrag GUIActionScroll = ucobs.GUIActionScroll GUIActionType = ucobs.GUIActionType GUIActionKey = ucobs.GUIActionKey ScrollDirectionInvalid = ucobs.ScrollDirectionInvalid ScrollUp = ucobs.ScrollUp ScrollDown = ucobs.ScrollDown ScrollLeft = ucobs.ScrollLeft ScrollRight = ucobs.ScrollRight GUISessionInvalid = ucobs.GUISessionInvalid GUISessionX11 = ucobs.GUISessionX11 GUISessionVNC = ucobs.GUISessionVNC )
公开端口与用例枚举常量别名(零 core/ports 与 core/internal 导入即可穷尽 switch)。
Variables ¶
var ( ErrNilContext = errors.New("engine: context 不能为 nil") ErrInvalidConfig = errors.New("engine: 无效的 Engine Config 配置") ErrEngineNotInitialized = errors.New("engine: Engine 未初始化") ErrEngineClosed = errors.New("engine: Engine 已关闭") ErrEngineHalted = errors.New("engine: Engine 安全门控已进入不可逆 Halted 熔断态") ErrInvalidRequest = errors.New("engine: 无效的请求参数") ErrInvalidProfile = errors.New("engine: 无效的 PolicyProfile 策略配置档") ErrInvalidFallback = errors.New("engine: 无效的 NoElicitFallback 回退策略") ErrInvalidRequestTTY = errors.New("engine: 无效的 RequestTTY 模式") ErrMCPServerNotInitialized = errors.New("engine: MCPServer 未初始化") ErrProjectionNotInitialized = errors.New("engine: Projection 未初始化") ErrApprovalRequired = errors.New("engine: 操作需要两步审批确认") ErrApprovalRejected = errors.New("engine: 操作员拒绝了两步审批挑战") ErrAuthorizationDenied = errors.New("engine: 安全护栏或权限策略拒绝该操作") ErrScopeEscalated = errors.New("engine: 规范化阶段检测到作用域升级或路径漂移") ErrNotFound = errors.New("engine: 目标资源不存在") ErrAlreadyExists = errors.New("engine: 目标资源已存在") ErrRevisionConflict = errors.New("engine: 资产配置版本 CAS 冲突") ErrStillReferenced = errors.New("engine: 目标资产或凭据仍被引用,拒绝删除") ErrImportConflict = errors.New("engine: 导入预检发现冲突,拒绝写入") ErrUncertainDurability = errors.New("engine: 变更已生效但持久性未确认,严禁重试或删除凭据") ErrOutcomeUnknown = errors.New("engine: 副作用结果未知,严禁自动重试") ErrVaultLocked = errors.New("engine: 凭据库处于锁定状态") ErrSecretNotFound = errors.New("engine: 凭据条目不存在") ErrAuthFailed = errors.New("engine: 远端身份认证或凭据校验失败") ErrHostKeyUnknown = errors.New("engine: 远端主机密钥未知且策略禁止自动信任") ErrHostKeyMismatch = errors.New("engine: 远端主机密钥指纹与信任库冲突") ErrHostKeyRevoked = errors.New("engine: 远端主机密钥已被吊销") ErrDialFailed = errors.New("engine: 建立远端传输连接失败") ErrControlMasterDisabled = errors.New("engine: ControlPolicy 生效投影已禁用多路复用") ErrHandleNotFound = errors.New("engine: 托管长会话句柄不存在或已释放") ErrHandleRevoked = errors.New("engine: 托管句柄或连接租约已被吊销") ErrInteractionCanceled = errors.New("engine: 操作员取消了交互请求") ErrRemoteAnchorMismatch = errors.New("engine: 远端文件 FSTAT 类型或 (dev,ino) 锚点不匹配") ErrRemoteIsDir = errors.New("engine: 远端目标为目录而非文件") ErrNotRegularFile = errors.New("engine: 目标路径不是常规文件") ErrPatchConflict = errors.New("engine: 远端文件补丁匹配失败或存在歧义冲突") ErrDigestMismatch = errors.New("engine: 文件 SHA-256 摘要校验不匹配") ErrSymlinkRejected = errors.New("engine: 符号链接被当前安全策略拒绝") ErrCorruptData = errors.New("engine: 持久化数据或传输日志损坏") ErrLimitExceeded = errors.New("engine: 数据大小或对象数量超出安全上限") ErrUnsupported = errors.New("engine: 当前配置或适配器不支持该能力") )
本包导出的不可变规范哨兵错误,供组合根与受 archbound 约束的 internal/entry/** 通过 errors.Is 精确区分运行期故障类别。
Functions ¶
This section is empty.
Types ¶
type ApprovalChallenge ¶
type ApprovalChallenge struct {
// contains filtered or unexported fields
}
ApprovalChallenge 封装护栏签发的两步审批挑战信封与摘要,供 CLI/TUI/外部宿主处理结构化审批。
func ExtractApprovalChallenge ¶
func ExtractApprovalChallenge(err error) (ApprovalChallenge, bool)
ExtractApprovalChallenge 从任意 Engine 返回的 error 链中提取结构化两步审批挑战。
func (ApprovalChallenge) Envelope ¶
func (c ApprovalChallenge) Envelope() security.ApprovalEnvelope
func (ApprovalChallenge) EnvelopeDigest ¶
func (c ApprovalChallenge) EnvelopeDigest() security.Digest
func (ApprovalChallenge) Escalated ¶
func (c ApprovalChallenge) Escalated() bool
func (ApprovalChallenge) IsValid ¶
func (c ApprovalChallenge) IsValid() bool
func (ApprovalChallenge) Reason ¶
func (c ApprovalChallenge) Reason() string
type ApprovalSubmission ¶
type ApprovalSubmission = gate.ApprovalSubmission
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func NewApprovalSubmission ¶
func NewApprovalSubmission(verdict security.Verdict, envelopeDigest security.Digest, envelope algebraic.Option[security.ApprovalEnvelope], comment string) (ApprovalSubmission, error)
NewApprovalSubmission 校验用户审批判定、信封 SHA-256 摘要与可选完整信封,构造公开 ApprovalSubmission。
type BatchExecReport ¶
type BatchExecReport = ucauto.BatchExecReport
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type BatchExecRequest ¶
type BatchExecRequest struct {
CallOptions
Targets []ResolvedTarget
Selector algebraic.Option[playbook.TargetSelector]
CLIOptions option.OptionLayer
ExcludeNodes []inventory.NodeID
ExcludeTags []inventory.Tag
Command execution.CommandPlan
Concurrency int
MaxOutputBytes uint64
OutputDir algebraic.Option[pathalg.LocalDir]
FailFast bool
NodeStreams map[inventory.NodeID]*events.OperationStream
NodeStreamFactory NodeStreamFactory
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type BatchNodeResult ¶
type BatchNodeResult = ucauto.BatchNodeResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type CallOptions ¶
type CallOptions struct {
Risk algebraic.Option[security.RiskLevel]
Approval algebraic.Option[ApprovalSubmission]
OperationStream *events.OperationStream
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type CommitTransferResult ¶
type CommitTransferResult = uctrans.CommitTransferResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type Config ¶
type Config struct {
Profile PolicyProfile
Guardrail GuardrailConfig
// 核心基础设施端口:Clock / Entropy / AuditSink 为必填(ADR-008 零 nil 逃生口);Reconciler 供启动期 O(1) 崩溃对账。
Clock ports.Clock
Entropy ports.Entropy
AuditSink ports.AuditSink
Reconciler ports.AuditReconciler
// 双模态本地文件系统与主机信任库(未注入 HostTrust 时必须提供 ScopedFS 以装配真实 KnownHostsDB)。
ScopedFS ports.ScopedRootFS
OperatorReadFS ports.OperatorReadFS
HostTrust ports.HostTrustPort
KnownHostsDir, HomeDir algebraic.Option[pathalg.LocalDir]
KnownHostsFileName string
KnownHostsMaxBytes int64
HashKnownHosts bool
SSHFPLookup ports.SSHFPLookupPort
// 可选本机/交互/凭据/资产/传输/隧道/复用与底层拨号端口(Phase 3/4 解耦注入槽位)。
Env ports.EnvPort
Terminal ports.TerminalPort
Process ports.ProcessPort
OpenSSH ports.OpenSSHConfigSource
Interaction ports.InteractionPort
Vault ports.SecretVault
KeySigner ports.KeySignerPort // 为 nil 且已注入 OperatorReadFS/Agent 时默认装配真实 sshnet/dial.NewKeySigner
Agent ports.SSHAgentPort
VaultControl ports.VaultControlPort
InventoryStore ports.InventoryStore
JournalStore ports.JournalStore
Importers []ports.FormatImporter
KnownStores []string
DefaultEnrollTTL algebraic.Option[algebraic.Duration]
PrivilegeEscalation ports.PrivilegeEscalationPort // 为 nil 时默认装配真实 sshnet/priv.NewEscalator
ShellProbe ports.ShellProbePort // 为 nil 时默认装配真实 sshnet/probe.NewProber
Forwarder ports.ForwarderPort // 为 nil 时默认装配真实 sshnet/forward.NewForwarder
TUNDevice ports.TUNDevicePort
MuxSocket ports.MuxSocketPort // 为 nil 时默认装配真实 sshnet/mux.NewMuxSocket
Dialer ports.DialerPort // 为 nil 时默认装配真实 sshnet/dial(含 sftp.Open)+ sshnet/hostkey
RemoteFS RemoteFSFunc // 仅用于外部自定义/仿真 Dialer 覆写 OpenRemoteFS;真实路径由 buildRealDialer 注入 sftp.Open
// 拨号、全局选项、跳板深度、转发安全开关、限流分片、事件总线与连接池调优参数(全可选,0/false/None 取安全失败关闭默认值)。
DialContext DialContextFunc
ClientVersion string
GlobalOptions option.OptionLayer
ForwardAllowGatewayPorts, ForwardReplaceStaleUnix bool // 默认 false:遵循 GatewayPorts=no 且不自动接管过期本地 Unix 转发套接字
MaxJumpDepth, TransferDefaultConcurrency, AutomationDefaultConcurrency int
TransferDefaultChunkSize, TransferDefaultMaxReadBytes int64
AutomationMaxScriptBytes, AutomationMaxTemplateBytes, AutomationMaxCopyBytes int64
SystemBus *events.SystemBus
SystemBusBuffer, PoolAcquireBuffer, PoolMaxConns, PoolMaxHandles int
PoolTeardownGrace, PoolIdleTTL, PoolKeepaliveInterval algebraic.Option[algebraic.Duration]
OnHalt OnHaltFunc // 熔断后触发至多一次(位于 pool.GateHalted 之后)
}
Config 定义 Engine 的全显式依赖注入配置(零全局单例、零隐式 OS/环境变量读取)。
type ControlMasterInfo ¶
type ControlMasterInfo = ucsess.ControlMasterInfo
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ControlMasterRequest ¶
type ControlMasterRequest struct{ RemoteCall }
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type ControlMasterStatus ¶
type ControlMasterStatus = ucsess.ControlMasterStatus
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type CrashReconcileReport ¶
type CrashReconcileReport = ports.CrashReconcileReport
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type CredentialDoctorRep ¶
type CredentialDoctorRep = uccred.DoctorReport
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type DeleteAssetRequest ¶
type DeleteAssetRequest struct {
CallOptions
ID, ScopeSummary string
ExpectedRevision algebraic.Option[Revision]
DeleteUnusedSecrets, RequireSecretsUnreferenced bool
ExtraPending []inventory.PendingSecretRef
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type DeleteSecretRequest ¶
type DeleteSecretRequest = uccred.DeleteSecretRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type DiagnosticRecord ¶
type DiagnosticRecord = ucobs.DiagnosticRecord
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type DialContextFunc ¶
DialContextFunc 与 RemoteFSFunc 定义底层网络拨号与外置自定义/仿真传输的远端文件系统工厂签名。 注意:RemoteFSFunc 仅接收协议无关的 ports.TransportConn(不可访问未导出 *ssh.Client),专用于自定义或仿真 Dialer 覆写; 真实 sshnet/sftp 已在 buildRealDialer 中直接经 dial.Config.OpenRemoteFS 注入 sftp.Open。
type DiskMetric ¶
type DiskMetric = ucobs.DiskMetric
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type DoctorFinding ¶
type DoctorFinding = uccred.DoctorFinding
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type DoctorSeverity ¶
type DoctorSeverity = uccred.DoctorSeverity
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseDoctorSeverity ¶
func ParseDoctorSeverity(s string) (DoctorSeverity, error)
type DurabilityOutcome ¶
type DurabilityOutcome = ports.DurabilityOutcome
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine 是 XOps v2 六边形核心的唯一公开业务编排与运行期门面(ADR-001 / ADR-008 / ADR-009); 零值恒未初始化且所有方法均严格失败关闭。 Close(ctx) 按确定性逆序关闭:派生 MCPServer & Projection -> 在途 UseCase 排空 -> 连接池 Pool -> 自建 SystemBus。
func New ¶
New 校验配置与出站依赖,装配拨号器(含透明 ControlMaster 复用与主机信任观测器)、连接池、安全门控与全部 6 大用例服务。 任意步骤失败均同步回滚已建后台资源,保证零 goroutine 泄漏。
func (*Engine) AbortTransfer ¶
func (e *Engine) AbortTransfer(ctx context.Context, req TransferHandleOpRequest) error
func (*Engine) ApplyImport ¶
func (e *Engine) ApplyImport(ctx context.Context, req ImportRequest) (ImportResult, error)
func (*Engine) BatchExec ¶
func (e *Engine) BatchExec(ctx context.Context, req BatchExecRequest) (BatchExecReport, error)
BatchExec / RunPlaybook 执行受 Nursery 监督的跨节点批量命令与 Playbook 编排,并在全路径确保事件流确定性 EOF。
func (*Engine) CanSuspendProcessGroup ¶
CanSuspendProcessGroup 暴露本机 POSIX 孤儿进程组安全挂起判定(INV-E1,供 Phase 5 entry/cli 实现 ~^Z);未初始化或已关闭恒失败关闭。
func (*Engine) CheckSecretReferences ¶
func (e *Engine) CheckSecretReferences(ctx context.Context, req SecretRefCheckRequest) ([]inventory.SecretReference, error)
func (*Engine) ChmodRemote ¶
func (e *Engine) ChmodRemote(ctx context.Context, req RemotePathOpRequest) error
func (*Engine) ChtimesRemote ¶
func (e *Engine) ChtimesRemote(ctx context.Context, req RemotePathOpRequest) error
func (*Engine) Close ¶
Close 按确定性逆序优雅关闭 Engine(幂等并发安全):MCPServer & Projection -> UseCases 排空 -> Pool -> 自建 SystemBus。
func (*Engine) CloseGUISession ¶
func (e *Engine) CloseGUISession(ctx context.Context, handle plan.ManagedHandle[plan.KindTunnel]) error
func (*Engine) CommitTransfer ¶
func (e *Engine) CommitTransfer(ctx context.Context, req TransferHandleOpRequest) (CommitTransferResult, error)
func (*Engine) ControlMux ¶
func (e *Engine) ControlMux(ctx context.Context, req MuxControlRequest) (MuxControlResponse, error)
func (*Engine) CreateHost ¶
func (e *Engine) CreateHost(ctx context.Context, req HostMutationRequest) (MutationResult, error)
CreateHost / UpdateHost / DeleteHost / CreateIdentity / UpdateIdentity / DeleteIdentity / CreateNode / UpdateNode / DeleteNode 执行乐观并发 CAS 资产变更。
func (*Engine) CreateIdentity ¶
func (e *Engine) CreateIdentity(ctx context.Context, req IdentityMutationRequest) (MutationResult, error)
func (*Engine) CreateNode ¶
func (e *Engine) CreateNode(ctx context.Context, req NodeMutationRequest) (MutationResult, error)
func (*Engine) DeleteHost ¶
func (e *Engine) DeleteHost(ctx context.Context, req DeleteAssetRequest) (MutationResult, error)
func (*Engine) DeleteIdentity ¶
func (e *Engine) DeleteIdentity(ctx context.Context, req DeleteAssetRequest) (MutationResult, error)
func (*Engine) DeleteNode ¶
func (e *Engine) DeleteNode(ctx context.Context, req DeleteAssetRequest) (MutationResult, error)
func (*Engine) DeleteSecret ¶
func (e *Engine) DeleteSecret(ctx context.Context, req DeleteSecretRequest) error
func (*Engine) EnrollEncryptedPrivateKeyIdentity ¶
func (e *Engine) EnrollEncryptedPrivateKeyIdentity(ctx context.Context, req EnrollEncryptedPrivateKeyRequest) (EnrollEncryptedPrivateKeyResult, error)
EnrollEncryptedPrivateKeyIdentity / FromBytes / WithSecret 驱动加密私钥身份的原子 VaultSagaFSM 登记。 注意:交互式 CLI/TUI 入口应优先使用 EnrollEncryptedPrivateKeyIdentity(经 InteractionPort.PromptSecret 零明文留痕); EnrollEncryptedPrivateKeyIdentityFromBytes 仅限非交互脚本/测试路径,调用方须在返回后尽快清零源切片。
func (*Engine) EnrollEncryptedPrivateKeyIdentityFromBytes ¶
func (e *Engine) EnrollEncryptedPrivateKeyIdentityFromBytes(ctx context.Context, req EnrollEncryptedPrivateKeyRequest, rawPassphrase []byte) (EnrollEncryptedPrivateKeyResult, error)
func (*Engine) EnrollEncryptedPrivateKeyIdentityWithSecret ¶
func (e *Engine) EnrollEncryptedPrivateKeyIdentityWithSecret(ctx context.Context, req EnrollEncryptedPrivateKeyRequest, passphrase *secret.SecretBox, ) (EnrollEncryptedPrivateKeyResult, error)
func (*Engine) Exec ¶
func (e *Engine) Exec(ctx context.Context, req ExecRequest) (execution.ExecutionOutcome, error)
Exec 执行单条远端 SSH 命令(严格经 gate.WithAuthorized 包裹 pool.WithLease),全路径确保 OperationStream 确定性 EOF。
func (*Engine) ExecPrivileged ¶
func (e *Engine) ExecPrivileged(ctx context.Context, req PrivilegeExecRequest) (execution.ExecutionOutcome, error)
ExecPrivileged 执行远端提权命令(sudo/su/doas),口令仅经 Vault/交互借用透传,全路径确保 OperationStream 确定性 EOF。
func (*Engine) ExecuteGUI ¶
func (e *Engine) ExecuteGUI(ctx context.Context, req GUIExecRequest) (GUIExecResult, error)
func (*Engine) ExecuteVaultSaga ¶
func (e *Engine) ExecuteVaultSaga(ctx context.Context, req VaultSagaRequest, newSecret *secret.SecretBox, ) (SagaResult, error)
func (*Engine) ExecuteVaultSagaFromBytes ¶
func (e *Engine) ExecuteVaultSagaFromBytes(ctx context.Context, req VaultSagaRequest, rawSecret []byte) (SagaResult, error)
func (*Engine) ExecuteVaultSagaInteractive ¶
func (e *Engine) ExecuteVaultSagaInteractive(ctx context.Context, req InteractiveVaultSagaRequest) (SagaResult, error)
func (*Engine) FindSecretReferences ¶
func (e *Engine) FindSecretReferences(ctx context.Context, req FindSecretReferencesRequest) ([]inventory.SecretReference, error)
func (*Engine) GCUnreferencedSecrets ¶
func (e *Engine) GCUnreferencedSecrets(ctx context.Context, req GCUnreferencedRequest) (GCUnreferencedResult, error)
func (*Engine) GetIdentity ¶
func (e *Engine) GetIdentity(ctx context.Context, id inventory.IdentityID, req InventoryQueryRequest) (inventory.Identity, Revision, error)
func (*Engine) GetInventorySnapshot ¶
func (e *Engine) GetInventorySnapshot(ctx context.Context, req InventoryQueryRequest) (InventorySnapshot, error)
GetInventorySnapshot / GetHost / GetIdentity / GetNode / ListHosts / ListIdentities / ListNodes 暴露资产只读快照、单项与列表查询。
func (*Engine) InspectControlMaster ¶
func (e *Engine) InspectControlMaster(ctx context.Context, handle plan.ManagedHandle[plan.KindMux]) (ControlMasterStatus, error)
func (*Engine) InspectForward ¶
func (e *Engine) InspectForward(ctx context.Context, handle plan.ManagedHandle[plan.KindTunnel]) (ForwardStatus, error)
func (*Engine) InspectGUISession ¶
func (e *Engine) InspectGUISession(ctx context.Context, handle plan.ManagedHandle[plan.KindTunnel]) (GUISessionStatus, error)
func (*Engine) InspectPTY ¶
func (*Engine) InspectTransfer ¶
func (e *Engine) InspectTransfer(ctx context.Context, req InspectTransferRequest) (TransferStatusSnapshot, error)
func (*Engine) InteractiveSSH ¶
func (e *Engine) InteractiveSSH(ctx context.Context, req InteractiveSSHRequest) (execution.ExecutionOutcome, error)
InteractiveSSH 启动交互式远端 SSH Shell 会话(严格经 gate.WithAuthorized 包裹 pool.WithLease),全路径确保 OperationStream 确定性 EOF。
func (*Engine) InventoryDoctor ¶
func (e *Engine) InventoryDoctor(ctx context.Context, req InventoryDoctorRequest) (InventoryDoctorRep, error)
func (*Engine) ListIdentities ¶
func (*Engine) ListRemoteDir ¶
func (e *Engine) ListRemoteDir(ctx context.Context, req RemotePathOpRequest) (ListDirResult, error)
func (*Engine) MkdirRemoteAll ¶
func (e *Engine) MkdirRemoteAll(ctx context.Context, req RemotePathOpRequest) error
func (*Engine) NewMCPServer ¶
NewMCPServer 从 Engine 装配并登记受沙箱隔离(0 OperatorReadFS)的 MCPServer 实例。
func (*Engine) NewOperationStream ¶
func (e *Engine) NewOperationStream(ctx context.Context, buffer int) (*events.OperationStream, error)
NewOperationStream 从显式熵源分配唯一 TraceID/OperationID,构造单次操作隔离事件流(确定性 EOF)。
func (*Engine) NewProjection ¶
func (e *Engine) NewProjection(ctx context.Context, cfg ProjectionConfig) (*Projection, error)
NewProjection 构造绑定至 Engine.SystemBus 的实时事件投影聚合器,并登记至 Engine 逆序关闭列表(早于 SystemBus.Close 排空)。
func (*Engine) OpenGUISession ¶
func (e *Engine) OpenGUISession(ctx context.Context, req OpenGUISessionRequest) (GUISessionInfo, error)
func (*Engine) OpenPTY ¶
func (e *Engine) OpenPTY(ctx context.Context, req OpenPTYRequest) (plan.ManagedHandle[plan.KindPTY], error)
func (*Engine) PatchRemoteFile ¶
func (e *Engine) PatchRemoteFile(ctx context.Context, req RemoteFilePatchRequest) (PatchFileResult, error)
func (*Engine) PlanImport ¶
func (e *Engine) PlanImport(ctx context.Context, req ImportRequest) (ImportPreview, error)
func (*Engine) ProbeMux ¶
func (e *Engine) ProbeMux(ctx context.Context, req MuxControlRequest) (MuxControlResponse, error)
func (*Engine) ProbePendingEnrollmentTarget ¶
func (e *Engine) ProbePendingEnrollmentTarget(ctx context.Context, lease *PendingEnrollmentLease, req ProbePendingEnrollmentRequest, ) (inventory.KeyFingerprint, error)
ProbePendingEnrollmentTarget 经 gate.WithAuthorized[CapInspect] 包裹 pool.WithLease 对未落盘暂存目标执行真实建连握手, 并返回经 HostTrustPort 观测器核验的真实服务端主机密钥指纹(INV-F2 零伪造闭环)。
func (*Engine) ProbeShell ¶
func (e *Engine) ProbeShell(ctx context.Context, req ProbeShellRequest) (ShellProbeResult, error)
ProbeShell / OpenPTY / ReadPTY / WritePTY / ResizePTY / SignalPTY / InspectPTY / ClosePTY。
func (*Engine) PullTransferChunk ¶
func (e *Engine) PullTransferChunk(ctx context.Context, req PullTransferChunkRequest) (PullTransferChunkResult, error)
func (*Engine) ReadLinkRemote ¶
func (*Engine) ReadPTY ¶
func (e *Engine) ReadPTY(ctx context.Context, req PTYReadRequest) (PTYReadResult, error)
func (*Engine) ReadRemoteFile ¶
func (e *Engine) ReadRemoteFile(ctx context.Context, req RemoteFileReadRequest) (ReadFileResult, error)
ReadRemoteFile / WriteRemoteFile / PatchRemoteFile / StatRemoteFile / RenameRemoteFile / ListRemoteDir / MkdirRemoteAll / RemoveRemoteFile / RemoveRemoteDir / ChmodRemote / ChtimesRemote / RealPathRemote / ReadLinkRemote。
func (*Engine) RealPathRemote ¶
func (e *Engine) RealPathRemote(ctx context.Context, req RemotePathOpRequest) (pathalg.RemotePath, error)
func (*Engine) ReconcileCrashedAudits ¶
func (e *Engine) ReconcileCrashedAudits(ctx context.Context) (ReconcileReport, error)
ReconcileCrashedAudits 执行启动期 O(1) 跨进程崩溃审计对账(ADR-008 / RFC §3.4)。
func (*Engine) RecoverAllTransfers ¶
func (e *Engine) RecoverAllTransfers(ctx context.Context, req RecoverAllTransfersRequest) (RecoverAllResult, error)
func (*Engine) RecoverTransfer ¶
func (e *Engine) RecoverTransfer(ctx context.Context, req RecoverTransferRequest) (TransferRecoveryResult, error)
func (*Engine) RemoveRemoteDir ¶
func (e *Engine) RemoveRemoteDir(ctx context.Context, req RemotePathOpRequest) error
func (*Engine) RemoveRemoteFile ¶
func (e *Engine) RemoveRemoteFile(ctx context.Context, req RemotePathOpRequest) error
func (*Engine) RenameRemoteFile ¶
func (e *Engine) RenameRemoteFile(ctx context.Context, req RemoteRenameRequest) error
func (*Engine) ResizePTY ¶
func (e *Engine) ResizePTY(ctx context.Context, handle plan.ManagedHandle[plan.KindPTY], size TerminalSize) error
func (*Engine) ResolvePendingEnrollmentTarget ¶
func (e *Engine) ResolvePendingEnrollmentTarget(ctx context.Context, lease *PendingEnrollmentLease, cliOpts option.OptionLayer, ) (ResolvedTarget, error)
ResolvePendingEnrollmentTarget 基于活跃首连暂存租约的未落盘资产快照编译多跳连接计划(零写盘)。
func (*Engine) ResolveTarget ¶
func (e *Engine) ResolveTarget(ctx context.Context, req ResolveTargetRequest) (ResolvedTarget, error)
ResolveTarget 解析托管节点、AdHoc 或 OpenSSH 虚拟目标,递归展开 ProxyJump 并编译不可变 Merkle 连接计划。
func (*Engine) ResumeTransfer ¶
func (e *Engine) ResumeTransfer(ctx context.Context, req ResumeTransferRequest) (TransferHandleInfo, error)
func (*Engine) RotateSecret ¶
func (e *Engine) RotateSecret(ctx context.Context, req RotateSecretRequest, newSecret *secret.SecretBox, ) (SagaResult, error)
func (*Engine) RotateSecretInteractive ¶
func (e *Engine) RotateSecretInteractive(ctx context.Context, req InteractiveRotateSecretRequest) (SagaResult, error)
func (*Engine) RunMuxProxy ¶
func (e *Engine) RunMuxProxy(ctx context.Context, req MuxControlRequest, stdin io.ReadCloser, stdout io.Writer) error
func (*Engine) RunPlaybook ¶
func (e *Engine) RunPlaybook(ctx context.Context, req PlaybookRequest) (PlaybookRunResult, error)
func (*Engine) RunSSH ¶
func (e *Engine) RunSSH(ctx context.Context, req RunSSHRequest) (execution.ExecutionOutcome, error)
RunSSH 作为统一 SSH 门面入口,依据是否携带命令载荷自动路由至 Exec 或 InteractiveSSH。
func (*Engine) SCPDownload ¶
func (e *Engine) SCPDownload(ctx context.Context, req SCPDownloadRequest) (SCPDownloadResult, error)
func (*Engine) SCPUpload ¶
func (e *Engine) SCPUpload(ctx context.Context, req SCPUploadRequest) (SCPUploadResult, error)
SCPUpload / SCPDownload 执行并行分片与 ScopedRootFS 递归目录 SCP 传输(显式双模态本地 FS 隔离)。
func (*Engine) StartControlMaster ¶
func (e *Engine) StartControlMaster(ctx context.Context, req ControlMasterRequest) (ControlMasterInfo, error)
func (*Engine) StartForward ¶
func (e *Engine) StartForward(ctx context.Context, req StartForwardRequest) (ForwardInfo, error)
StartForward / InspectForward / StopForward / StartControlMaster / InspectControlMaster / TouchControlMaster / StopControlMaster / ProbeMux / ControlMux / RunMuxProxy。
func (*Engine) StartTransfer ¶
func (e *Engine) StartTransfer(ctx context.Context, req StartTransferRequest) (TransferHandleInfo, error)
StartTransfer / WriteTransferChunk / PullTransferChunk / CommitTransfer / AbortTransfer / ResumeTransfer / RecoverTransfer / RecoverAllTransfers / InspectTransfer。
func (*Engine) StatRemoteFile ¶
func (e *Engine) StatRemoteFile(ctx context.Context, req RemoteStatRequest) (RemoteFileStat, error)
func (*Engine) StopControlMaster ¶
func (*Engine) StopForward ¶
func (e *Engine) StopForward(ctx context.Context, handle plan.ManagedHandle[plan.KindTunnel]) error
func (*Engine) StreamLogs ¶
func (e *Engine) StreamLogs(ctx context.Context, req LogStreamRequest) (LogStreamResult, error)
func (*Engine) StreamMetrics ¶
func (e *Engine) StreamMetrics(ctx context.Context, req MetricsStreamRequest) (MetricsStreamResult, error)
StreamMetrics / StreamLogs / ExecuteGUI / OpenGUISession / InspectGUISession / CloseGUISession 暴露可观测性与 GUI 能力。
func (*Engine) SupportedImportFormats ¶
func (*Engine) SystemBus ¶
SystemBus / IsHalted / HaltInfo / IsClosed 提供 Engine 运行态只读查询(未初始化零值严格失败关闭)。
func (*Engine) TouchControlMaster ¶
func (*Engine) UpdateHost ¶
func (e *Engine) UpdateHost(ctx context.Context, req HostMutationRequest) (MutationResult, error)
func (*Engine) UpdateIdentity ¶
func (e *Engine) UpdateIdentity(ctx context.Context, req IdentityMutationRequest) (MutationResult, error)
func (*Engine) UpdateNode ¶
func (e *Engine) UpdateNode(ctx context.Context, req NodeMutationRequest) (MutationResult, error)
func (*Engine) ValidateDAG ¶
func (e *Engine) ValidateDAG(ctx context.Context, req InventoryQueryRequest) (inventory.DAGReport, error)
ValidateDAG / CheckSecretReferences / InventoryDoctor / SupportedImportFormats / PlanImport / ApplyImport 暴露资产诊断、5 位置引用检查与统一导入能力。
func (*Engine) VaultDoctor ¶
func (e *Engine) VaultDoctor(ctx context.Context, req VaultDoctorRequest) (CredentialDoctorRep, error)
func (*Engine) VaultInitFromBytes ¶
func (*Engine) VaultInitInteractive ¶
func (e *Engine) VaultInitInteractive(ctx context.Context, req InteractiveVaultOpRequest) error
func (*Engine) VaultLock ¶
func (e *Engine) VaultLock(ctx context.Context, req VaultOpRequest) error
func (*Engine) VaultStatus ¶
func (e *Engine) VaultStatus(ctx context.Context, req VaultOpRequest) (VaultStatus, error)
VaultStatus / VaultInit* / VaultUnlock* / VaultLock / VaultDoctor / FindSecretReferences / WithSecret / WithPromptedSecret / DeleteSecret / GC / VaultSaga / RotateSecret。 注意:交互式 CLI/TUI 入口应优先使用 *Interactive 与 WithPromptedSecret;*FromBytes 仅限非交互脚本/自动化桥接路径。
func (*Engine) VaultUnlock ¶
func (*Engine) VaultUnlockFromBytes ¶
func (*Engine) VaultUnlockInteractive ¶
func (e *Engine) VaultUnlockInteractive(ctx context.Context, req InteractiveVaultOpRequest) error
func (*Engine) WithPendingEnrollment ¶
func (e *Engine) WithPendingEnrollment(ctx context.Context, req PendingEnrollmentRequest, fn func(ctx context.Context, lease *PendingEnrollmentLease) error) (PendingEnrollmentResult, error)
WithPendingEnrollment 在同步借用闭包内驱动首连「先验证后入库」暂存租约(RFC §3.6.3 #5),退出后自动清理独占暂存凭据。
func (*Engine) WithPromptedSecret ¶
func (e *Engine) WithPromptedSecret(ctx context.Context, prompt SecretPromptRequest, fn func(box *secret.SecretBox) error) error
WithPromptedSecret 经门控鉴权后通过 InteractionPort.PromptSecret 在同步闭包内借出用户输入 *secret.SecretBox。
func (*Engine) WithSecret ¶
func (e *Engine) WithSecret(ctx context.Context, req WithSecretRequest, fn func(box *secret.SecretBox) error) error
WithSecret 经门控鉴权在同步借用闭包内借出 *secret.SecretBox,退出后由 Vault 无条件清零。
func (*Engine) WriteRemoteFile ¶
func (e *Engine) WriteRemoteFile(ctx context.Context, req RemoteFileWriteRequest) (WriteFileResult, error)
func (*Engine) WriteTransferChunk ¶
func (e *Engine) WriteTransferChunk(ctx context.Context, req WriteTransferChunkRequest) (WriteTransferChunkRes, error)
type EnrollEncryptedPrivateKeyRequest ¶
type EnrollEncryptedPrivateKeyRequest = ucinv.EnrollEncryptedPrivateKeyRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type EnrollEncryptedPrivateKeyResult ¶
type EnrollEncryptedPrivateKeyResult = ucinv.EnrollEncryptedPrivateKeyResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ExecRequest ¶
type ExecRequest struct {
Target ResolvedTarget
TargetSpec, Command, Term string
CLIOptions option.OptionLayer
ExplicitOrigin algebraic.Option[option.OriginKind]
ExplicitAuth inventory.AuthMethod
CommandPlan algebraic.Option[execution.CommandPlan]
CommandArgs []string
CommandTimeout algebraic.Option[algebraic.Duration]
Stdin io.Reader
Stdout, Stderr io.Writer
RequestTTY RequestTTYMode
Risk algebraic.Option[security.RiskLevel]
Approval algebraic.Option[ApprovalSubmission]
OperationStream *events.OperationStream
}
ResolveTargetRequest / ExecRequest / InteractiveSSHRequest / RunSSHRequest 描述 SSH 目标解析、命令执行与交互会话公开请求。 Target 与 TargetSpec 须二选一;ExecRequest 的 CommandPlan / Command / CommandArgs 须三选一互斥;RunSSHRequest 与 ExecRequest 同构零拷贝。
type FindSecretReferencesRequest ¶
type FindSecretReferencesRequest = uccred.FindReferencesRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ForwardDirection ¶
type ForwardDirection = ports.ForwardDirection
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseForwardDirection ¶
func ParseForwardDirection(s string) (ForwardDirection, error)
type ForwardEndpointKind ¶
type ForwardEndpointKind = ports.ForwardEndpointKind
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseForwardEndpointKind ¶
func ParseForwardEndpointKind(s string) (ForwardEndpointKind, error)
type ForwardInfo ¶
type ForwardInfo = ucsess.ForwardInfo
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ForwardSpec ¶
type ForwardSpec = ports.ForwardSpec
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func NewForwardSpec ¶
func NewForwardSpec(d ForwardDirection, b, t string) (ForwardSpec, error)
func NewForwardTUNSpec ¶
func NewForwardTUNSpec(tun TUNSpec) (ForwardSpec, error)
func NewTypedForwardSpec ¶
func NewTypedForwardSpec(d ForwardDirection, bk ForwardEndpointKind, b string, tk ForwardEndpointKind, t string) (ForwardSpec, error)
type ForwardStatus ¶
type ForwardStatus = ucsess.ForwardStatus
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GCUnreferencedRequest ¶
type GCUnreferencedRequest = uccred.GCUnreferencedRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GCUnreferencedResult ¶
type GCUnreferencedResult = uccred.GCUnreferencedResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GUIActionKind ¶
type GUIActionKind = ucobs.GUIActionKind
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseGUIActionKind ¶
func ParseGUIActionKind(s string) (GUIActionKind, error)
type GUIActionSpec ¶
type GUIActionSpec = ucobs.GUIActionSpec
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GUIArtifactDest ¶
type GUIArtifactDest = ucobs.GUIArtifactDest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GUIExecRequest ¶
type GUIExecRequest struct {
RemoteCall
Profile algebraic.Option[execution.LaunchProfile]
Spec GUIActionSpec
Artifact algebraic.Option[GUIArtifactDest]
Timeout algebraic.Option[algebraic.Duration]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type GUIExecResult ¶
type GUIExecResult = ucobs.GUIExecResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GUISessionInfo ¶
type GUISessionInfo = ucobs.GUISessionInfo
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GUISessionKind ¶
type GUISessionKind = ucobs.GUISessionKind
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseGUISessionKind ¶
func ParseGUISessionKind(s string) (GUISessionKind, error)
type GUISessionSpec ¶
type GUISessionSpec = ucobs.GUISessionSpec
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GUISessionStatus ¶
type GUISessionStatus = ucobs.GUISessionStatus
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GraphMutator ¶
type GraphMutator = uccred.GraphMutator
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type GuardrailConfig ¶
type GuardrailConfig struct {
ApprovalThreshold security.RiskLevel // 必填:全局基础审批风险阈值(如 RiskModerate)
NoElicitFallback NoElicitFallback // 不可交互审批回退策略(零值为 Deny)
NodeOverrides algebraic.Option[security.NodeOverrides] // 可选:节点通配符覆写格
ProtectedRules []pathalg.ProtectedRule // 可选:已编译受保护路径规则
ProtectedPatterns []string // 可选:原始受保护路径模式串
ProtectedPathRisk algebraic.Option[security.RiskLevel] // 可选:命中受保护路径最低风险(默认 RiskDangerous)
ApprovalTTL algebraic.Option[algebraic.Duration] // 可选:审批信封有效期(默认 5m)
MaxPendingChallenges, MaxReplayHistory int // 可选:挂起审批挑战与防重放容量
}
GuardrailConfig 描述 Engine 内部能力门控(gate.GuardrailPolicy)的公开构造规格; 所有时长字段统一使用 algebraic.Duration,零值默认触发失败关闭校验。
func DefaultGuardrailConfig ¶
func DefaultGuardrailConfig() GuardrailConfig
DefaultGuardrailConfig 返回遵循 RFC §4.2 的推荐默认护栏配置。
type HaltInfo ¶
type HaltInfo struct {
// contains filtered or unexported fields
}
HaltInfo 描述 Engine 底层安全门控首次进入不可逆 Halted 熔断态时的只读诊断快照(ADR-008);零值恒无效并失败关闭。
func (HaltInfo) OperationID ¶
func (h HaltInfo) OperationID() algebraic.Option[security.OperationID]
type HandleStatus ¶
type HandleStatus = pool.HandleStatus
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type HostMetricsFrame ¶
type HostMetricsFrame = ucobs.HostMetricsFrame
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type HostMutationRequest ¶
type HostMutationRequest = ucinv.HostMutationRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type IdentityMutationRequest ¶
type IdentityMutationRequest = ucinv.IdentityMutationRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ImportPreview ¶
type ImportPreview = ucinv.ImportPreview
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ImportRequest ¶
type ImportRequest struct {
CallOptions
Format, SourceName, ScopeSummary string
Reader io.Reader
Bundle algebraic.Option[inventory.ImportBundle]
ExpectedRevision algebraic.Option[Revision]
DryRun bool
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type ImportResult ¶
type ImportResult = ucinv.ImportResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type InspectTransferRequest ¶
type InspectTransferRequest struct {
RemoteCall
TransferID security.OperationID
Handle algebraic.Option[plan.ManagedHandle[plan.KindTransfer]]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type InteractiveRotateSecretRequest ¶
type InteractiveRotateSecretRequest = uccred.InteractiveRotateSecretRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type InteractiveSSHRequest ¶
type InteractiveSSHRequest struct {
Target ResolvedTarget
TargetSpec, Term string
CLIOptions option.OptionLayer
ExplicitOrigin algebraic.Option[option.OriginKind]
ExplicitAuth inventory.AuthMethod
Stdin io.Reader
Stdout, Stderr io.Writer
RequestTTY RequestTTYMode
Risk algebraic.Option[security.RiskLevel]
Approval algebraic.Option[ApprovalSubmission]
OperationStream *events.OperationStream
}
ResolveTargetRequest / ExecRequest / InteractiveSSHRequest / RunSSHRequest 描述 SSH 目标解析、命令执行与交互会话公开请求。 Target 与 TargetSpec 须二选一;ExecRequest 的 CommandPlan / Command / CommandArgs 须三选一互斥;RunSSHRequest 与 ExecRequest 同构零拷贝。
type InteractiveVaultOpRequest ¶
type InteractiveVaultOpRequest = uccred.InteractiveVaultControlRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type InteractiveVaultSagaRequest ¶
type InteractiveVaultSagaRequest = uccred.InteractiveVaultSagaRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type InventoryDoctorRep ¶
type InventoryDoctorRep = ucinv.DoctorReport
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type InventoryDoctorRequest ¶
type InventoryDoctorRequest = ucinv.DoctorRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type InventoryQueryRequest ¶
type InventoryQueryRequest = ucinv.QueryRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type InventorySnapshot ¶
type InventorySnapshot = ports.InventorySnapshot
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ListDirResult ¶
type ListDirResult = uctrans.ListDirResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type LocalUploadSource ¶
type LocalUploadSource = uctrans.LocalUploadSource
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func NewOperatorUploadSource ¶
func NewOperatorUploadSource(s pathalg.LocalSourcePath, p pathalg.SymlinkPolicy) (LocalUploadSource, error)
func NewScopedUploadSource ¶
func NewScopedUploadSource(r pathalg.LocalDir, d pathalg.LocalRootedDest) (LocalUploadSource, error)
type LocalUploadSourceKind ¶
type LocalUploadSourceKind = uctrans.LocalUploadSourceKind
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type LogEntry ¶
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type LogStreamRequest ¶
type LogStreamRequest struct {
RemoteCall
Profile algebraic.Option[execution.LaunchProfile]
Target LogTarget
TailLines int
Follow bool
MaxBytes uint64
Timeout algebraic.Option[algebraic.Duration]
Output io.Writer
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type LogStreamResult ¶
type LogStreamResult = ucobs.LogStreamResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type LogTarget ¶
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func NewDockerLogTarget ¶
func NewFileLogTarget ¶
func NewFileLogTarget(p pathalg.RemotePath) (LogTarget, error)
type LogTargetKind ¶
type LogTargetKind = ucobs.LogTargetKind
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseLogTargetKind ¶
func ParseLogTargetKind(s string) (LogTargetKind, error)
type MCPConfig ¶
type MCPConfig struct {
ServerName, ServerVersion, Instructions string
TransferRoot, ArtifactRoot algebraic.Option[pathalg.LocalDir]
MaxMessageBytes, HTTPChunkSize int64
MaxTrackedHandles, MaxHTTPSessions int
AllowNonLoopbackHTTP, PruneSupersededJournals, FailOnCorruptJournal, AllowOptionalReconciler bool
HTTPAllowedOrigins, HTTPAllowedHosts []string
HTTPReadHeaderTimeout, HTTPShutdownTimeout algebraic.Option[algebraic.Duration]
}
MCPConfig 定义从 Engine 派生 MCPServer 时的安全传输与沙箱参数(物理零 OperatorReadFS)。
type MCPServer ¶
type MCPServer struct {
// contains filtered or unexported fields
}
MCPServer 是由 Engine 派生的公开 MCP 运行时门面(供 entry/mcpcmd 与外部 xops-mcp 消费); 物理仅接收沙箱隔离的 ScopedRootFS 与 0 OperatorReadFS 服务,且自动纳入 Engine.Close 逆序停机管理。
func (*MCPServer) HandleMessage ¶
func (*MCPServer) ListenAndServeHTTP ¶
func (*MCPServer) Prepare ¶
func (s *MCPServer) Prepare(ctx context.Context) (MCPStartupReport, error)
Prepare / ServeStdio / ServeHTTPListener / ListenAndServeHTTP / Handler / HandleMessage / StartupReport / IsClosed / Close。
func (*MCPServer) ServeHTTPListener ¶
func (*MCPServer) ServeStdio ¶
func (*MCPServer) StartupReport ¶
func (s *MCPServer) StartupReport() MCPStartupReport
type MCPStartupReport ¶
type MCPStartupReport = mcpruntime.StartupReport
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type MetricPoint ¶
type MetricPoint = ucobs.MetricPoint
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type MetricsStreamRequest ¶
type MetricsStreamRequest struct {
RemoteCall
Profile algebraic.Option[execution.LaunchProfile]
Interval, Timeout algebraic.Option[algebraic.Duration]
MaxSamples, TopProcesses int
SortBy algebraic.Option[ProcessSortBy]
OnFrame func(HostMetricsFrame)
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type MetricsStreamResult ¶
type MetricsStreamResult = ucobs.MetricsStreamResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type MutationResult ¶
type MutationResult = ucinv.MutationResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type MuxControlAction ¶
type MuxControlAction = ports.MuxControlAction
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseMuxControlAction ¶
func ParseMuxControlAction(s string) (MuxControlAction, error)
type MuxControlRequest ¶
type MuxControlRequest struct {
RemoteCall
SocketPath algebraic.Option[pathalg.LocalSourcePath]
Action MuxControlAction
Forward algebraic.Option[ForwardSpec]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type MuxControlResponse ¶
type MuxControlResponse = ports.MuxControlResponse
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type NewSecretVerifier ¶
type NewSecretVerifier = uccred.NewSecretVerifier
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type NoElicitFallback ¶
type NoElicitFallback uint8
NoElicitFallback 定义护栏要求人工审批但运行环境不可交互时的回退行为;零值恒为 Deny(失败关闭)。
const ( NoElicitFallbackDeny NoElicitFallback = iota // 零值失败关闭:不可交互时直接拒绝并写入审计 NoElicitFallbackChallenge // 两步挑战模式:签发绑定审批信封供调用方二次提交核验 )
func ParseNoElicitFallback ¶
func ParseNoElicitFallback(raw string) (NoElicitFallback, error)
func (NoElicitFallback) AppendText ¶
func (f NoElicitFallback) AppendText(b []byte) ([]byte, error)
func (NoElicitFallback) IsValid ¶
func (f NoElicitFallback) IsValid() bool
func (NoElicitFallback) IsZero ¶
func (f NoElicitFallback) IsZero() bool
func (NoElicitFallback) MarshalText ¶
func (f NoElicitFallback) MarshalText() ([]byte, error)
func (NoElicitFallback) String ¶
func (f NoElicitFallback) String() string
func (*NoElicitFallback) UnmarshalText ¶
func (f *NoElicitFallback) UnmarshalText(t []byte) error
type NodeMutationRequest ¶
type NodeMutationRequest = ucinv.NodeMutationRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type NodeStreamFactory ¶
type NodeStreamFactory = ucauto.NodeStreamFactory
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type OldSecretRefsResolver ¶
type OldSecretRefsResolver = uccred.OldSecretRefsResolver
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type OnHaltFunc ¶
type OnHaltFunc func(info HaltInfo)
OnHaltFunc 是 Engine 进入不可逆 Halted 熔断态且已通知连接池吊销全部句柄后触发至多一次的可选外部回调。
type OpenGUISessionRequest ¶
type OpenGUISessionRequest struct {
RemoteCall
Spec GUISessionSpec
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type OpenPTYRequest ¶
type OpenPTYRequest struct {
RemoteCall
Term string
Size algebraic.Option[TerminalSize]
MaxBufferBytes int
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type OperationView ¶
type OperationView = ucobs.OperationView
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PTYReadRequest ¶
type PTYReadRequest = ucsess.PTYReadRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PTYReadResult ¶
type PTYReadResult = ucsess.PTYReadResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PTYStatus ¶
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PatchFileResult ¶
type PatchFileResult = uctrans.PatchFileResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PendingEnrollmentLease ¶
type PendingEnrollmentLease = ucinv.PendingEnrollmentLease
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PendingEnrollmentRequest ¶
type PendingEnrollmentRequest = ucinv.PendingEnrollmentRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PendingEnrollmentResult ¶
type PendingEnrollmentResult = ucinv.PendingEnrollmentResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PendingProbeFunc ¶
type PendingProbeFunc = ucinv.PendingProbeFunc
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PlaybookRequest ¶
type PlaybookRequest struct {
CallOptions
Playbook playbook.Playbook
Targets []ResolvedTarget
CLIOptions option.OptionLayer
DefaultProfile algebraic.Option[execution.LaunchProfile]
ScopedSourceRoot algebraic.Option[pathalg.LocalDir]
Concurrency int
Timeout algebraic.Option[algebraic.Duration]
ExtraVars map[string]string
NodeStreams map[inventory.NodeID]*events.OperationStream
NodeStreamFactory NodeStreamFactory
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type PlaybookRunResult ¶
type PlaybookRunResult = ucauto.PlaybookRunResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PolicyProfile ¶
type PolicyProfile uint8
PolicyProfile 标识 Engine 能力门控的安全策略配置档(RFC §3.1 / §4.2 / ADR-008);零值恒失败关闭。
const ( PolicyProfileInvalid PolicyProfile = iota // 零值无效配置档(失败关闭默认态) PolicyProfileDirectOperator // CLI 直接人工操作员模式(保留审计闭环与显式 Deny 拦截) PolicyProfileStrictOperator // CLI 严格护栏模式(--policy=strict) PolicyProfileStrictAgent // MCP / AI Agent 严格熔断模式(终态审计失败立即 Halted) )
func ParsePolicyProfile ¶
func ParsePolicyProfile(raw string) (PolicyProfile, error)
ParsePolicyProfile / ParseNoElicitFallback / ParseRequestTTYMode 严格解析公开枚举文本(零堆分配)。
func (PolicyProfile) AppendText ¶
func (p PolicyProfile) AppendText(b []byte) ([]byte, error)
func (PolicyProfile) IsValid ¶
func (p PolicyProfile) IsValid() bool
PolicyProfile / NoElicitFallback / RequestTTYMode 只读校验、文本序列化与内部映射方法。
func (PolicyProfile) IsZero ¶
func (p PolicyProfile) IsZero() bool
func (PolicyProfile) MarshalText ¶
func (p PolicyProfile) MarshalText() ([]byte, error)
func (PolicyProfile) String ¶
func (p PolicyProfile) String() string
func (*PolicyProfile) UnmarshalText ¶
func (p *PolicyProfile) UnmarshalText(t []byte) error
type PoolRecord ¶
type PoolRecord = ucobs.PoolRecord
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PrivilegeExecRequest ¶
type PrivilegeExecRequest struct {
RemoteCall
Privilege PrivilegeRequest
PasswordRef algebraic.Option[secret.Ref]
PromptPassword bool
Paths, RecursivePaths []string
Stdin io.Reader
Stdout, Stderr io.Writer
RequestTTY RequestTTYMode
Term string
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type PrivilegeMethod ¶
type PrivilegeMethod = ports.PrivilegeMethod
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParsePrivilegeMethod ¶
func ParsePrivilegeMethod(s string) (PrivilegeMethod, error)
type PrivilegeRequest ¶
type PrivilegeRequest = ports.PrivilegeRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func NewPrivilegeRequest ¶
func NewPrivilegeRequest(s PrivilegeRequestSpec) (PrivilegeRequest, error)
type PrivilegeRequestSpec ¶
type PrivilegeRequestSpec = ports.PrivilegeRequestSpec
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ProbePendingEnrollmentRequest ¶
type ProbePendingEnrollmentRequest struct {
CallOptions
CLIOptions option.OptionLayer
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type ProbeShellRequest ¶
type ProbeShellRequest struct {
RemoteCall
Timeout algebraic.Option[algebraic.Duration]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type ProcessMetric ¶
type ProcessMetric = ucobs.ProcessMetric
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ProcessSortBy ¶
type ProcessSortBy = ucobs.ProcessSortBy
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseProcessSortBy ¶
func ParseProcessSortBy(s string) (ProcessSortBy, error)
type ProcessedScreenshot ¶
type ProcessedScreenshot = ucobs.ProcessedScreenshot
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type Projection ¶
type Projection struct {
// contains filtered or unexported fields
}
Projection 封装面向 Phase 5 entry/tui 的实时事件投影聚合器,自动纳入 Engine.Close 逆序关闭管理;零值恒失败关闭。
func (*Projection) AttachOperationStream ¶
func (p *Projection) AttachOperationStream(s *events.OperationStream) error
AttachOperationStream / Snapshot / WaitUpdate / Close 提供事件投影只读快照、阻塞等待与幂等关闭。
func (*Projection) Close ¶
func (p *Projection) Close() error
func (*Projection) Snapshot ¶
func (p *Projection) Snapshot() ProjectionSnapshot
func (*Projection) WaitUpdate ¶
func (p *Projection) WaitUpdate(ctx context.Context, sinceVersion uint64) (ProjectionSnapshot, error)
type ProjectionConfig ¶
type ProjectionConfig = ucobs.ProjectionConfig
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ProjectionSnapshot ¶
type ProjectionSnapshot = ucobs.ProjectionSnapshot
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type PullTransferChunkRequest ¶
type PullTransferChunkRequest struct {
RemoteCall
Handle plan.ManagedHandle[plan.KindTransfer]
MaxChunkBytes uint64
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type PullTransferChunkResult ¶
type PullTransferChunkResult = uctrans.PullTransferChunkResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ReadFileResult ¶
type ReadFileResult = uctrans.ReadFileResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ReconcileReport ¶
type ReconcileReport = ports.CrashReconcileReport
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type RecoverAllResult ¶
type RecoverAllResult = uctrans.RecoverAllResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type RecoverAllTransfersRequest ¶
type RecoverAllTransfersRequest = uctrans.RecoverAllAuthorizedRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type RecoverTransferRequest ¶
type RecoverTransferRequest struct {
RemoteCall
TransferID security.OperationID
PruneSuperseded bool
LocalRootForClean algebraic.Option[pathalg.LocalDir]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type ReferenceConflict ¶
type ReferenceConflict struct {
// contains filtered or unexported fields
}
ReferenceConflict 封装因仍被其他资产反向引用或 5 位置/Pending 凭据占用而拒绝删除的只读结构化冲突详情(零明文);零值恒无效。
func ExtractReferenceConflict ¶
func ExtractReferenceConflict(err error) (ReferenceConflict, bool)
ExtractReferenceConflict 从任意 Engine 返回的 error 链中提取资产反向引用或 5 位置/Pending 凭据引用冲突详情。
func (ReferenceConflict) AssetKind ¶
func (c ReferenceConflict) AssetKind() string
func (ReferenceConflict) AssetReferences ¶
func (c ReferenceConflict) AssetReferences() []inventory.AssetReference
func (ReferenceConflict) IsValid ¶
func (c ReferenceConflict) IsValid() bool
IsValid / IsZero / AssetKind / Subject / AssetReferences / SecretReferences 提供结构化引用冲突只读访问器。
func (ReferenceConflict) IsZero ¶
func (c ReferenceConflict) IsZero() bool
func (ReferenceConflict) SecretReferences ¶
func (c ReferenceConflict) SecretReferences() []inventory.SecretReference
func (ReferenceConflict) Subject ¶
func (c ReferenceConflict) Subject() string
type RemoteCall ¶
type RemoteCall struct {
TargetInput
CallOptions
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type RemoteDirEntry ¶
type RemoteDirEntry = ports.RemoteDirEntry
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type RemoteFSFunc ¶
type RemoteFSFunc func(ctx context.Context, conn ports.TransportConn) (ports.RemoteFSPort, error)
DialContextFunc 与 RemoteFSFunc 定义底层网络拨号与外置自定义/仿真传输的远端文件系统工厂签名。 注意:RemoteFSFunc 仅接收协议无关的 ports.TransportConn(不可访问未导出 *ssh.Client),专用于自定义或仿真 Dialer 覆写; 真实 sshnet/sftp 已在 buildRealDialer 中直接经 dial.Config.OpenRemoteFS 注入 sftp.Open。
type RemoteFileAnchor ¶
type RemoteFileAnchor = ports.RemoteFileAnchor
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func NewRemoteFileAnchor ¶
func NewRemoteFileAnchor(t RemoteFileType, h bool, d, i uint64) (RemoteFileAnchor, error)
type RemoteFilePatchRequest ¶
type RemoteFilePatchRequest struct {
RemoteCall
Path pathalg.RemotePath
Edits []TextEdit
ExpectedAnchor algebraic.Option[RemoteFileAnchor]
ExpectedDigest algebraic.Option[security.Digest]
MaxBytes int64
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type RemoteFileReadRequest ¶
type RemoteFileReadRequest struct {
RemoteCall
Path pathalg.RemotePath
MaxBytes int64
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type RemoteFileStat ¶
type RemoteFileStat = ports.RemoteFileStat
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type RemoteFileType ¶
type RemoteFileType = ports.RemoteFileType
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseRemoteFileType ¶
func ParseRemoteFileType(s string) (RemoteFileType, error)
type RemoteFileWriteRequest ¶
type RemoteFileWriteRequest struct {
RemoteCall
Path pathalg.RemotePath
Content []byte
Perm algebraic.Option[fs.FileMode]
NoClobber, CreateParents bool
ExpectedAnchor algebraic.Option[RemoteFileAnchor]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type RemotePathOpRequest ¶
type RemotePathOpRequest struct {
RemoteCall
Path pathalg.RemotePath
Perm algebraic.Option[fs.FileMode]
Atime, Mtime time.Time
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type RemoteRenameRequest ¶
type RemoteRenameRequest struct {
RemoteCall
OldPath, NewPath pathalg.RemotePath
NoClobber bool
ExpectedAnchor algebraic.Option[RemoteFileAnchor]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type RemoteStatRequest ¶
type RemoteStatRequest struct {
RemoteCall
Path pathalg.RemotePath
FollowSymlinks bool
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type RequestTTYMode ¶
type RequestTTYMode uint8
RequestTTYMode 标识 SSH 会话的伪终端分配策略(auto/yes/no/force,对应 -t/-tt/-T);零值按操作类型取确定性默认。
const ( RequestTTYUnset RequestTTYMode = iota // 未显式设置(零值) RequestTTYAuto // 自动模式:仅交互 Shell 且本机为交互终端时分配 PTY RequestTTYYes // 本机为交互终端时分配 PTY(-t) RequestTTYNo // 禁止分配 PTY(-T) RequestTTYForce // 强制分配远端 PTY(-tt) )
func ParseRequestTTYMode ¶
func ParseRequestTTYMode(raw string) (RequestTTYMode, error)
func (RequestTTYMode) AppendText ¶
func (m RequestTTYMode) AppendText(b []byte) ([]byte, error)
func (RequestTTYMode) IsValid ¶
func (m RequestTTYMode) IsValid() bool
func (RequestTTYMode) IsZero ¶
func (m RequestTTYMode) IsZero() bool
func (RequestTTYMode) MarshalText ¶
func (m RequestTTYMode) MarshalText() ([]byte, error)
func (RequestTTYMode) String ¶
func (m RequestTTYMode) String() string
func (*RequestTTYMode) UnmarshalText ¶
func (m *RequestTTYMode) UnmarshalText(t []byte) error
type ResolveTargetRequest ¶
type ResolveTargetRequest = ucinv.ResolveTargetRequest
ResolveTargetRequest / ExecRequest / InteractiveSSHRequest / RunSSHRequest 描述 SSH 目标解析、命令执行与交互会话公开请求。 Target 与 TargetSpec 须二选一;ExecRequest 的 CommandPlan / Command / CommandArgs 须三选一互斥;RunSSHRequest 与 ExecRequest 同构零拷贝。
type ResolvedTarget ¶
type ResolvedTarget = ucinv.ResolvedTarget
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ResumeTransferRequest ¶
type ResumeTransferRequest struct {
RemoteCall
TransferSessionOptions
TransferID security.OperationID
StartNextGen bool
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type RetainedSecret ¶
type RetainedSecret = uccred.RetainedSecret
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type Revision ¶
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseRevision ¶
type RotateSecretRequest ¶
type RotateSecretRequest = uccred.RotateSecretRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type RunSSHRequest ¶
type RunSSHRequest = ExecRequest
ResolveTargetRequest / ExecRequest / InteractiveSSHRequest / RunSSHRequest 描述 SSH 目标解析、命令执行与交互会话公开请求。 Target 与 TargetSpec 须二选一;ExecRequest 的 CommandPlan / Command / CommandArgs 须三选一互斥;RunSSHRequest 与 ExecRequest 同构零拷贝。
type SCPDownloadRequest ¶
type SCPDownloadRequest struct {
RemoteCall
RemoteSource pathalg.RemotePath
LocalRoot pathalg.LocalDir
LocalDest pathalg.LocalRootedDest
Recursive, NoClobber, Resume, PreserveTimes bool
SymlinkPolicy pathalg.SymlinkPolicy
ChunkSize int64
Concurrency, MaxFiles int
MaxTotalBytes uint64
ExpectedDigest algebraic.Option[security.Digest]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type SCPDownloadResult ¶
type SCPDownloadResult = uctrans.SCPDownloadResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type SCPUploadRequest ¶
type SCPUploadRequest struct {
RemoteCall
Source LocalUploadSource
RemoteDest pathalg.RemotePath
Recursive, ExpandIntoDir, NoClobber, Resume, PreserveMode, PreserveTimes bool
SymlinkPolicy pathalg.SymlinkPolicy
Perm algebraic.Option[fs.FileMode]
ModTime algebraic.Option[time.Time]
ChunkSize int64
Concurrency, MaxFiles int
MaxTotalBytes uint64
ExpectedDigest algebraic.Option[security.Digest]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type SCPUploadResult ¶
type SCPUploadResult = uctrans.SCPUploadResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type SagaResult ¶
type SagaResult = uccred.SagaResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ScrollDirection ¶
type ScrollDirection = ucobs.ScrollDirection
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseScrollDirection ¶
func ParseScrollDirection(s string) (ScrollDirection, error)
type SecretPromptRequest ¶
type SecretPromptRequest = ports.SecretPromptRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func NewSecretPromptRequest ¶
func NewSecretPromptRequest(s SecretPromptRequestSpec) (SecretPromptRequest, error)
不透明值类型公开构造器与解析器薄转发函数(严禁 var NewX = ... 以满足 xopsvet/noimplicit)。
type SecretPromptRequestSpec ¶
type SecretPromptRequestSpec = ports.SecretPromptRequestSpec
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type SecretRefCheckRequest ¶
type SecretRefCheckRequest = ucinv.SecretRefCheckRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type ShellProbeResult ¶
type ShellProbeResult = ports.ShellProbeResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type StartForwardRequest ¶
type StartForwardRequest struct {
RemoteCall
Spec ForwardSpec
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type StartTransferRequest ¶
type StartTransferRequest struct {
RemoteCall
TransferSessionOptions
TransferID algebraic.Option[security.OperationID]
Dest fsm.TransferDest
TotalBytes uint64
ExpectedDigest algebraic.Option[security.Digest]
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type TUNMode ¶
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseTUNMode ¶
type TUNSpec ¶
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type TargetInput ¶
type TargetInput struct {
Target ResolvedTarget
TargetSpec string
CLIOptions option.OptionLayer
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type TerminalSize ¶
type TerminalSize = ports.TerminalSize
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func NewTerminalSize ¶
func NewTerminalSize(c, r uint16) (TerminalSize, error)
type TextEdit ¶
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type TransferHandleInfo ¶
type TransferHandleInfo = uctrans.TransferHandleInfo
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type TransferHandleOpRequest ¶
type TransferHandleOpRequest struct {
RemoteCall
Handle plan.ManagedHandle[plan.KindTransfer]
Reason string
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type TransferRecSummary ¶
type TransferRecSummary = mcpruntime.TransferRecoverySummary
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type TransferRecoveryEntry ¶
type TransferRecoveryEntry = uctrans.TransferRecoveryEntry
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type TransferRecoveryResult ¶
type TransferRecoveryResult = uctrans.TransferRecoveryResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type TransferSessionOptions ¶
type TransferSessionOptions = uctrans.TransferSessionOptions
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type TransferStatusSnapshot ¶
type TransferStatusSnapshot = uctrans.TransferStatusSnapshot
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type VaultDoctorRequest ¶
type VaultDoctorRequest = uccred.DoctorRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type VaultOpRequest ¶
type VaultOpRequest = uccred.VaultControlRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type VaultSagaRequest ¶
type VaultSagaRequest = uccred.VaultSagaRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type VaultState ¶
type VaultState = ports.VaultState
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
func ParseVaultState ¶
func ParseVaultState(raw string) (VaultState, error)
type VaultStatus ¶
type VaultStatus = ports.VaultStatus
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type WithSecretRequest ¶
type WithSecretRequest = uccred.WithSecretRequest
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type WriteFileResult ¶
type WriteFileResult = uctrans.WriteFileResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。
type WriteTransferChunkRequest ¶
type WriteTransferChunkRequest struct {
RemoteCall
Handle plan.ManagedHandle[plan.KindTransfer]
Offset uint64
Data []byte
}
公共入参复用结构体及面向目标解析/跨用例门面扩展的公开请求 DTO(零明文、零裸 time.Duration)。
type WriteTransferChunkRes ¶
type WriteTransferChunkRes = uctrans.WriteTransferChunkResult
公开核心值类型、规格、枚举、嵌套返回子类型及零拷贝请求别名: 使受 archbound 约束的 internal/entry/** 与外部宿主仅导入 core/{domain,events,conc,engine} 即可零阻塞消费全量强类型契约。