app

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 100 Imported by: 0

Documentation

Overview

Package app owns Pinax application-service orchestration.

Package app — this file is the sync-run boundary that unlocks a repository-encrypted S3/COS credential bundle and constructs an immutable AWS SDK credentials provider for one sync run. Plaintext credentials live only inside the short-lived projectsecrets.Snapshot and the SDK provider; nothing is written to global env, ~/.aws, runtime YAML, receipts or logs.

Index

Constants

View Source
const (
	ExploreMaxNodes   = 5000
	ExploreMaxEdges   = 20000
	ExploreMaxTitle   = 160
	ExploreMaxSummary = 240
	ExploreMaxTags    = 8
)

ExploreBundle 容量上限(fail-safe 截断并置 truncated=true)。

View Source
const (
	PaneEventSchema    = "pane.event.v1alpha1"
	PaneArtifactSchema = "pane.artifact.v1alpha1"
)
View Source
const (
	AgentGroundingGrounded            AgentGroundingState = "grounded"
	AgentGroundingPartiallyGrounded   AgentGroundingState = "partially_grounded"
	AgentGroundingUngrounded          AgentGroundingState = "ungrounded"
	AgentGroundingUnavailable         AgentGroundingState = "grounding_unavailable"
	AgentGroundingFresh               string              = "fresh"
	AgentGroundingStale               string              = "stale"
	AgentGroundingFreshnessUnmeasured string              = "not_measured"
)
View Source
const (
	ReaderScopeMetadata  = catalogschema.ReaderScopeMetadata
	ReaderScopeBody      = catalogschema.ReaderScopeBody
	ReaderScopeRelations = catalogschema.ReaderScopeRelations
	ReaderScopeAssets    = catalogschema.ReaderScopeAssets
)

ReaderScope values mirror the frozen schema vocabulary. They are granted only by the owner; an Agent token never upgrades into them.

View Source
const (
	ConnectionReadinessSchemaV1 = "pinax.connection_readiness.v1"

	ReadinessLayerContract         = "contract"
	ReadinessLayerTransport        = "transport"
	ReadinessLayerAuth             = "auth"
	ReadinessLayerOwner            = "owner"
	ReadinessLayerMutationRecovery = "mutation_recovery"
	ReadinessLayerProduction       = "production"
)
View Source
const (
	SyncJobPhaseAccepted = "accepted"
	SyncJobPhaseProgress = "progress"
	SyncJobPhaseTerminal = "terminal"
)
View Source
const (
	WriterScopeCapture   = catalogschema.WriterScopeCapture
	WriterScopeEditor    = catalogschema.WriterScopeEditor
	WriterScopeOrganizer = catalogschema.WriterScopeOrganizer
)

Writer scope vocabulary mirrors the frozen catalog constants.

View Source
const AgentGroundingEvidenceSchemaVersion = "pinax.agent_grounding_evidence.v0.1"
View Source
const CollaborationMaxBodyBytes = 64 << 10
View Source
const ExploreBundleSchemaVersion = "pinax.explore_bundle.v1"

ExploreBundleSchemaVersion 是 vault explore 数据投影的冻结 schema。

View Source
const (

	// SyncCancelledErrorCode 是执行器在项边界发现 cancel 标记后返回的稳定
	// 错误码;receipt/projection/事件流用它区分用户取消与执行失败。
	SyncCancelledErrorCode = "sync_cancelled"
)

sync/delivery 长任务的本地执行控制(pinax-local-async-substrate-v1 §2.2/§2.3): cancel 标记与同作用域单执行器 claim 都是 CLI-authored 结构化资产,落在 `.pinax/sync-jobs/` 下。本地优先:不引入 daemon、租约心跳或分布式锁。

View Source
const SyncEnvSchemaFact = pinaxremote.EnvAssetSchemaVersion

SyncEnvSchemaFact is the stable schema version fact surfaced in env projections.

Variables

View Source
var (
	WorkbenchProjectionActions = []string{
		"resume_card.read",
		"binding.status.read",
		"checkpoint.propose",
	}
	WorkbenchProjectionErrors = []string{
		"binding_not_found",
		"binding_disabled",
		"binding_invalid",
		"validation_failed",
	}
)

WorkbenchProjectionActions / WorkbenchProjectionErrors 是 packet 与 envelope digest 的固定合同域(canonical、无时间戳)。

View Source
var SupportedSyncCapabilities = map[string]bool{
	"repository-encrypted-s3-v1": true,
	"capsa-remote-commit-v1":     true,
	"pull-only-bootstrap-v1":     true,
}

SupportedSyncCapabilities is the closed set of repository sync capabilities this binary understands (pinax-passphrase-s3-bootstrap task 6.8). A declaration that requires a capability outside this set fails closed so a partial/old binary cannot silently produce an incomplete backup.

View Source
var WriterOrganizePersistTerminal = saveOrganizePlan

WriterOrganizePersistTerminal persists the terminal consumption state. It is a var so fault-injection tests can make exactly the terminal save fail (after the writes landed); production always uses saveOrganizePlan.

Functions

func BuildAgentBrainContextBundle added in v0.1.3

func BuildAgentBrainContextBundle(req AgentBrainContextBundleRequest) domain.AgentBrainContextBundle

func BuildEnhancedLinkGraph

func BuildEnhancedLinkGraph(notes []domain.Note) (
	enhancedLinks map[string][]domain.NoteLink,
	incoming map[string][]domain.NoteLink,
)

BuildEnhancedLinkGraph 构建增强的双联关系图。 返回所有出链、入链索引和增强的 NoteLink 列表。

func BuildOpenAPI added in v0.3.0

func BuildOpenAPI() (map[string]any, error)

func CollaborationErrorCode added in v0.3.0

func CollaborationErrorCode(err error) string

func CollaborationSafeError added in v0.3.0

func CollaborationSafeError(err error) string

func ConnectionReadinessProjection added in v0.3.0

func ConnectionReadinessProjection(options ConnectionReadinessOptions) domain.Projection

func ConnectionReadinessValueProjection added in v0.3.0

func ConnectionReadinessValueProjection(readiness ConnectionReadiness) domain.Projection

func DecodeAgentNoteChange added in v0.3.0

func DecodeAgentNoteChange(data []byte) (agentprotocol.NoteChange, error)

File metadata is never an accepted substitute for a typed note payload.

func FindRemoteRPCMethod

func FindRemoteRPCMethod(method string) (domain.RemoteRoute, bool)

func GenerateReaderBearer added in v0.3.0

func GenerateReaderBearer() (string, error)

GenerateReaderBearer creates a 256-bit reader bearer secret for session bootstrap. It is only handed to the in-memory session store.

func IsWriterScope added in v0.3.0

func IsWriterScope(scope string) bool

IsWriterScope reports whether a scope belongs to the supervised writer vocabulary (the session bootstrap allowlist extension).

func OpenAPIDigest added in v0.3.0

func OpenAPIDigest(document map[string]any) (string, error)

func ParseDrivebridgeRef added in v0.3.0

func ParseDrivebridgeRef(raw string) (space, fileID, version string, err error)

ParseDrivebridgeRef parses the pinned reference shape drivebridge://<space>/<file-id>@<version> shared with external consumers.

func ReaderError added in v0.3.0

func ReaderError(code, message, hint string) *domain.CommandError

ReaderError builds the reader-specific command error vocabulary.

func RejectHandwrittenMetadata added in v0.3.0

func RejectHandwrittenMetadata(blob string) error

RejectHandwrittenMetadata fails closed when a client submits a metadata blob.

func RemoteCapabilities

func RemoteCapabilities() []domain.RemoteCapability

func RemoteCapabilityDefinitions added in v0.3.0

func RemoteCapabilityDefinitions() ([]transportcatalog.CapabilityDefinition, map[string][]string)

RemoteCapabilityDefinitions projects the legacy capability inventory into transport-neutral definitions. The legacy surfaces remain declarations only; they never prove that an adapter is implemented.

func RemoteRoutes

func RemoteRoutes() []domain.RemoteRoute

func RemoteSchemaRegistry added in v0.3.0

func RemoteSchemaRegistry() (*catalogschema.Registry, error)

func RemoteTransportBindings added in v0.3.0

func RemoteTransportBindings() ([]transportcatalog.TransportBinding, error)

RemoteTransportBindings converts the currently registered REST and RPC routes into authoritative available bindings. Other legacy surface labels are intentionally excluded until their owning adapter contributes a real backing.

func RemoteTransportManifest added in v0.3.0

func RemoteTransportManifest() (transportcatalog.Manifest, error)

RemoteTransportManifest compiles the additive authoritative transport view. Existing RemoteCapabilities and RemoteRoutes remain the compatibility facade.

func RenderExplorePage added in v0.3.0

func RenderExplorePage(bundle ExploreBundle, embedData bool) ([]byte, error)

RenderExplorePage 渲染自包含 explore 单页 HTML。 bundle 数据默认内嵌(单文件打开即用);embed=false 时(--no-embed,大 vault 走 /explore/data.json 模式)页面引导客户端按需拉取。

func ResolveRepositorySource added in v0.3.0

func ResolveRepositorySource(ctx context.Context, repoRoot string, ref agentprotocol.SourceRef) (repositorySourceResolution, error)

ResolveRepositorySource 解析一个 repository SourceRef。

边界判断(中文注释,review 时不可放宽):

  1. repoRoot 必须是 binding 的 canonical root(调用方保证);本函数在其上 再做 containment 校验,防止将来调用方误传子目录造成权限扩大。
  2. ref 拒绝绝对路径和任何 `..` 段(先按 / 分段再 Clean,拒绝 Windows 分隔符变体);Clean 后再 EvalSymlinks 解析 symlink,最终路径必须 仍以 repoRoot 为前缀,否则按 boundary escape 拒绝。
  3. 可选 revision 从 Span "rev:<sha>" 读取;记录值与当前 `git rev-parse HEAD:<path>` blob hash 不一致时计为 stale, 不替换原 evidence。
  4. 通配符 ref 匹配多条时计为 ambiguous(计入 coverage 的 additive ambiguous 分桶,整体视为 unresolved)。

func ScanExploreExternalRefs added in v0.3.0

func ScanExploreExternalRefs(pageHTML []byte) []string

ScanExploreExternalRefs 扫描页面 HTML 标记里的 src=/href= 属性,返回所有指向 外部(非相对路径)的引用。自包含合同要求零命中;share --once 冒烟与页面测试共用。

func TemplateCompletionItems

func TemplateCompletionItems(root, kind string, includeBuiltins, includeLocal bool) []string

func TemplateVariableCompletionItems

func TemplateVariableCompletionItems(root, name string) []string

func ValidateOpenAPI added in v0.3.0

func ValidateOpenAPI(document map[string]any) error

func WorkbenchContract added in v0.3.0

func WorkbenchContract() domain.WorkbenchProjectionContract

WorkbenchContract 返回 envelope/packet 共用合同标识。

func WorkbenchProviderPacket added in v0.3.0

func WorkbenchProviderPacket() domain.WorkbenchProviderPacket

WorkbenchProviderPacket 返回根仓消费的紧凑 provider packet(静态合同描述)。

Types

type APIRequest

type APIRequest struct {
	VaultPath string
	Format    string
	WriteMode string
}

type ActivityEntry added in v0.1.3

type ActivityEntry struct {
	SchemaVersion string            `json:"schema_version"`
	EventID       string            `json:"event_id"`
	Source        string            `json:"source"`
	Kind          string            `json:"kind"`
	Status        string            `json:"status,omitempty"`
	Severity      string            `json:"severity,omitempty"`
	Summary       string            `json:"summary"`
	ObjectRef     string            `json:"object_ref,omitempty"`
	Path          string            `json:"path,omitempty"`
	RunID         string            `json:"run_id,omitempty"`
	Timestamp     string            `json:"ts,omitempty"`
	DurationMS    int64             `json:"duration_ms,omitempty"`
	Facts         map[string]string `json:"facts,omitempty"`
	Evidence      []string          `json:"evidence,omitempty"`
	Actions       []domain.Action   `json:"actions,omitempty"`
}

type ActivityRequest added in v0.1.3

type ActivityRequest struct {
	VaultPath string
	EventID   string
	Source    string
	Query     string
	Status    string
	Object    string
	Since     string
	Until     string
	Limit     int
}

type AgentBrainContextBundleRequest added in v0.1.3

type AgentBrainContextBundleRequest struct {
	Task      string
	Contexts  []domain.AgentContext
	Receipts  []domain.AgentBrainReceiptRef
	Freshness domain.AgentBrainFreshness
	Actions   []domain.Action
}

type AgentContextRequest added in v0.1.6

type AgentContextRequest struct {
	VaultPath  string
	Principal  agentprotocol.Principal
	Scope      agentprotocol.Scope
	Task       string
	Intent     string
	Entities   []string
	KindFilter []agentprotocol.MemoryKind
	MaxItems   int
	MaxChars   int
}

AgentContextRequest 描述一次 context compilation 的输入。

type AgentFeedbackAddRequest added in v0.1.6

type AgentFeedbackAddRequest struct {
	VaultPath  string
	Principal  agentprotocol.Principal
	Scope      agentprotocol.Scope
	Kind       agentprotocol.FeedbackKind
	MemoryID   string
	ContextRef string
	Comment    string
}

AgentFeedbackAddRequest 描述一次 feedback add 的输入。

type AgentGroundingEvidence added in v0.3.0

type AgentGroundingEvidence struct {
	SchemaVersion        string              `json:"schema_version"`
	State                AgentGroundingState `json:"state"`
	SourceTotal          int                 `json:"source_total"`
	SourceOpenable       int                 `json:"source_openable"`
	CandidateSourceTotal int                 `json:"candidate_source_total"`
	SourceMissing        int                 `json:"source_missing,omitempty"`
	SourceStale          int                 `json:"source_stale,omitempty"`
	SourceAmbiguous      int                 `json:"source_ambiguous,omitempty"`
	FreshnessStatus      string              `json:"freshness_status"`
}

AgentGroundingEvidence 是 Personal Assistant 可消费的 pre-1.0 readonly evidence。Pinax 只证明 source coverage,不拥有 turn 的 canonical state。

func AgentGroundingUnavailableEvidence added in v0.3.0

func AgentGroundingUnavailableEvidence() AgentGroundingEvidence

AgentGroundingUnavailableEvidence 供 consumer 在 Pinax transport/service error 时使用。成功路径不得伪造 unavailable。

type AgentGroundingState added in v0.3.0

type AgentGroundingState string

type AgentHandoffCreateRequest added in v0.1.6

type AgentHandoffCreateRequest struct {
	VaultPath               string
	From                    agentprotocol.Principal
	To                      agentprotocol.Principal
	Scope                   agentprotocol.Scope
	Objective               string
	CurrentState            string
	Decisions               []string
	CompletedWork           []string
	Blockers                []string
	Verification            []string
	FollowUps               []string
	Sources                 agentprotocol.SourceRefList
	RequestedNextCapability string
}

AgentHandoffCreateRequest 描述一次 handoff create 的输入。

type AgentMemoryFacts added in v0.1.6

type AgentMemoryFacts struct {
	MemoryID    string                             `json:"memory_id,omitempty"`
	ProposalID  string                             `json:"proposal_id,omitempty"`
	Status      agentprotocol.ProposalStatus       `json:"status,omitempty"`
	Reason      agentprotocol.ProposalStatusReason `json:"reason,omitempty"`
	Conflicts   []string                           `json:"conflicts,omitempty"`
	DuplicateID string                             `json:"duplicate_id,omitempty"`
	State       agentprotocol.LifecycleState       `json:"state,omitempty"`
	Count       int                                `json:"count,omitempty"`
}

AgentMemoryFacts 是 projection facts 的结构化提取,便于 CLI/MCP/API 共用。

type AgentMemoryProposeRequest added in v0.1.6

type AgentMemoryProposeRequest struct {
	VaultPath string
	Principal agentprotocol.Principal
	Scope     agentprotocol.Scope
	Kind      agentprotocol.MemoryKind
	Subject   string
	Summary   string
	Object    string
	Sources   agentprotocol.SourceRefList
}

AgentMemoryProposeRequest 描述一次 propose 操作的输入。

type AgentMemoryService added in v0.1.6

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

AgentMemoryService 是 Agent memory runtime 的 application service 入口。 它编排 store、lifecycle 和 policy,为 CLI/MCP/API/SDK 提供统一用例。 Agent 默认只能 propose;confirmed mutation 受 policy 和 receipt 控制。

func NewAgentMemoryService added in v0.1.6

func NewAgentMemoryService() *AgentMemoryService

NewAgentMemoryService 构造 application service。

func (*AgentMemoryService) AgentContextForPersonalAssistant added in v0.3.0

func (s *AgentMemoryService) AgentContextForPersonalAssistant(
	ctx context.Context,
	req AgentContextRequest,
	repoRoot string,
) (PersonalAssistantContextProjection, error)

AgentContextForPersonalAssistant 编译 context 后验证来源;全部来源失效的 sourced entry 不进入 projection,避免删除 transcript 后继续泄漏摘要。

func (*AgentMemoryService) AgentContextRuntime added in v0.1.6

AgentContextRuntime 编译 context request → projection。 复用 agentcontext.Compiler,不直接访问 transport。 输出 pinax.agent_context_pack.v1。

func (*AgentMemoryService) AgentContextRuntimeWithLegacy added in v0.1.6

func (s *AgentMemoryService) AgentContextRuntimeWithLegacy(ctx context.Context, req AgentContextRequest, legacyRecords []agentmemory.LegacyRecord, workspaceID string) (agentprotocol.ContextPack, error)

AgentContextRuntimeWithLegacy 合并新 agent memory 和旧 memory rows 后编译 context。 旧 records 通过 legacy mapping 读取,不静默 backfill。

func (*AgentMemoryService) AgentContinuity added in v0.1.6

AgentContinuity 编译 bounded continuity pack。 复用 agentcontinuity.Orchestrator,不直接访问 transport。

func (*AgentMemoryService) AgentFeedbackAdd added in v0.1.6

func (s *AgentMemoryService) AgentFeedbackAdd(ctx context.Context, req AgentFeedbackAddRequest) (string, error)

AgentFeedbackAdd 记录一条 recall feedback。 Feedback 不静默改写 memory content。

func (*AgentMemoryService) AgentFeedbackList added in v0.1.6

func (s *AgentMemoryService) AgentFeedbackList(ctx context.Context, vaultPath string, scope agentprotocol.Scope) ([]agentmemory.AgentFeedbackRow, error)

AgentFeedbackList 列出指定 scope 的 feedback。

func (*AgentMemoryService) AgentHandoffCreate added in v0.1.6

func (s *AgentMemoryService) AgentHandoffCreate(ctx context.Context, req AgentHandoffCreateRequest) (string, error)

AgentHandoffCreate 创建一条 cross-agent handoff。 Handoff 不自动 confirm;它只是 bounded working state。

func (*AgentMemoryService) AgentHandoffGet added in v0.2.0

func (s *AgentMemoryService) AgentHandoffGet(ctx context.Context, vaultPath, handoffID string) (agentmemory.AgentHandoffRow, error)

AgentHandoffGet 读取一条 bounded handoff,不返回完整 transcript 或模型推理。

func (*AgentMemoryService) AgentHandoffList added in v0.1.6

func (s *AgentMemoryService) AgentHandoffList(ctx context.Context, vaultPath string, scope agentprotocol.Scope) ([]agentmemory.AgentHandoffRow, error)

AgentHandoffList 列出指定 scope 的 handoffs。

func (*AgentMemoryService) AgentHandoffReadForPersonalAssistant added in v0.3.0

func (s *AgentMemoryService) AgentHandoffReadForPersonalAssistant(
	ctx context.Context,
	vaultPath string,
	scope agentprotocol.Scope,
	repoRoot string,
) (PersonalAssistantHandoffReadProjection, error)

func (*AgentMemoryService) AgentMemoryApprove added in v0.1.6

func (s *AgentMemoryService) AgentMemoryApprove(ctx context.Context, vaultPath, proposalID string, approver agentprotocol.Principal) (ApproveFacts, error)

AgentMemoryApprove 批准一条 proposal,创建 confirmed memory 并写 receipt。 只有有 approve capability 的 principal 才能执行。

func (*AgentMemoryService) AgentMemoryExpire added in v0.1.6

func (s *AgentMemoryService) AgentMemoryExpire(ctx context.Context, vaultPath, memoryID string, principal agentprotocol.Principal) error

AgentMemoryExpire 标记 memory 为 expired。

func (*AgentMemoryService) AgentMemoryListProposals added in v0.1.6

func (s *AgentMemoryService) AgentMemoryListProposals(ctx context.Context, vaultPath string, scope agentprotocol.Scope) ([]agentmemory.AgentProposalRow, error)

AgentMemoryListProposals 列出指定 scope 的 proposals。

func (*AgentMemoryService) AgentMemoryPropose added in v0.1.6

AgentMemoryPropose 执行 propose → review 流程。 Agent 默认只能 propose;review 返回 draft_saved/approval_required/conflict_required/rejected。 不自动 confirm。

func (*AgentMemoryService) AgentMemoryRecall added in v0.1.6

func (s *AgentMemoryService) AgentMemoryRecall(ctx context.Context, vaultPath string, query agentmemory.RecallQuery) ([]agentprotocol.MemoryRecord, error)

AgentMemoryRecall 检索 memory records(read-only,不写 receipt)。

func (*AgentMemoryService) AgentMemoryRecallForPersonalAssistant added in v0.3.0

func (s *AgentMemoryService) AgentMemoryRecallForPersonalAssistant(
	ctx context.Context,
	vaultPath string,
	query RecallQuery,
	repoRoot string,
) (PersonalAssistantMemoryRecallProjection, error)

func (*AgentMemoryService) AgentMemoryRecallQuery added in v0.1.6

func (s *AgentMemoryService) AgentMemoryRecallQuery(ctx context.Context, vaultPath string, q RecallQuery) ([]agentprotocol.MemoryRecord, error)

AgentMemoryRecallQuery 通过 RecallQuery 执行 recall。

func (*AgentMemoryService) AgentMemoryReject added in v0.1.6

func (s *AgentMemoryService) AgentMemoryReject(ctx context.Context, vaultPath, proposalID string, reviewer agentprotocol.Principal, reason string) error

AgentMemoryReject 拒绝一条 proposal。 与 approve 对齐:action 前重新验证 proposal 状态,已消费(approved/ rejected/superseded)或缺失的 proposal 是 stale action,拒绝并要求 refresh。

func (*AgentMemoryService) AgentMemoryResolveConflict added in v0.1.6

func (s *AgentMemoryService) AgentMemoryResolveConflict(ctx context.Context, vaultPath, winnerID string, principal agentprotocol.Principal) error

AgentMemoryResolveConflict 解决冲突,选择 winner,其余标记为 superseded。

func (*AgentMemoryService) AgentMemoryRollback added in v0.1.6

func (s *AgentMemoryService) AgentMemoryRollback(ctx context.Context, vaultPath, supersededID string, principal agentprotocol.Principal) error

AgentMemoryRollback 回滚一条 superseded memory 为 confirmed。

func (*AgentMemoryService) AgentMemoryShowProposal added in v0.1.6

func (s *AgentMemoryService) AgentMemoryShowProposal(ctx context.Context, vaultPath, proposalID string) (agentmemory.AgentProposalRow, error)

AgentMemoryShowProposal 显示单个 proposal 详情。

func (*AgentMemoryService) AgentMemoryStatus added in v0.1.6

func (s *AgentMemoryService) AgentMemoryStatus(ctx context.Context, vaultPath string, scope agentprotocol.Scope) (map[agentprotocol.LifecycleState]int, error)

AgentMemoryStatus 返回某 scope 的 memory 计数摘要。

func (*AgentMemoryService) AgentMemorySupersede added in v0.1.6

func (s *AgentMemoryService) AgentMemorySupersede(ctx context.Context, vaultPath, oldID, replacementID string, principal agentprotocol.Principal) error

AgentMemorySupersede 将 old memory 标记为 superseded,由 replacement 接替。

func (*AgentMemoryService) AgentTrustCenter added in v0.1.6

AgentTrustCenter 生成 Trust Center 只读投影。 section 失败可隔离,projection 无写 side effect。

func (*AgentMemoryService) Close added in v0.1.6

func (s *AgentMemoryService) Close() error

Close 关闭所有打开的 store。

func (*AgentMemoryService) ContinuityBind added in v0.3.0

ContinuityBind 创建或更新一条 user-level binding(唯一由 service 写 registry)。 校验顺序:repository → registered vault → scope 存在;任一失败不写部分状态。

func (*AgentMemoryService) ContinuityBindingStatus added in v0.3.0

ContinuityBindingStatus 返回 binding 诊断状态(missing/disabled/invalid/ambiguous/ready)。

func (*AgentMemoryService) ContinuityCheckpoint added in v0.3.0

ContinuityCheckpoint 创建绑定感知的 bounded handoff。

状态机与补偿边界(中文注释):

  1. 写入前完成全部 caps/scope/principal 校验;超限即整体失败,零写入。
  2. handoff 通过 canonical AgentHandoffCreate 创建,是 durable 记录。
  3. durable candidates 逐个走 canonical proposal service,只产生 proposed memory。若某 proposal 失败(如重复/权限),checkpoint 不回滚已创建的 handoff(handoff 本身是合法记录),而是返回 stable error 并在 details 中携带 handoff_id,调用方可针对失败 candidate 单独重试。
  4. confirmed memory count 不变:本函数没有任何 confirm/approve 路径。

func (*AgentMemoryService) ContinuityFeedback added in v0.3.0

ContinuityFeedback 追加 append-only feedback event。 缺失 run、invalid enum 都不写;重复提交追加 superseding event。

func (*AgentMemoryService) ContinuityRecordRun added in v0.3.0

func (s *AgentMemoryService) ContinuityRecordRun(ctx context.Context, req ContinuityRunRecord) (string, error)

ContinuityRecordRun 创建 opt-in run receipt。默认 continue 不调用本函数。 枚举校验在写入前完成;scope ID 只存 bounded digest,不存原文。

func (*AgentMemoryService) ContinuityReport added in v0.3.0

ContinuityReport 聚合窗口内 receipt 并执行预注册 Go gates(CLI-authored)。

func (*AgentMemoryService) ContinuityResolveBinding added in v0.3.0

ContinuityResolveBinding 按固定顺序解析当前 worktree 的 binding: 唯一 enabled exact binding → 解析;缺失 → missing;多条 → ambiguous 报错。 返回 missing 不是错误(legacy default fallback),ambiguous/invalid 是错误。

func (*AgentMemoryService) InboxItemDetail added in v0.1.6

InboxItemDetail 返回单个 inbox item 的详情(不含 body)。

func (*AgentMemoryService) MemoryInbox added in v0.1.6

MemoryInbox 聚合 proposals 和 memories 投影为 inbox pack。 不创建第二套 canonical store。

func (*AgentMemoryService) WorkbenchContinuityProjection added in v0.3.0

WorkbenchContinuityProjection 按 opaque projectRef 组装 typed facade envelope。 查询全程 read-only;错误态返回投影(含 recovery)而非裸错误。

type AgentNoteQuery added in v0.3.0

type AgentNoteQuery struct {
	VaultPath  string
	ProposalID string
	Status     string
	Kind       string
	Limit      int
	Cursor     string
}

type AgentNoteRequest added in v0.3.0

type AgentNoteRequest struct {
	VaultPath string
	Principal agentprotocol.Principal
	Scope     agentprotocol.Scope
	Change    agentprotocol.NoteChange
}

type ApplyRequest

type ApplyRequest struct {
	VaultPath       string
	PlanID          string
	Yes             bool
	SnapshotMessage string
	// TrustFields 开启 apply 期 trust_fields 回填(显式 opt-in)。
	TrustFields  bool
	StaleAfter   string
	AgentVersion string
	// AllowStale 显式放行 plan_stale 守卫(逃生门);其余守卫(--yes、snapshot)
	// 不受影响。
	AllowStale bool
}

type ApproveFacts added in v0.1.6

type ApproveFacts struct {
	ProposalID    string                       `json:"proposal_id"`
	MemoryID      string                       `json:"memory_id"`
	LifecycleFrom agentprotocol.LifecycleState `json:"lifecycle_from"`
	LifecycleTo   agentprotocol.LifecycleState `json:"lifecycle_to"`
	ReceiptID     string                       `json:"receipt_id"`
}

ApproveFacts 描述一次 approve 操作的结果。

type AssetRequest

type AssetRequest struct {
	VaultPath       string
	Source          string
	Ref             string
	Target          string
	PathStyle       string
	ContextNote     string
	IncludePaths    bool
	PreviewAs       string
	MaxPreviewBytes int
	// Register keeps the source file in place inside the vault instead of
	// copying it into assets/.
	Register bool
	// DrivebridgeRef registers a pinned drivebridge://<space>/<file-id>@<version>
	// reference on the asset (metadata only; no payload bytes are transferred).
	DrivebridgeRef string
	// DrivebridgeSHA256 pins the expected content digest for the reference.
	DrivebridgeSHA256 string
}

type BackendAddRequest

type BackendAddRequest struct {
	VaultPath string
	Name      string
	Kind      string
	Root      string
	Bucket    string
	Region    string
	Prefix    string
	Endpoint  string
	Profile   string
	Remote    string
}

BackendAddRequest 描述 backend add 请求。

type BackendNotesRequest added in v0.1.4

type BackendNotesRequest struct {
	VaultPath string
	Name      string
	Prefix    string
	Path      string
}

BackendNotesRequest describes read-only note-oriented backend inspection.

type BackendObjectListRequest

type BackendObjectListRequest struct {
	VaultPath string
	Name      string
	Prefix    string
}

BackendObjectListRequest 描述 backend object list 请求。

type BackendObjectStatRequest

type BackendObjectStatRequest struct {
	VaultPath string
	Name      string
	Key       string
}

BackendObjectStatRequest 描述 backend object stat 请求。

type BackendPlanRequest

type BackendPlanRequest struct {
	VaultPath string
	Name      string
	Direction string // push, pull
	DryRun    bool
	Yes       bool
}

BackendPlanRequest 描述 backend diff/push/pull 请求。

type BackendRequest

type BackendRequest struct {
	VaultPath string
	Name      string
}

type BrainAnswerRequest added in v0.1.3

type BrainAnswerRequest struct {
	VaultPath string
	Question  string
	Limit     int
}

type BrainMaintenanceRequest added in v0.1.3

type BrainMaintenanceRequest struct {
	VaultPath string
	DryRun    bool
	SavePlan  bool
}

type BriefingRecipeRequest

type BriefingRecipeRequest struct {
	VaultPath string
	Topic     string
	Limit     int
	Source    string
}

type BriefingRunRequest

type BriefingRunRequest struct {
	VaultPath string
	DryRun    bool
	Yes       bool
}

type BrowseItem added in v0.3.0

type BrowseItem struct {
	Title       string `json:"title"`
	Path        string `json:"path"`
	Kind        string `json:"kind,omitempty"`
	UpdatedAt   string `json:"updated_at,omitempty"`
	Trust       string `json:"trust"`
	Fresh       string `json:"fresh"`
	Description string `json:"description,omitempty"`
}

BrowseItem 是该层 note 行(按 updated 降序,带信任/新鲜度徽标数据)。

type BrowseRequest added in v0.3.0

type BrowseRequest struct {
	VaultPath string
	Path      string
	// LazyIndex 接受与 search 相同的 --lazy-index 值;browse 无论如何都不写索引,
	// 该值只用于输出 facts 透传,保证 flag 语义显式。
	LazyIndex string
}

BrowseRequest 是 pinax browse 的请求。Path 是 vault 相对目录(空 = vault 根)。

type BrowseResult added in v0.3.0

type BrowseResult struct {
	Path       string            `json:"path"`
	Notes      int               `json:"notes"`
	Subfolders []BrowseSubfolder `json:"subfolders,omitempty"`
	Items      []BrowseItem      `json:"items,omitempty"`
}

BrowseResult 是合成目录导航视图(只读,不写任何 vault 文件)。

type BrowseSubfolder added in v0.3.0

type BrowseSubfolder struct {
	Path      string `json:"path"`
	NoteCount int    `json:"note_count"`
}

BrowseSubfolder 是子目录行(含其下全部 note 计数)。

type CloudBackendSetRequest

type CloudBackendSetRequest struct {
	VaultPath           string
	Kind                string
	Bucket              string
	Region              string
	Prefix              string
	Endpoint            string
	Profile             string
	AddressingStyle     string
	Remote              string
	WorkspaceID         string
	DeviceID            string
	SecretRef           string
	EncryptionSecretRef string
}

type CloudLoginRequest

type CloudLoginRequest struct {
	VaultPath           string
	Endpoint            string
	WorkspaceID         string
	DeviceID            string
	SecretRef           string
	EncryptionSecretRef string
}

type CloudRequest

type CloudRequest struct {
	VaultPath string
}

type CollaborationChange added in v0.3.0

type CollaborationChange struct {
	OperationID      string   `json:"operation_id"`
	Action           string   `json:"action"`
	NoteRef          string   `json:"note_ref,omitempty"`
	ExpectedRevision string   `json:"expected_revision,omitempty"`
	Title            string   `json:"title,omitempty"`
	Body             string   `json:"body,omitempty"`
	Dir              string   `json:"dir,omitempty"`
	TargetPath       string   `json:"target_path,omitempty"`
	Tags             []string `json:"tags,omitempty"`
	TagOperation     string   `json:"tag_operation,omitempty"`
	Status           string   `json:"status,omitempty"`
}

CollaborationChange is user content, not an audit payload. Only its digest is persisted.

type CollaborationPolicy added in v0.3.0

type CollaborationPolicy struct{ AllowBody, AllowWrite bool }

CollaborationPolicy is owner configuration, never deserialized from tool input.

type CollaborationPreview added in v0.3.0

type CollaborationPreview struct {
	Change CollaborationChange `json:"change"`
	Digest string              `json:"preview_digest"`
	Path   string              `json:"path"`
	Before string              `json:"before"`
	After  string              `json:"after"`
	State  string              `json:"state"`
}

type CollaborationSearchResult added in v0.3.0

type CollaborationSearchResult struct {
	Query       string               `json:"query"`
	Notes       []domain.NoteDisplay `json:"notes"`
	Offset      int                  `json:"offset"`
	Limit       int                  `json:"limit"`
	Total       int                  `json:"total"`
	HasMore     bool                 `json:"has_more"`
	Truncated   bool                 `json:"truncated"`
	IndexStatus string               `json:"index_status"`
}

type CollectionRequest added in v0.1.3

type CollectionRequest struct {
	VaultPath string
	From      string
	To        string
	Format    string
	DryRun    bool
	Yes       bool
}

type ConnectionReadiness added in v0.3.0

type ConnectionReadiness struct {
	SchemaVersion string               `json:"schema_version"`
	Overall       Readiness            `json:"overall"`
	Layers        map[string]Readiness `json:"layers"`
}

func BuildConnectionReadiness added in v0.3.0

func BuildConnectionReadiness(options ConnectionReadinessOptions) ConnectionReadiness

type ConnectionReadinessOptions added in v0.3.0

type ConnectionReadinessOptions struct {
	Mode                  string
	Transport             string
	AuthMode              string
	OwnerAvailable        bool
	MutationRecoveryReady bool
	ProductionStatus      string
}

type ContinuityBindingRequest added in v0.3.0

type ContinuityBindingRequest struct {
	RepoPath  string
	VaultRef  string
	ScopeKind string
	ScopeID   string
	ConfigDir string
}

ContinuityBindingRequest 描述一次 binding 写操作。 ConfigDir 为空时使用 user-level 默认 config dir(XDG_CONFIG_HOME/pinax)。

type ContinuityBindingResult added in v0.3.0

type ContinuityBindingResult struct {
	BindingID        string `json:"binding_id"`
	BindingDigest    string `json:"binding_id_digest"`
	RepoRootBasename string `json:"repo_root_basename"`
	VaultRef         string `json:"vault_ref"`
	Scope            string `json:"scope"`
	Enabled          bool   `json:"enabled"`
	BindingStatus    string `json:"binding_status"`
	Ready            bool   `json:"ready"`
}

ContinuityBindingResult 是 bind/status 的 bounded 结果。 不暴露完整 canonical_repo_root,只暴露 digest 和 basename。

type ContinuityBindingStatusRequest added in v0.3.0

type ContinuityBindingStatusRequest struct {
	RepoPath  string
	ConfigDir string
}

ContinuityBindingStatusRequest 描述一次 read-only binding status 查询。

type ContinuityBindingStatusResult added in v0.3.0

type ContinuityBindingStatusResult struct {
	BindingStatus continuitybinding.BindingStatus `json:"binding_status"`
	Ready         bool                            `json:"ready"`
	IsRepository  bool                            `json:"is_repository"`
	BindingDigest string                          `json:"binding_id_digest,omitempty"`
	RepoBasename  string                          `json:"repo_root_basename,omitempty"`
	VaultRef      string                          `json:"vault_ref,omitempty"`
	VaultResolved bool                            `json:"vault_resolved"`
	Scope         string                          `json:"scope,omitempty"`
	ScopeValid    bool                            `json:"scope_valid"`
	Registry      string                          `json:"registry"`
}

ContinuityBindingStatusResult 是 status projection 的 bounded 结果。 查询全程 read-only:不创建 run receipt、handoff、proposal 或 vault mutation。

type ContinuityCheckpointRequest added in v0.3.0

type ContinuityCheckpointRequest struct {
	VaultPath         string
	Principal         agentprotocol.Principal
	Scope             agentprotocol.Scope
	Objective         string
	CurrentState      string
	Decisions         []string
	CompletedWork     []string
	Blockers          []string
	Verification      []string
	FollowUps         []string
	Sources           agentprotocol.SourceRefList
	DurableCandidates []DurableCandidate
	ToRuntime         string
	RunID             string
}

ContinuityCheckpointRequest 描述一次 bounded checkpoint。 RunID 可选关联 recorded run;本结构故意不接收 transcript 文件、 raw prompt、provider payload 或自由 JSON dump(无对应字段)。

type ContinuityCheckpointResult added in v0.3.0

type ContinuityCheckpointResult struct {
	HandoffID   string   `json:"handoff_id"`
	ProposalIDs []string `json:"proposal_ids,omitempty"`
	RunID       string   `json:"run_id,omitempty"`
	Scope       string   `json:"scope"`
	// ConfirmedCreated 恒为 0:checkpoint 只走 proposal/review。
	ConfirmedCreated int `json:"confirmed_created"`
}

ContinuityCheckpointResult 是 checkpoint 的 bounded 结果。

type ContinuityFeedbackRequest added in v0.3.0

type ContinuityFeedbackRequest struct {
	VaultPath        string
	RunID            string
	Outcome          string
	ReviewSeconds    int
	ReviewSecondsSet bool
	WeeklyReview     bool
}

ContinuityFeedbackRequest 描述一次用户四值 outcome 或 weekly review 提交。

type ContinuityFeedbackResult added in v0.3.0

type ContinuityFeedbackResult struct {
	FeedbackID string `json:"feedback_id"`
	EventKind  string `json:"event_kind"`
	Outcome    string `json:"outcome,omitempty"`
	Supersedes string `json:"supersedes,omitempty"`
}

ContinuityFeedbackResult 是 feedback 提交结果。

type ContinuityReport added in v0.3.0

type ContinuityReport = continuityevidence.Report

ContinuityReport 是六周 dogfood 报告(导出类型别名,保持 app 为 CLI 唯一入口)。

type ContinuityReportRequest added in v0.3.0

type ContinuityReportRequest struct {
	VaultPath string
	Since     string
	Now       time.Time
}

ContinuityReportRequest 描述一次报告生成。

type ContinuityRequest added in v0.1.6

type ContinuityRequest struct {
	VaultPath  string
	Principal  agentprotocol.Principal
	Scope      agentprotocol.Scope
	Task       string
	Intent     string
	MaxItems   int
	MaxChars   int
	MaxSources int
	HandoffID  string
	// RepoRoot 是当前 binding 解析到的 canonical repository root(additive)。
	// 为空时 repository source 计为 missing;绝不允许访问绑定之外的路径。
	RepoRoot string
}

ContinuityRequest 描述一次 continuity compilation 的输入。

type ContinuityResolveRequest added in v0.3.0

type ContinuityResolveRequest struct {
	RepoPath  string
	ConfigDir string
}

ContinuityResolveRequest 描述一次 binding 自动解析请求。

type ContinuityResolveResult added in v0.3.0

type ContinuityResolveResult struct {
	Status    continuitybinding.BindingStatus `json:"binding_status"`
	Binding   continuitybinding.Binding       `json:"binding,omitempty"`
	VaultPath string                          `json:"vault_path,omitempty"`
}

ContinuityResolveResult 描述解析优先级结果。 显式参数永远优先于 binding(由调用方先判断),本函数只负责 binding 层。

type ContinuityRunRecord added in v0.3.0

type ContinuityRunRecord struct {
	VaultPath      string
	BindingDigest  string
	Scope          agentprotocol.Scope
	Runtime        string
	TaskClass      string
	HandoffStatus  string
	SourceTotal    int
	SourceResolved int
	SourceStale    int
	SourceMissing  int
	WarningCodes   []string
	ProposalCount  int
}

ContinuityRunRecord 描述一次 recorded continuation run 的最小输入。

type CreateNoteRequest

type CreateNoteRequest struct {
	VaultPath  string
	Title      string
	Project    string
	Folder     string
	Kind       string
	Tags       []string
	Template   string
	Vars       map[string]string
	Body       string
	SourcePath string
	StdinBody  string
	Dir        string
	Slug       string
	Status     string
	DryRun     bool
	// The following fields are internal recovery inputs. Public and legacy
	// callers leave them empty and retain the existing note creation behavior.
	PlannedPath          string
	ObjectID             string
	RecordIdempotencyKey string
	RecordEvidence       []string
}

type DaemonCredentialGate added in v0.1.9

type DaemonCredentialGate struct {
	Mode            string
	UnlockSource    projectsecrets.UnlockSource
	EnvelopePresent bool
}

DaemonCredentialGate adapts AssessDaemonCredentialReadiness to the syncdaemon.CredentialGate interface so the daemon loop can forbid remote writes when the repository-encrypted credential is unavailable or would require an interactive prompt.

func (DaemonCredentialGate) RemoteWriteAllowed added in v0.1.9

func (g DaemonCredentialGate) RemoteWriteAllowed() (bool, string)

RemoteWriteAllowed implements syncdaemon.CredentialGate.

type DaemonCredentialReadiness added in v0.1.9

type DaemonCredentialReadiness struct {
	Allowed bool
	Reason  string // non-sensitive, redacted
	Mode    string // device-profile | repository-encrypted
	Source  string // unlock source descriptor when applicable
}

DaemonCredentialReadiness reports whether the daemon may perform remote writes (push/pull that can commit a revision) given the S3 credential mode, the configured unlock source and whether the repository-encrypted envelope is present. The daemon must never open an interactive TTY prompt; in repository-encrypted mode it may only use a non-interactive source (keychain/file/env), and when that source is missing it must enter a degraded state and forbid remote writes (pinax-passphrase-s3-bootstrap task 4.4).

func AssessDaemonCredentialReadiness added in v0.1.9

func AssessDaemonCredentialReadiness(credentialMode string, unlockSource projectsecrets.UnlockSource, envelopePresent bool) DaemonCredentialReadiness

AssessDaemonCredentialReadiness is the gate function. credentialMode is the normalized S3 credential_mode; unlockSource is the source the daemon would use (nil means none configured); envelopePresent reports whether the project- secrets envelope exists at the vault root.

type DailyRequest

type DailyRequest struct {
	VaultPath string
	Editor    string
	Body      string
	Date      string
	Prev      bool
	Template  string
	Next      bool
}

type DatabaseSchemaRequest

type DatabaseSchemaRequest struct {
	VaultPath string
	Name      string
	Type      string
	Values    []string
}

type DataviewRequest added in v0.1.3

type DataviewRequest struct {
	VaultPath string
	Query     string
	LazyIndex bool
	Limit     int
	Sort      string
	Cursor    string
}

type DraftPromoteRequest

type DraftPromoteRequest struct {
	VaultPath string
	NoteRef   string
	Status    string
	Folder    string
	Kind      string
	Yes       bool
	DryRun    bool
}

type DrivebridgeAttachRequest added in v0.3.0

type DrivebridgeAttachRequest struct {
	VaultPath string
	Space     string
	// Remote names an existing rclone S3 remote for kind=s3 adopt; empty means
	// Pinax derives a stable name from the storage profile bucket.
	Remote string
}

type DrivebridgeBindWorkingCopyRequest added in v0.3.0

type DrivebridgeBindWorkingCopyRequest struct {
	VaultPath string
	Provider  string // onedrive | gdrive
	Space     string
}

type DrivebridgeDetachRequest added in v0.3.0

type DrivebridgeDetachRequest struct {
	VaultPath string
}

type DrivebridgeHydrateRequest added in v0.3.0

type DrivebridgeHydrateRequest struct {
	VaultPath string
	Space     string
}

type DurableCandidate added in v0.3.0

type DurableCandidate struct {
	Kind    string `json:"kind"`
	Subject string `json:"subject"`
	Summary string `json:"summary"`
}

DurableCandidate 描述一个值得长期保留的 decision/preference/lesson。 它只能进入 proposal service(proposed 状态),绝不直接 confirmed。

type ExploreBundle added in v0.3.0

type ExploreBundle struct {
	SchemaVersion string              `json:"schema_version"`
	GeneratedAt   string              `json:"generated_at"`
	Counts        ExploreBundleCounts `json:"counts"`
	Nodes         []ExploreNode       `json:"nodes"`
	Edges         []ExploreEdge       `json:"edges"`
}

ExploreBundle 是有界 vault explore 投影:无正文、无绝对路径、无凭据。

func BuildExploreBundle added in v0.3.0

func BuildExploreBundle(vaultPath string) (ExploreBundle, error)

BuildExploreBundle 从 vault 扫描合成 pinax.explore_bundle.v1(默认上限)。 组装完全在内存完成,不写 vault 或 .pinax/**。

type ExploreBundleCounts added in v0.3.0

type ExploreBundleCounts struct {
	Nodes     int  `json:"nodes"`
	Edges     int  `json:"edges"`
	Truncated bool `json:"truncated"`
}

ExploreBundleCounts 报告投影规模与截断状态。

type ExploreEdge added in v0.3.0

type ExploreEdge struct {
	From   string `json:"from"`
	To     string `json:"to"`
	Broken bool   `json:"broken"`
}

ExploreEdge 是 note 间链接边;broken 链接保留为虚线候选(OKF 容忍 broken)。

type ExploreNode added in v0.3.0

type ExploreNode struct {
	ID        string   `json:"id"`
	Title     string   `json:"title"`
	Kind      string   `json:"kind"`
	Tags      []string `json:"tags"`
	Trust     string   `json:"trust"`
	Fresh     string   `json:"fresh"`
	Summary   string   `json:"summary"`
	UpdatedAt string   `json:"updated_at"`
}

ExploreNode 是单个 note 的有界卡片(summary 为有界摘要,绝不携带正文)。

type ExportMarkdownRequest

type ExportMarkdownRequest struct {
	VaultPath string
	OutputDir string
	Tags      []string
	Group     string
	Folder    string
	Kind      string
	Status    string
}

type FeishuDeliveryRequest

type FeishuDeliveryRequest struct {
	VaultPath  string
	WebhookURL string
	SecretRef  string
	Title      string
	Text       string
	DryRun     bool
	Yes        bool
}

type FolderListRequest

type FolderListRequest struct {
	VaultPath    string
	Purpose      string
	Under        string
	IncludeEmpty bool
	Depth        int
}

type FolderOperationRequest

type FolderOperationRequest struct {
	VaultPath        string
	Path             string
	TargetPath       string
	TargetParent     string
	Purpose          string
	DryRun           bool
	Yes              bool
	EmptyOnly        bool
	RequireSnapshot  bool
	ExpectedRevision string
}

type FolderRepairRequest

type FolderRepairRequest struct {
	VaultPath string
	Plan      bool
}

type FolderRequest

type FolderRequest struct {
	VaultPath string
	Path      string
}

type GraphRequest added in v0.1.3

type GraphRequest struct {
	VaultPath string
	Kind      string
	Match     string
}

type HTTPParameterLocation added in v0.3.0

type HTTPParameterLocation string
const (
	HTTPParameterPath   HTTPParameterLocation = "path"
	HTTPParameterQuery  HTTPParameterLocation = "query"
	HTTPParameterHeader HTTPParameterLocation = "header"
)

type HTTPParameterSchema added in v0.3.0

type HTTPParameterSchema struct {
	Name        string                `json:"name"`
	In          HTTPParameterLocation `json:"in"`
	Required    bool                  `json:"required"`
	Schema      map[string]any        `json:"schema"`
	Aliases     []string              `json:"aliases,omitempty"`
	Description string                `json:"description,omitempty"`
}

type HTTPRequestBodySchema added in v0.3.0

type HTTPRequestBodySchema struct {
	ContentType string         `json:"content_type"`
	SchemaID    string         `json:"schema_id"`
	Required    bool           `json:"required"`
	MaxBytes    int64          `json:"max_bytes"`
	Schema      map[string]any `json:"-"`
}

type IdentityMigrationApplyRequest added in v0.1.6

type IdentityMigrationApplyRequest struct {
	VaultPath string
	PlanID    string
	Yes       bool
	Resume    bool
}

type IdentityMigrationRequest added in v0.1.6

type IdentityMigrationRequest struct {
	VaultPath string
	Save      bool
}

type ImportMarkdownRequest

type ImportMarkdownRequest struct {
	VaultPath string
	Source    string
	Group     string
	Folder    string
	Kind      string
	Status    string
	Tags      []string
	Conflict  string
	DryRun    bool
	Yes       bool
}

type InboxItemDetailRequest added in v0.1.6

type InboxItemDetailRequest struct {
	VaultPath string
	Scope     agentprotocol.Scope
	ItemID    string
}

InboxItemDetailRequest 描述单个 inbox item 的查询条件。

type InboxPromoteRequest

type InboxPromoteRequest struct {
	VaultPath string
	NoteRef   string
	To        string
	Group     string
	Folder    string
	Kind      string
	Yes       bool
	DryRun    bool
}

type InboxRequest added in v0.1.6

type InboxRequest struct {
	VaultPath string
	Scope     agentprotocol.Scope
	Limit     int
}

InboxRequest 描述一次 inbox 聚合请求。

type InboxReviewItem added in v0.3.0

type InboxReviewItem struct {
	NoteID  string          `json:"note_id,omitempty"`
	Path    string          `json:"path"`
	Title   string          `json:"title"`
	Source  string          `json:"source"`
	Status  string          `json:"status,omitempty"`
	Snippet string          `json:"snippet,omitempty"`
	Reason  string          `json:"reason"`
	Related []SearchShowRef `json:"related,omitempty"`
	Actions []domain.Action `json:"actions"`
}

type InboxReviewRequest added in v0.3.0

type InboxReviewRequest struct {
	VaultPath string
	Limit     int
	After     string
}

type InboxReviewResult added in v0.3.0

type InboxReviewResult struct {
	Items     []InboxReviewItem `json:"items"`
	Total     int               `json:"total"`
	Remaining int               `json:"remaining"`
	NextAfter string            `json:"next_after,omitempty"`
}

type InboxTriageRequest

type InboxTriageRequest struct {
	VaultPath    string
	NoteRef      string
	PathStyle    string
	IncludePaths bool
	Group        string
	Folder       string
	Kind         string
	Status       string
}

type IndexLookupRequest

type IndexLookupRequest struct {
	VaultPath string
	Query     string
	Scope     string
	Kind      string
}

type IndexPageRequest

type IndexPageRequest struct {
	VaultPath string
	Name      string
	Template  string
}

type IndexRefreshRequest

type IndexRefreshRequest struct {
	VaultPath    string
	ChangedSince string
}

type IndexRepairRequest

type IndexRepairRequest struct {
	VaultPath string
	Kind      string
	DryRun    bool
	Yes       bool
}

type InitVaultRequest

type InitVaultRequest struct {
	VaultPath string
	Title     string
}

type KnowledgeExportProjectionRequest added in v0.3.0

type KnowledgeExportProjectionRequest struct {
	VaultPath     string
	Output        string
	Allowlist     []string
	AllowlistFile string
	FromPackage   string
}

type MemoryCaptureRequest added in v0.1.3

type MemoryCaptureRequest struct {
	VaultPath  string
	Type       string
	Subject    string
	Predicate  string
	Object     string
	Body       string
	Status     string
	Confidence string
	Source     string
	SourceSpan string
	Entities   []string
	DryRun     bool
}

type MemoryListRequest added in v0.1.3

type MemoryListRequest struct {
	VaultPath         string
	Type              string
	Entity            string
	IncludeDraft      bool
	IncludeSuperseded bool
	IncludeExpired    bool
	IncludeRejected   bool
	Limit             int
}

type MemoryRecallRequest added in v0.1.3

type MemoryRecallRequest struct {
	VaultPath string
	Query     string
	Entity    string
	Type      string
	Limit     int
}

type MetadataPlanRequest added in v0.3.0

type MetadataPlanRequest struct {
	VaultPath string
	Query     string
	Save      bool
	// TrustFields 开启 trust_fields 回填操作(显式 opt-in,默认 plan 输出与
	// 既有行为一致)。
	TrustFields bool
	StaleAfter  string
}

MetadataPlanRequest drives pinax metadata plan.

type MonitorEvent added in v0.1.3

type MonitorEvent struct {
	SchemaVersion string            `json:"schema_version"`
	Type          string            `json:"type"`
	RunID         string            `json:"run_id"`
	Command       string            `json:"command"`
	Status        string            `json:"status"`
	StartedAt     string            `json:"started_at"`
	FinishedAt    string            `json:"finished_at"`
	DurationMS    int64             `json:"duration_ms"`
	Steps         int               `json:"steps"`
	Facts         map[string]string `json:"facts,omitempty"`
	Metrics       MonitorMetrics    `json:"metrics"`
	Evidence      []string          `json:"evidence,omitempty"`
	ErrorCode     string            `json:"error_code,omitempty"`
}

type MonitorMetrics added in v0.1.3

type MonitorMetrics struct {
	WallMS               int64  `json:"wall_ms"`
	HeapAllocBytes       uint64 `json:"heap_alloc_bytes"`
	HeapAllocDeltaBytes  int64  `json:"heap_alloc_delta_bytes"`
	TotalAllocDeltaBytes uint64 `json:"total_alloc_delta_bytes"`
	SysBytes             uint64 `json:"sys_bytes"`
	HeapInuseBytes       uint64 `json:"heap_inuse_bytes"`
	StackInuseBytes      uint64 `json:"stack_inuse_bytes"`
	GCDelta              uint32 `json:"gc_delta"`
	Goroutines           int    `json:"goroutines"`
	PeakHeapAllocBytes   uint64 `json:"peak_heap_alloc_bytes"`
	PeakGoroutines       int    `json:"peak_goroutines"`
	CPUUserMicrosDelta   int64  `json:"cpu_user_micros_delta"`
	CPUSystemMicrosDelta int64  `json:"cpu_system_micros_delta"`
	CPUSupported         bool   `json:"cpu_supported"`
	RSSBytes             uint64 `json:"rss_bytes,omitempty"`
	PeakRSSBytes         uint64 `json:"peak_rss_bytes,omitempty"`
	RSSSupported         bool   `json:"rss_supported"`
}

type MonitorRequest added in v0.1.3

type MonitorRequest struct {
	VaultPath string
	RunID     string
	Command   string
	Status    string
	Query     string
	Since     string
	Until     string
	Limit     int
}

type MonitorRun added in v0.1.3

type MonitorRun struct {
	SchemaVersion string            `json:"schema_version"`
	RunID         string            `json:"run_id"`
	Command       string            `json:"command"`
	Status        string            `json:"status"`
	StartedAt     string            `json:"started_at"`
	FinishedAt    string            `json:"finished_at"`
	DurationMS    int64             `json:"duration_ms"`
	Facts         map[string]string `json:"facts,omitempty"`
	Metrics       MonitorMetrics    `json:"metrics"`
	Steps         []MonitorStep     `json:"steps"`
	Evidence      []string          `json:"evidence,omitempty"`
	ErrorCode     string            `json:"error_code,omitempty"`
	ErrorMessage  string            `json:"error_message,omitempty"`
}

type MonitorStep added in v0.1.3

type MonitorStep struct {
	Name         string            `json:"name"`
	Status       string            `json:"status"`
	StartedAt    string            `json:"started_at"`
	FinishedAt   string            `json:"finished_at"`
	DurationMS   int64             `json:"duration_ms"`
	Facts        map[string]string `json:"facts,omitempty"`
	Metrics      MonitorMetrics    `json:"metrics"`
	ErrorCode    string            `json:"error_code,omitempty"`
	ErrorMessage string            `json:"error_message,omitempty"`
}

type NoteAttachRequest

type NoteAttachRequest struct {
	VaultPath  string
	NoteRef    string
	SourcePath string
	Placement  string
	LinkStyle  string
	Embed      bool
	Mode       string
	Rename     string
	Yes        bool
}

type NoteBacklinkGraphRequest

type NoteBacklinkGraphRequest struct {
	VaultPath     string
	NoteRef       string
	IncludeBroken bool
	Limit         int
}

NoteBacklinkGraphRequest 描述反链查询请求。

type NoteDeleteRequest

type NoteDeleteRequest struct {
	VaultPath string
	NoteRef   string
	Yes       bool
	Hard      bool
}

type NoteEditRequest

type NoteEditRequest struct {
	VaultPath string
	NoteRef   string
	Editor    string
}

type NoteFolderBulkRequest

type NoteFolderBulkRequest struct {
	VaultPath string
	Operation string
	OldFolder string
	NewFolder string
	DryRun    bool
	Yes       bool
}

type NoteLinkGraphRequest

type NoteLinkGraphRequest struct {
	VaultPath      string
	NoteRef        string
	All            bool
	BrokenOnly     bool
	Kind           string // wiki|markdown|""(all)
	Status         string // resolved|broken|ambiguous|external|ignored|""(all)
	IncludeIgnored bool
	Limit          int
}

NoteLinkGraphRequest 描述出链查询请求。

type NoteLinkGraphService

type NoteLinkGraphService struct{}

NoteLinkGraphService 提供统一的双联关系图查询。 CLI、doctor、repair、organize、dashboard 和 MCP 都从此服务读取。

type NoteLinkRequest

type NoteLinkRequest struct {
	VaultPath      string
	NoteRef        string
	PathStyle      string
	IncludePaths   bool
	All            bool
	BrokenOnly     bool
	Kind           string
	Status         string
	IncludeIgnored bool
	Limit          int
}

type NoteListRequest

type NoteListRequest struct {
	VaultPath        string
	Tags             []string
	Project          string
	Group            string
	Folder           string
	Kind             string
	Status           string
	CreatedAfter     string
	UpdatedAfter     string
	UpdatedBefore    string
	Period           string
	Recent           bool
	Limit            int
	Sort             string
	PathPrefix       string
	Properties       []string
	StrictProperties bool
}

type NoteMutationRequest

type NoteMutationRequest struct {
	ExpectedRevision string
	VaultPath        string
	NoteRef          string
	Title            string
	TargetDir        string
	Yes              bool
	DryRun           bool
}

type NoteOrphansRequest

type NoteOrphansRequest struct {
	VaultPath   string
	Mode        string // full|no-incoming|no-outgoing
	ExcludeKind string
}

NoteOrphansRequest 描述孤立笔记查询请求。

type NotePropertyRequest

type NotePropertyRequest struct {
	VaultPath string
	NoteRef   string
	Operation string
	Key       string
	Value     string
}

type NoteRefRequest added in v0.3.0

type NoteRefRequest struct {
	VaultPath        string
	NoteRef          string
	ResolvedRevision string
	Floating         bool
	Pick             int
}

type NoteRefResult added in v0.3.0

type NoteRefResult struct {
	Ref              noterender.Reference   `json:"ref"`
	ResolvedRevision string                 `json:"resolved_revision,omitempty"`
	CurrentRevision  string                 `json:"current_revision,omitempty"`
	ResolvedAt       string                 `json:"resolved_at"`
	Stale            bool                   `json:"stale"`
	Candidates       []noterender.Reference `json:"candidates,omitempty"`
	Markdown         string                 `json:"markdown,omitempty"`
	Wikilink         string                 `json:"wikilink,omitempty"`
}

type NoteRefreshRequest

type NoteRefreshRequest struct {
	VaultPath string
	NoteRef   string
	Rendered  bool
	Yes       bool
	SaveRun   string
	Snapshot  string
}

type NoteTagBulkRequest

type NoteTagBulkRequest struct {
	VaultPath string
	Operation string
	OldTag    string
	NewTag    string
	DryRun    bool
	Yes       bool
}

type NoteTagRequest

type NoteTagRequest struct {
	ExpectedRevision string
	VaultPath        string
	NoteRef          string
	Operation        string
	Tags             []string
}

type NoteVerifyRequest added in v0.3.0

type NoteVerifyRequest struct {
	VaultPath string
	NoteRef   string
	Actor     string
	Note      string
}

NoteVerifyRequest 是 pinax note verify 的请求。Actor 为空且未配置 identity 时 必须由调用方 fail-closed;service 层再次校验,双保险。

type OperationAccess added in v0.3.0

type OperationAccess struct {
	PrincipalDigest string
	ScopeDigest     string
	OwnerLocal      bool
}

type OperationRequest added in v0.3.0

type OperationRequest struct {
	VaultPath   string
	OperationID string
	Access      OperationAccess
}

type OrganizeSuggestRequest

type OrganizeSuggestRequest struct {
	VaultPath string
	Save      bool
}

type PaneArtifactRef added in v0.3.0

type PaneArtifactRef struct {
	Schema       string   `json:"schema"`
	Owner        string   `json:"owner"`
	Kind         string   `json:"kind"`
	Ref          string   `json:"ref"`
	Version      string   `json:"version"`
	MediaType    string   `json:"mediaType"`
	Title        string   `json:"title"`
	Summary      string   `json:"summary,omitempty"`
	EvidenceRefs []string `json:"evidenceRefs"`
	Capabilities []string `json:"capabilities"`
}

PaneArtifactRef is ArtifactRefV1 for a Pinax note.

func PaneArtifactFromNote added in v0.3.0

func PaneArtifactFromNote(note domain.Note) (PaneArtifactRef, error)

PaneArtifactFromNote maps a note to ArtifactRefV1 without emitting a filesystem path.

type PaneContext added in v0.3.0

type PaneContext struct {
	WorkspaceRef string `json:"workspaceRef"`
	SessionRef   string `json:"sessionRef,omitempty"`
	PrincipalRef string `json:"principalRef,omitempty"`
	Revision     string `json:"revision"`
}

PaneContext is the pane context carried on every envelope.

type PaneEntity added in v0.3.0

type PaneEntity struct {
	Ref     string         `json:"ref"`
	Version int            `json:"version"`
	Value   map[string]any `json:"value"`
}

PaneEntity is one redacted note item.

type PaneGatedAction added in v0.3.0

type PaneGatedAction struct {
	ID                  string `json:"id"`
	Gated               bool   `json:"gated"`
	ExpectedRevision    string `json:"expected_revision"`
	IdempotencyRequired bool   `json:"idempotency_required"`
	ReceiptRequired     bool   `json:"receipt_required"`
	OwnerCommand        string `json:"owner_command,omitempty"`
}

PaneGatedAction is an owner-authored mutation the Pane may submit.

func PaneGatedActions added in v0.3.0

func PaneGatedActions(revision string) []PaneGatedAction

PaneGatedActions returns capture/sync that must run through Pinax CLI/service.

type PaneGraphTotals added in v0.3.0

type PaneGraphTotals struct {
	Nodes      int  `json:"nodes"`
	Edges      int  `json:"edges"`
	Components int  `json:"components"`
	Truncated  bool `json:"truncated"`
}

PaneGraphTotals carries the bounded graph summary counts.

type PaneSnapshotEnvelope added in v0.3.0

type PaneSnapshotEnvelope struct {
	Schema     string         `json:"schema"`
	Stream     string         `json:"stream"`
	Cursor     string         `json:"cursor"`
	Sequence   int            `json:"sequence"`
	Context    PaneContext    `json:"context"`
	OccurredAt string         `json:"occurredAt"`
	ObservedAt string         `json:"observedAt"`
	Freshness  string         `json:"freshness"`
	Status     string         `json:"status"`
	Op         string         `json:"op"`
	Payload    map[string]any `json:"payload"`
}

PaneSnapshotEnvelope is a PaneEventEnvelopeV1 snapshot payload.

func AssemblePaneBacklinks(projection domain.Projection, context PaneContext) (PaneSnapshotEnvelope, error)

AssemblePaneBacklinks maps a note.backlinks projection onto the pane envelope: bounded source entities, no paths, no note bodies.

func AssemblePaneGraphSummary added in v0.3.0

func AssemblePaneGraphSummary(notes []domain.Note, links []domain.NoteLink, context PaneContext) (PaneSnapshotEnvelope, error)

AssemblePaneGraphSummary derives a path-free graph summary (node/edge/ component counts plus bounded top-k degrees) from vault notes and links.

func AssemblePaneHistory added in v0.3.0

func AssemblePaneHistory(projection domain.Projection, context PaneContext) (PaneSnapshotEnvelope, error)

AssemblePaneHistory maps record-ledger revision events onto the pane timeline slot; events are bounded and carry no paths or bodies.

func AssemblePaneNegative added in v0.3.0

func AssemblePaneNegative(kind string, context PaneContext) (PaneSnapshotEnvelope, error)

AssemblePaneNegative maps owner recovery states. Clients must not poll.

func AssemblePaneSnapshot added in v0.3.0

func AssemblePaneSnapshot(projection domain.Projection, context PaneContext) (PaneSnapshotEnvelope, error)

AssemblePaneSnapshot maps a note.list projection onto PaneEventEnvelopeV1.

type PaneTimelineEvent added in v0.3.0

type PaneTimelineEvent struct {
	Op       string `json:"op"`
	Ref      string `json:"ref"`
	Revision string `json:"revision,omitempty"`
	Time     string `json:"time,omitempty"`
}

PaneTimelineEvent is one bounded record-ledger revision event.

type ParseRawLink = notelinks.RawLink

ParseRawLink 描述从 Markdown body 解析出的一条原始链接。

func ParseNoteLinks(body string) []ParseRawLink

ParseNoteLinks 从 note body 解析所有 wiki link 和 markdown relative link。

type PersonalAssistantContextProjection added in v0.3.0

type PersonalAssistantContextProjection struct {
	Pack      agentprotocol.ContextPack `json:"pack"`
	Grounding AgentGroundingEvidence    `json:"grounding"`
}

type PersonalAssistantHandoffReadProjection added in v0.3.0

type PersonalAssistantHandoffReadProjection struct {
	Handoffs  []agentmemory.AgentHandoffRow `json:"handoffs"`
	Grounding AgentGroundingEvidence        `json:"grounding"`
}

type PersonalAssistantMemoryRecallProjection added in v0.3.0

type PersonalAssistantMemoryRecallProjection struct {
	Memories  []agentprotocol.MemoryRecord `json:"memories"`
	Grounding AgentGroundingEvidence       `json:"grounding"`
}

type PipelineShowRequest added in v0.3.0

type PipelineShowRequest struct {
	VaultPath string
	ID        string
}

PipelineShowRequest drives pinax pipeline show.

type PipelineStatusRequest added in v0.3.0

type PipelineStatusRequest struct {
	VaultPath string
	Limit     int
	Kind      string
}

PipelineStatusRequest drives pinax pipeline status.

type PlanningRequest

type PlanningRequest struct {
	VaultPath  string
	Period     string // daily, weekly, monthly
	TaskReview bool
	DryRun     bool
	Yes        bool
	Save       bool
	FromPeriod string // for plan actions --from
}

type PluginRequest added in v0.1.3

type PluginRequest struct {
	VaultPath  string
	Path       string
	PluginID   string
	Capability string
	Permission string
	Scope      string
	DryRun     bool
	Yes        bool
}

type ProjectBoardRequest

type ProjectBoardRequest struct {
	VaultPath   string
	Project     string
	Subproject  string
	View        string
	NoteDisplay string
	Columns     []string
	GroupBy     string
	Sort        string
	Display     string
	Save        bool
	Format      string
	Compact     bool
}

type ProjectDeleteRequest added in v0.1.3

type ProjectDeleteRequest struct {
	VaultPath string
	Project   string
	Yes       bool
}

type ProjectItemRequest

type ProjectItemRequest struct {
	VaultPath  string
	Project    string
	Subproject string
	Action     string
	Title      string
	ItemID     string
	Column     string
	Body       string
	Labels     []string
	Milestone  string
	Priority   string
	DueAt      string
	BlockedBy  []string
	Yes        bool
}

type ProjectLearningRequest added in v0.1.3

type ProjectLearningRequest struct {
	VaultPath      string
	Project        string
	Subproject     string
	Title          string
	ProjectName    string
	NotesPrefix    string
	Preset         string
	DryRun         bool
	NoStarterItems bool
}

type ProjectRequest

type ProjectRequest struct {
	VaultPath   string
	Slug        string
	Name        string
	Description string
	NotesPrefix string
}

type ProjectSubprojectDeleteRequest added in v0.1.3

type ProjectSubprojectDeleteRequest struct {
	VaultPath  string
	Project    string
	Subproject string
	Yes        bool
}

type ProjectWorkspaceRequest added in v0.1.3

type ProjectWorkspaceRequest struct {
	VaultPath  string
	Project    string
	Subproject string
	Title      string
	Template   string
	DryRun     bool
}

type PromptAssetRequest added in v0.1.1

type PromptAssetRequest struct {
	VaultPath string
	From      string
	Ref       string
	Query     string
	Domain    string
	Tag       string
	Lifecycle string
	To        string
	Reason    string
	Limit     int
}

type PromptCatalogRequest added in v0.3.0

type PromptCatalogRequest struct {
	VaultPath string
	Ref       string
	Query     string
	Locale    string
	Role      string
	Selector  string
	Tags      []string
	// ValuesFile is a JSON object of input values for validate/preview; the
	// values themselves never appear in any output.
	ValuesFile string
	// RepositoryIDs restricts this command's effective repository set.
	RepositoryIDs []string
	DenyIDs       []string
	// Confirm applies an install that passed its plan gate.
	Confirm bool
	// Fork resolves a local-ID conflict by installing side-by-side.
	Fork bool
}

PromptCatalogRequest is the shared request for federated catalog reads and install.

type PromptRepositoryRequest added in v0.3.0

type PromptRepositoryRequest struct {
	ID            string
	Source        string
	Revision      string
	Channel       string
	Trust         string
	Locale        string
	CredentialRef string
	SyncAll       bool
	Repositories  []string
}

PromptRepositoryRequest is the shared request for repository administration commands.

type ProofLoopRunRequest

type ProofLoopRunRequest struct {
	VaultPath string
	Apply     bool
	Yes       bool
}

ProofLoopRunRequest drives the proof loop run orchestration.

type PublishEvent added in v0.1.3

type PublishEvent struct {
	Type   string
	Status string
	Facts  map[string]string
}

type PublishEventSink added in v0.1.3

type PublishEventSink func(PublishEvent)

type PublishRequest added in v0.1.1

type PublishRequest struct {
	VaultPath   string
	Profile     string
	Target      string
	Note        string
	PackageID   string
	Workspace   string
	ParentPage  string
	Space       string
	Folder      string
	ExternalURL string
	As          string
	Layout      string
	Template    string
	IndexPage   bool
	DryRun      bool
	All         bool
	Renderer    string
	Title       string
	BaseURL     string
	Theme       string
	Out         string
	Repo        string
	Branch      string
	Endpoint    string
	Method      string
	SecretRef   string
	GistID      string
	Visibility  string
	Project     string
	Host        string
	Port        int
	Once        bool
	Watch       bool
	Yes         bool
	LiveEvents  PublishEventSink
}

type QueryRequest

type QueryRequest struct {
	VaultPath string
	SQL       string
	LazyIndex bool
	Limit     int
	Sort      string
	Cursor    string
}

type RateValue added in v0.3.0

type RateValue = continuityevidence.RateValue

RateValue 是带 not_measured 语义的比率(导出 continuityevidence 同名类型)。

type ReaderAssetContent added in v0.3.0

type ReaderAssetContent struct {
	AssetRef   string        `json:"asset_ref"`
	Mime       string        `json:"mime"`
	SizeBytes  int64         `json:"size_bytes"`
	Digest     string        `json:"digest"`
	Path       string        `json:"-"`
	ReadSeeker io.ReadSeeker `json:"-"`
}

ReaderAssetContent is the resolved asset stream descriptor.

type ReaderAssetRequest added in v0.3.0

type ReaderAssetRequest struct {
	VaultPath    string
	Session      ReaderSessionInfo
	AssetRef     string
	NoteID       string
	NoteRevision string
}

ReaderAssetRequest reads attachment bytes through the owner resolver.

type ReaderComposedDocumentPage added in v0.3.1

type ReaderComposedDocumentPage struct {
	SchemaVersion string                 `json:"schema_version"`
	RichDocument  ReaderRichDocumentPage `json:"rich_document"`
	Embeds        []ReaderEmbed          `json:"embeds"`
	Origins       []ReaderNodeOrigin     `json:"origins"`
}

type ReaderDaily added in v0.3.1

type ReaderDaily struct {
	SchemaVersion string                `json:"schema_version"`
	BindingID     string                `json:"binding_id"`
	Date          string                `json:"date"`
	Timezone      string                `json:"timezone"`
	Status        string                `json:"status"`
	Note          *ReaderNavigationNote `json:"note"`
	Watermark     string                `json:"watermark"`
	ObservedAt    string                `json:"observed_at"`
}

type ReaderDailyDocumentRequest added in v0.3.1

type ReaderDailyDocumentRequest struct {
	Document ReaderDocumentRequest
	Date     string
	Timezone string
}

ReaderDailyDocumentRequest is an owner-only service contract until a dedicated transport binding is registered. No caller-controlled path or allow-system flag is accepted by the ordinary document API.

type ReaderDailyRequest added in v0.3.1

type ReaderDailyRequest struct {
	VaultPath string
	Session   ReaderSessionInfo
	Date      string
	Timezone  string
}

type ReaderDocumentPage added in v0.3.0

type ReaderDocumentPage struct {
	SchemaVersion   string                      `json:"schema_version"`
	ObjectID        string                      `json:"object_id"`
	Revision        string                      `json:"revision"`
	CurrentRevision string                      `json:"current_revision"`
	URI             string                      `json:"uri"`
	Nodes           []render.ReaderDocumentNode `json:"nodes"`
	Outline         []render.ReaderOutlineEntry `json:"outline"`
	OutlineCursor   string                      `json:"outline_cursor,omitempty"`
	NextCursor      string                      `json:"next_cursor,omitempty"`
	Complete        bool                        `json:"complete"`
	ContentBytes    int                         `json:"content_bytes"`
	ObservedAt      string                      `json:"observed_at"`
	Warnings        []map[string]string         `json:"warnings,omitempty"`
}

ReaderDocumentPage is the /v1/reader/notes/{object_id}/document payload.

type ReaderDocumentRequest added in v0.3.0

type ReaderDocumentRequest struct {
	VaultPath     string
	Session       ReaderSessionInfo
	ObjectID      string
	Revision      string
	Cursor        string
	Anchor        string
	OutlineCursor string
	CursorSecret  []byte
}

ReaderDocumentRequest serves one page of a note for human reading.

type ReaderEmbed added in v0.3.1

type ReaderEmbed struct {
	EmbedID       string             `json:"embed_id"`
	ParentEmbedID string             `json:"parent_embed_id"`
	SourceAnchor  string             `json:"source_anchor"`
	PageAnchors   []string           `json:"page_anchors"`
	Depth         int                `json:"depth"`
	Status        string             `json:"status"`
	Target        *ReaderEmbedTarget `json:"target,omitempty"`
}

type ReaderEmbedTarget added in v0.3.1

type ReaderEmbedTarget struct {
	ObjectID string `json:"object_id"`
	Revision string `json:"revision"`
	Anchor   string `json:"anchor,omitempty"`
}

type ReaderGraphEdge added in v0.3.1

type ReaderGraphEdge struct {
	SourceID string `json:"source_id"`
	TargetID string `json:"target_id"`
}

type ReaderGraphPage added in v0.3.1

type ReaderGraphPage struct {
	SchemaVersion string                   `json:"schema_version"`
	BindingID     string                   `json:"binding_id"`
	Mode          string                   `json:"mode"`
	ObjectID      string                   `json:"object_id"`
	Revision      string                   `json:"revision"`
	Hops          int                      `json:"hops"`
	Nodes         []ReaderNavigationNote   `json:"nodes"`
	Edges         []ReaderGraphEdge        `json:"edges"`
	NextCursor    string                   `json:"next_cursor,omitempty"`
	Watermark     string                   `json:"watermark"`
	ObservedAt    string                   `json:"observed_at"`
	TotalNodes    int                      `json:"total_nodes"`
	TotalEdges    int                      `json:"total_edges"`
	Coverage      ReaderNavigationCoverage `json:"coverage"`
}

type ReaderGraphRequest added in v0.3.1

type ReaderGraphRequest struct {
	VaultPath    string
	Session      ReaderSessionInfo
	Mode         string
	ObjectID     string
	Revision     string
	Hops         int
	Limit        int
	Cursor       string
	CursorSecret []byte
}

type ReaderIndexState added in v0.3.0

type ReaderIndexState struct {
	Status     string `json:"status"`
	Watermark  string `json:"watermark"`
	Generation int64  `json:"generation"`
}

ReaderIndexState reports index health without repairing it.

type ReaderLimits added in v0.3.0

type ReaderLimits struct {
	ListDefaultLimit          int `json:"list_default_limit"`
	ListMaxLimit              int `json:"list_max_limit"`
	SnippetMaxChars           int `json:"snippet_max_chars"`
	OutlinePageMaxEntries     int `json:"outline_page_max_entries"`
	DocumentPageMaxTextBytes  int `json:"document_page_max_text_bytes"`
	DocumentPageMaxNodes      int `json:"document_page_max_nodes"`
	DocumentResponseMaxBytes  int `json:"document_response_max_bytes"`
	DocumentSourceMaxBytes    int `json:"document_source_max_bytes"`
	DocumentTotalMaxNodes     int `json:"document_total_max_nodes"`
	AssetRangeMaxBytes        int `json:"asset_range_max_bytes"`
	SourceExportRangeMaxBytes int `json:"source_export_range_max_bytes"`
}

ReaderLimits is the frozen budget block returned by the source descriptor.

type ReaderLinkItem added in v0.3.0

type ReaderLinkItem struct {
	ObjectID string `json:"object_id"`
	Revision string `json:"revision,omitempty"`
	Anchor   string `json:"anchor,omitempty"`
}

ReaderLinkItem is one authorized relation edge.

type ReaderLinkPage added in v0.3.0

type ReaderLinkPage struct {
	ObjectID           string           `json:"object_id"`
	Revision           string           `json:"revision"`
	Direction          string           `json:"direction"`
	Items              []ReaderLinkItem `json:"items"`
	NextCursor         string           `json:"next_cursor,omitempty"`
	RelationsWatermark string           `json:"relations_watermark"`
	ObservedAt         string           `json:"observed_at"`
}

ReaderLinkPage is the /v1/reader/notes/{object_id}/links payload.

type ReaderLinksRequest added in v0.3.0

type ReaderLinksRequest struct {
	VaultPath    string
	Session      ReaderSessionInfo
	ObjectID     string
	Revision     string
	Direction    string
	Limit        int
	Cursor       string
	CursorSecret []byte
}

ReaderLinksRequest lists relations for one pinned note revision.

type ReaderNavigationCoverage added in v0.3.1

type ReaderNavigationCoverage struct {
	PageComplete   bool `json:"page_complete"`
	CorpusComplete bool `json:"corpus_complete"`
}

ReaderNavigationCoverage distinguishes a complete page sequence from a complete corpus projection. Oversized notes never silently imply full graphs.

type ReaderNavigationNote added in v0.3.1

type ReaderNavigationNote struct {
	ObjectID string `json:"object_id"`
	Revision string `json:"revision"`
	Title    string `json:"title"`
}

type ReaderNodeOrigin added in v0.3.1

type ReaderNodeOrigin struct {
	PageAnchor   string `json:"page_anchor"`
	EmbedID      string `json:"embed_id"`
	SourceAnchor string `json:"source_anchor"`
}

type ReaderNoteCard added in v0.3.0

type ReaderNoteCard struct {
	ObjectID   string   `json:"object_id"`
	Title      string   `json:"title"`
	TitleState string   `json:"title_state,omitempty"`
	Revision   string   `json:"revision"`
	URI        string   `json:"uri"`
	Status     string   `json:"status"`
	ProjectID  *string  `json:"project_id"`
	Tags       []string `json:"tags"`
	UpdatedAt  string   `json:"updated_at"`
}

ReaderNoteCard is the bounded card; no body, no absolute paths.

type ReaderNoteList added in v0.3.0

type ReaderNoteList struct {
	Items          []ReaderNoteCard `json:"items"`
	NextCursor     string           `json:"next_cursor,omitempty"`
	ObservedAt     string           `json:"observed_at"`
	IndexWatermark string           `json:"index_watermark"`
	IndexState     ReaderIndexState `json:"index_state"`
}

ReaderNoteList is the /v1/reader/notes payload.

type ReaderNotesRequest added in v0.3.0

type ReaderNotesRequest struct {
	VaultPath    string
	Session      ReaderSessionInfo
	Query        ReaderPageQuery
	CursorSecret []byte
}

ReaderNotesRequest lists note cards.

type ReaderPageQuery added in v0.3.0

type ReaderPageQuery struct {
	ProjectID string
	Tags      []string
	Status    string
	Sort      string
	Limit     int
	Cursor    string
}

ReaderPageQuery carries the shared list/search pagination controls.

func NormalizeReaderPageQuery added in v0.3.0

func NormalizeReaderPageQuery(query ReaderPageQuery, allowedSorts []string, defaultSort string) (ReaderPageQuery, *domain.CommandError)

NormalizeReaderPageQuery validates and normalizes shared reader page controls; it is shared by the HTTP layer and app-level callers.

type ReaderRichAnnotation added in v0.3.1

type ReaderRichAnnotation struct {
	Anchor      string   `json:"anchor"`
	PageAnchors []string `json:"page_anchors"`
	Kind        string   `json:"kind"`
	Source      string   `json:"source,omitempty"`
	CalloutKind string   `json:"callout_kind,omitempty"`
	Title       string   `json:"title,omitempty"`
	Fold        string   `json:"fold,omitempty"`
}

Internal application projection; no public binding is registered yet.

type ReaderRichDocumentPage added in v0.3.1

type ReaderRichDocumentPage struct {
	SchemaVersion string                 `json:"schema_version"`
	Document      ReaderDocumentPage     `json:"document"`
	Annotations   []ReaderRichAnnotation `json:"annotations"`
}

type ReaderSearchRequest added in v0.3.0

type ReaderSearchRequest struct {
	VaultPath    string
	Session      ReaderSessionInfo
	QueryText    string
	Query        ReaderPageQuery
	CursorSecret []byte
}

ReaderSearchRequest runs keyword search. Query text never reaches logs.

type ReaderSearchResults added in v0.3.0

type ReaderSearchResults struct {
	Items          []ReaderNoteCard      `json:"items"`
	Snippets       []ReaderSearchSnippet `json:"snippets"`
	NextCursor     string                `json:"next_cursor,omitempty"`
	ObservedAt     string                `json:"observed_at"`
	IndexWatermark string                `json:"index_watermark"`
	IndexState     ReaderIndexState      `json:"index_state"`
}

ReaderSearchResults is the /v1/reader/search payload.

type ReaderSearchSnippet added in v0.3.0

type ReaderSearchSnippet struct {
	ObjectID string `json:"object_id"`
	Snippet  string `json:"snippet"`
}

ReaderSearchSnippet is a per-hit escaped HTML fragment.

type ReaderSessionInfo added in v0.3.0

type ReaderSessionInfo struct {
	SessionID string
	BindingID string
	Scopes    []string
}

ReaderSessionInfo is the verified session identity handed to the app layer by the HTTP transport after bearer authentication.

func (ReaderSessionInfo) HasScope added in v0.3.0

func (s ReaderSessionInfo) HasScope(scope string) bool

HasScope reports whether the session carries a granted reader scope.

type ReaderSourceDescriptor added in v0.3.0

type ReaderSourceDescriptor struct {
	SchemaVersion string           `json:"schema_version"`
	SessionID     string           `json:"session_id"`
	BindingID     string           `json:"binding_id"`
	DisplayName   string           `json:"display_name"`
	Capabilities  []string         `json:"capabilities"`
	Limits        ReaderLimits     `json:"limits"`
	IndexState    ReaderIndexState `json:"index_state"`
	ObservedAt    string           `json:"observed_at"`
}

ReaderSourceDescriptor is the /v1/reader/source payload.

type ReaderSourceExport added in v0.3.0

type ReaderSourceExport struct {
	ObjectID   string        `json:"object_id"`
	Revision   string        `json:"revision"`
	MediaType  string        `json:"media_type"`
	SizeBytes  int64         `json:"size_bytes"`
	Digest     string        `json:"digest"`
	ReadSeeker io.ReadSeeker `json:"-"`
}

ReaderSourceExport is the export stream descriptor.

type ReaderSourceExportRequest added in v0.3.0

type ReaderSourceExportRequest struct {
	VaultPath string
	Session   ReaderSessionInfo
	ObjectID  string
	Revision  string
}

ReaderSourceExportRequest serves the explicit markdown download.

type ReaderSourceRequest added in v0.3.0

type ReaderSourceRequest struct {
	VaultPath string
	Session   ReaderSessionInfo
}

ReaderSourceRequest is the readonly source descriptor request.

type ReaderTag added in v0.3.1

type ReaderTag struct {
	TagID           string `json:"tag_id"`
	Path            string `json:"path"`
	ParentID        string `json:"parent_id"`
	Virtual         bool   `json:"virtual"`
	DirectCount     int    `json:"direct_count"`
	DescendantCount int    `json:"descendant_count"`
}

type ReaderTagsPage added in v0.3.1

type ReaderTagsPage struct {
	SchemaVersion string                   `json:"schema_version"`
	BindingID     string                   `json:"binding_id"`
	Items         []ReaderTag              `json:"items"`
	NextCursor    string                   `json:"next_cursor,omitempty"`
	Watermark     string                   `json:"watermark"`
	ObservedAt    string                   `json:"observed_at"`
	TotalTags     int                      `json:"total_tags"`
	Coverage      ReaderNavigationCoverage `json:"coverage"`
}

type ReaderTagsRequest added in v0.3.1

type ReaderTagsRequest struct {
	VaultPath    string
	Session      ReaderSessionInfo
	Limit        int
	Cursor       string
	CursorSecret []byte
}

type Readiness added in v0.3.0

type Readiness struct {
	Status       string   `json:"status"`
	Maturity     string   `json:"maturity"`
	Blockers     []string `json:"blockers"`
	NextActions  []string `json:"next_actions"`
	EvidenceRefs []string `json:"evidence_refs"`
}

func SummarizeConnectionReadiness added in v0.3.0

func SummarizeConnectionReadiness(layers map[string]Readiness) Readiness

type RecallQuery added in v0.1.6

type RecallQuery struct {
	Scope  agentprotocol.Scope
	Text   string
	Kinds  []agentprotocol.MemoryKind
	States []agentprotocol.LifecycleState
	Limit  int
}

RecallQuery 是 CLI/API 用的 recall 查询构造器(避免 CLI 直接 import agentmemory)。

type RecordRequest

type RecordRequest struct {
	VaultPath string
	NoteRef   string
	Plan      bool
}

type RecoverySession added in v0.3.1

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

RecoverySession is an in-memory owner object for a NEW authenticated session. Its constructor and AuthorizeLookup are trusted-host-only integration points, not HTTP request handlers. No renderer/request field proves host approval. It cannot apply, reconcile, change ledger principals or read note bodies.

func NewRecoverySession added in v0.3.1

func NewRecoverySession(root, sessionID, nonce, binding string) (*RecoverySession, error)

NewRecoverySession pins every ancestor, owner directory and ledger file. The random vault binding identifies this observed filesystem selection, not a pathname hash or a persistent vault ID. A fresh process needs a fresh grant. The caller must obtain sessionID/nonce/binding from trusted session state.

func (*RecoverySession) AuthorizeLookup added in v0.3.1

func (s *RecoverySession) AuthorizeLookup(frame []byte) error

AuthorizeLookup installs one explicit, independently approved private host instruction. NEVER expose this method as an HTTP/body-driven permission API. A grant cannot be replaced/extended in place, and a session holds at most 32.

func (*RecoverySession) Lookup added in v0.3.1

func (s *RecoverySession) Lookup(ctx context.Context, sessionID, operationID string) (operation.View, error)

Lookup accepts ONLY the current authenticated session identity and operation ID. The old principal/scope come from the private installed grant, never the caller. A receipt is historical evidence, not current source authorization.

func (*RecoverySession) LookupContext added in v0.3.1

LookupContext is private host metadata; never forward it to a renderer or treat it as permission. AuthorizeLookup still requires explicit host approval.

func (*RecoverySession) Revoke added in v0.3.1

func (s *RecoverySession) Revoke()

Revoke serializes against lookups and discards every grant. It is permanent; reauthorization requires a new session and new explicit host instructions.

type RemoteOperationIdentity added in v0.3.0

type RemoteOperationIdentity struct {
	OperationID    string
	IdempotencyKey string
	BindingID      string
	Access         OperationAccess
}

func WriterOperationAccess added in v0.3.0

func WriterOperationAccess(sessionID, bindingID string, scopes []string) RemoteOperationIdentity

WriterOperationAccess derives the operation principal/scope digests for a supervised writer session. The session (not the owner-local process) is the principal; the granted writer scopes are the scope identity, so operation receipts stay attributable and recoverable per session.

type RemoteRESTContract added in v0.3.0

type RemoteRESTContract struct {
	RouteID           string                 `json:"route_id"`
	CapabilityID      string                 `json:"capability_id"`
	Command           string                 `json:"command"`
	Method            string                 `json:"method"`
	Path              string                 `json:"path"`
	Parameters        []HTTPParameterSchema  `json:"parameters"`
	RequestBody       *HTTPRequestBodySchema `json:"request_body,omitempty"`
	RequestSchema     string                 `json:"request_schema"`
	SuccessSchema     string                 `json:"success_schema"`
	SuccessDataSchema string                 `json:"success_data_schema"`
	// ByteResponses marks endpoints whose success responses carry raw
	// byte windows (200 full / 206 ranged with Content-Range + ETag)
	// instead of the JSON projection envelope.
	ByteResponses       bool                           `json:"byte_responses,omitempty"`
	SuccessMediaType    string                         `json:"success_media_type,omitempty"`
	ErrorSchema         string                         `json:"error_schema"`
	ErrorDetailSchema   string                         `json:"error_detail_schema"`
	BodyExposureDefault string                         `json:"body_exposure_default"`
	ReleaseCore         bool                           `json:"release_core"`
	Readonly            bool                           `json:"readonly"`
	BodyAllowed         bool                           `json:"body_allowed"`
	ApprovalRequired    bool                           `json:"approval_required"`
	SnapshotRequired    bool                           `json:"snapshot_required"`
	UIGroup             string                         `json:"ui_group"`
	WriteGate           string                         `json:"write_gate"`
	ExecutionLocation   string                         `json:"execution_location"`
	WriteStrategy       string                         `json:"write_strategy"`
	Recovery            *domain.RemoteRecoveryContract `json:"recovery,omitempty"`
	OwnerAction         *domain.RemoteOwnerAction      `json:"owner_action,omitempty"`
	Stability           string                         `json:"stability"`
}

func RemoteRESTContracts added in v0.3.0

func RemoteRESTContracts() ([]RemoteRESTContract, error)

func (RemoteRESTContract) Validate added in v0.3.0

func (c RemoteRESTContract) Validate() error

type RenderNoteRequest added in v0.3.0

type RenderNoteRequest struct {
	VaultPath        string
	NoteRef          string
	Display          string
	ResolvedRevision string
}

type RenderRunRequest

type RenderRunRequest struct {
	VaultPath string
	Template  string
	NoteRef   string
	Keep      int
	DryRun    bool
	Yes       bool
}

type RepairApplyRequest

type RepairApplyRequest struct {
	VaultPath       string
	PlanID          string
	Yes             bool
	SnapshotMessage string
	// AllowStale 显式放行 plan_stale 守卫(逃生门);其余守卫(--yes、snapshot)
	// 不受影响。
	AllowStale bool
}

type RepairPlanRequest

type RepairPlanRequest struct {
	VaultPath string
	Save      bool
}

type ResolveResult

type ResolveResult = notelinks.ResolveResult

ResolveResult 描述单条链接的解析结果。

func ResolveLinkTarget

func ResolveLinkTarget(source domain.Note, rawLink ParseRawLink, snap ResolverSnapshot) ResolveResult

ResolveLinkTarget 按确定性优先级解析链接目标。

type ResolverRequest

type ResolverRequest struct {
	VaultPath string
	Query     string
	Scope     string
	Kind      string
}

type ResolverResult

type ResolverResult struct {
	Facts      domain.ResolverFacts          `json:"facts"`
	LedgerSeq  uint64                        `json:"ledger_seq,omitempty"`
	Candidates []domain.VaultObjectCandidate `json:"candidates"`
}

type ResolverSnapshot

type ResolverSnapshot = notelinks.ResolverSnapshot

ResolverSnapshot 存储 note 的查找索引,用于确定性解析。

func BuildResolverSnapshot

func BuildResolverSnapshot(notes []domain.Note) ResolverSnapshot

BuildResolverSnapshot 从 notes 列表构建解析索引。

type ScopedOrganizeRequest added in v0.3.0

type ScopedOrganizeRequest struct {
	VaultPath string
	NoteRefs  []string
	Save      bool
}

type SearchRequest

type SearchRequest struct {
	VaultPath     string
	Query         string
	Tags          []string
	Group         string
	Folder        string
	Kind          string
	Status        string
	CreatedAfter  string
	UpdatedAfter  string
	LinkTarget    string
	HasAttachment bool
	Limit         int
	Sort          string
	AllowStale    bool
	Engine        string
	LazyIndex     string
	At            string
	IncludeDirty  bool
	ChangedSince  string
	Revision      string
	Trust         string
	Stale         string
	Facets        bool
	TrustAware    bool
}

type SearchResult

type SearchResult = searchops.Result
type SearchShowLinks struct {
	Outgoing     int             `json:"outgoing"`
	OutgoingRefs []SearchShowRef `json:"outgoing_refs,omitempty"`
	Incoming     int             `json:"incoming"`
	IncomingRefs []SearchShowRef `json:"incoming_refs,omitempty"`
}

SearchShowLinks 是出入链计数与有界样本。

type SearchShowRef added in v0.3.0

type SearchShowRef struct {
	Path   string `json:"path"`
	Title  string `json:"title,omitempty"`
	Status string `json:"status,omitempty"`
}

SearchShowRef 是有界的链引用(不含正文)。

type SearchShowRequest added in v0.3.0

type SearchShowRequest struct {
	VaultPath string
	NoteRef   string
}

SearchShowRequest 是 pinax search show 的请求;ref 解析歧义时 fail-closed。

type SearchShowResult added in v0.3.0

type SearchShowResult struct {
	Title     string          `json:"title"`
	Path      string          `json:"path"`
	NoteID    string          `json:"note_id,omitempty"`
	Kind      string          `json:"kind,omitempty"`
	Status    string          `json:"status,omitempty"`
	UpdatedAt string          `json:"updated_at,omitempty"`
	Tags      []string        `json:"tags,omitempty"`
	Trust     SearchShowTrust `json:"trust"`
	Fresh     string          `json:"fresh"`
	Snippet   string          `json:"snippet,omitempty"`
	Links     SearchShowLinks `json:"links"`
	Neighbors []SearchShowRef `json:"neighbors,omitempty"`
}

SearchShowResult 是聚合详情卡(bounded snippet + 元数据 + 信任面板 + 链计数 + 邻居)。

type SearchShowTrust added in v0.3.0

type SearchShowTrust struct {
	Tier             string `json:"tier"`
	GeneratedBy      string `json:"generated_by,omitempty"`
	GeneratedAt      string `json:"generated_at,omitempty"`
	VerifiedCount    int    `json:"verified_count"`
	VerifiedAtLatest string `json:"verified_at_latest,omitempty"`
	LatestHumanBy    string `json:"latest_human_by,omitempty"`
	LatestHumanAt    string `json:"latest_human_at,omitempty"`
	StaleAfter       string `json:"stale_after,omitempty"`
}

SearchShowTrust 是详情卡的信任面板(分级 + 关键事件 + stale_after)。

type Service

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

func NewService

func NewService() *Service

func NewServiceWithVersionBackend

func NewServiceWithVersionBackend(backend pinaxversion.VersionBackend) *Service

func (*Service) APIRoutes

func (s *Service) APIRoutes(_ context.Context, req APIRequest) (domain.Projection, error)

func (*Service) APISchemaExport

func (s *Service) APISchemaExport(_ context.Context, req APIRequest) (domain.Projection, error)

func (*Service) ActivityList added in v0.1.3

func (s *Service) ActivityList(_ context.Context, req ActivityRequest) (domain.Projection, error)

func (*Service) ActivityManage added in v0.1.3

func (s *Service) ActivityManage(_ context.Context, req ActivityRequest) (domain.Projection, error)

func (*Service) ActivityShow added in v0.1.3

func (s *Service) ActivityShow(_ context.Context, req ActivityRequest) (domain.Projection, error)

func (*Service) ActivitySources added in v0.1.3

func (s *Service) ActivitySources(_ context.Context, req ActivityRequest) (domain.Projection, error)

func (*Service) ActivityTail added in v0.1.3

func (s *Service) ActivityTail(ctx context.Context, req ActivityRequest) (domain.Projection, error)

func (*Service) AddBackend

func (s *Service) AddBackend(_ context.Context, req BackendAddRequest) (domain.Projection, error)

AddBackend 添加或更新 backend profile。

func (*Service) AdoptFolder

func (*Service) AgentNoteProposalCounters added in v0.3.0

func (s *Service) AgentNoteProposalCounters(ctx context.Context, root string) (domain.Projection, error)

func (*Service) AgentNoteProposalRefresh added in v0.3.0

func (s *Service) AgentNoteProposalRefresh(ctx context.Context, root, id string, yes bool) (domain.Projection, error)

func (*Service) AgentNoteProposals added in v0.3.0

func (s *Service) AgentNoteProposals(ctx context.Context, root string, scope agentprotocol.Scope, id string) (domain.Projection, error)

func (*Service) AgentNotePropose added in v0.3.0

func (s *Service) AgentNotePropose(ctx context.Context, req AgentNoteRequest) (domain.Projection, error)

func (*Service) AgentNoteReview added in v0.3.0

func (s *Service) AgentNoteReview(ctx context.Context, root, id string, principal agentprotocol.Principal, approve, yes bool) (domain.Projection, error)

func (*Service) ApplyMetadata

func (s *Service) ApplyMetadata(ctx context.Context, req ApplyRequest) (domain.Projection, error)

func (*Service) ApplyOrganize

func (s *Service) ApplyOrganize(ctx context.Context, req ApplyRequest) (domain.Projection, error)

func (*Service) ApplyRepair

func (s *Service) ApplyRepair(ctx context.Context, req RepairApplyRequest) (domain.Projection, error)

func (*Service) ArchiveNote

func (s *Service) ArchiveNote(ctx context.Context, req NoteMutationRequest) (domain.Projection, error)

func (*Service) AssetAdd

func (s *Service) AssetAdd(_ context.Context, req AssetRequest) (domain.Projection, error)
func (s *Service) AssetBacklinks(_ context.Context, req AssetRequest) (domain.Projection, error)
func (s *Service) AssetLink(_ context.Context, req AssetRequest) (domain.Projection, error)

func (*Service) AssetList

func (s *Service) AssetList(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) AssetMissing

func (s *Service) AssetMissing(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) AssetMovePlan

func (s *Service) AssetMovePlan(_ context.Context, req AssetRequest) (domain.Projection, error)

func (*Service) AssetOrphans

func (s *Service) AssetOrphans(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) AssetPreview

func (s *Service) AssetPreview(_ context.Context, req AssetRequest) (domain.Projection, error)

func (*Service) AssetRemovePlan

func (s *Service) AssetRemovePlan(_ context.Context, req AssetRequest) (domain.Projection, error)

func (*Service) AssetRepairPlan

func (s *Service) AssetRepairPlan(ctx context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) AssetShow

func (s *Service) AssetShow(_ context.Context, req AssetRequest) (domain.Projection, error)

func (*Service) AssetVerify

func (s *Service) AssetVerify(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) AttachDrivebridge added in v0.3.0

func (s *Service) AttachDrivebridge(ctx context.Context, req DrivebridgeAttachRequest) (domain.Projection, error)

AttachDrivebridge adopts the SAME local root or S3 bucket/prefix as the current pinax.storage.v1 profile. Zero copy: no note bytes move, no new bucket is created, and .pinax/storage.json is left untouched.

func (*Service) AttachNoteFile

func (s *Service) AttachNoteFile(ctx context.Context, req NoteAttachRequest) (domain.Projection, error)

func (*Service) BackendCapabilities

func (s *Service) BackendCapabilities(_ context.Context, req BackendRequest) (domain.Projection, error)

BackendCapabilities 查看 backend 能力列表。

func (*Service) BackendDiff

func (s *Service) BackendDiff(_ context.Context, req BackendPlanRequest) (domain.Projection, error)

BackendDiff 生成 dry-run SyncPlan。

func (*Service) BackendDoctor

func (s *Service) BackendDoctor(_ context.Context, req BackendRequest) (domain.Projection, error)

BackendDoctor 诊断 backend 配置。

func (*Service) BackendNotesList added in v0.1.4

func (s *Service) BackendNotesList(ctx context.Context, req BackendNotesRequest) (domain.Projection, error)

BackendNotesList lists note-like Markdown objects available through a backend.

func (*Service) BackendNotesStat added in v0.1.4

func (s *Service) BackendNotesStat(ctx context.Context, req BackendNotesRequest) (domain.Projection, error)

BackendNotesStat views one note-like object status through a backend.

func (*Service) BackendNotesSummary added in v0.1.4

func (s *Service) BackendNotesSummary(ctx context.Context, req BackendNotesRequest) (domain.Projection, error)

BackendNotesSummary summarizes note-like objects available through a backend.

func (*Service) BackendObjectList

func (s *Service) BackendObjectList(ctx context.Context, req BackendObjectListRequest) (domain.Projection, error)

BackendObjectList 列出 backend 对象。

func (*Service) BackendObjectStat

func (s *Service) BackendObjectStat(ctx context.Context, req BackendObjectStatRequest) (domain.Projection, error)

BackendObjectStat 查看 backend 对象状态。

func (*Service) BackendPull

func (s *Service) BackendPull(_ context.Context, req BackendPlanRequest) (domain.Projection, error)

BackendPull 执行 pull SyncPlan。

func (*Service) BackendPush

func (s *Service) BackendPush(_ context.Context, req BackendPlanRequest) (domain.Projection, error)

BackendPush 执行 push SyncPlan。

func (*Service) BackendShow

func (s *Service) BackendShow(_ context.Context, req BackendRequest) (domain.Projection, error)

BackendShow 查看单个 backend 状态。

func (*Service) BindWorkingCopy added in v0.3.0

BindWorkingCopy records the explicit opt-in for a plaintext OneDrive or Google Drive working copy. Nothing uploads; note add keeps writing locally.

func (*Service) BrainAnswerPreview added in v0.1.3

func (s *Service) BrainAnswerPreview(ctx context.Context, req BrainAnswerRequest) (domain.Projection, error)

func (*Service) BrainMaintenancePlan added in v0.1.3

func (s *Service) BrainMaintenancePlan(_ context.Context, req BrainMaintenanceRequest) (domain.Projection, error)

func (*Service) BriefingRecipeInit

func (s *Service) BriefingRecipeInit(_ context.Context, req BriefingRecipeRequest) (domain.Projection, error)

func (*Service) BriefingRecipeSet

func (s *Service) BriefingRecipeSet(_ context.Context, req BriefingRecipeRequest) (domain.Projection, error)

func (*Service) BriefingRecipeShow

func (s *Service) BriefingRecipeShow(_ context.Context, req BriefingRecipeRequest) (domain.Projection, error)

func (*Service) BriefingRun

func (s *Service) BriefingRun(_ context.Context, req BriefingRunRequest) (domain.Projection, error)

func (*Service) Browse added in v0.3.0

Browse 从 note 扫描投影合成目录视图。只读:绝不创建或修改 index.md, 绝不写 .pinax/index.sqlite(与 --lazy-index 取值无关)。

func (*Service) BulkFolder

func (s *Service) BulkFolder(ctx context.Context, req NoteFolderBulkRequest) (domain.Projection, error)

func (*Service) BulkTag

func (*Service) CapsaBackendSetRclone added in v0.1.6

func (s *Service) CapsaBackendSetRclone(ctx context.Context, req CloudBackendSetRequest) (domain.Projection, error)

func (*Service) CapsaBackendSetS3 added in v0.1.6

func (s *Service) CapsaBackendSetS3(ctx context.Context, req CloudBackendSetRequest) (domain.Projection, error)

func (*Service) CapsaDoctor added in v0.1.6

func (s *Service) CapsaDoctor(ctx context.Context, req CloudRequest) (domain.Projection, error)

func (*Service) CapsaLogin added in v0.1.6

func (s *Service) CapsaLogin(ctx context.Context, req CloudLoginRequest) (domain.Projection, error)

func (*Service) CapsaLogout added in v0.1.6

func (s *Service) CapsaLogout(ctx context.Context, req CloudRequest) (domain.Projection, error)

func (*Service) CapsaStatus added in v0.1.6

func (s *Service) CapsaStatus(ctx context.Context, req CloudRequest) (domain.Projection, error)

func (*Service) CloudBackendSetRclone

func (s *Service) CloudBackendSetRclone(_ context.Context, req CloudBackendSetRequest) (domain.Projection, error)

func (*Service) CloudBackendSetS3

func (s *Service) CloudBackendSetS3(_ context.Context, req CloudBackendSetRequest) (domain.Projection, error)

func (*Service) CloudDoctor

func (s *Service) CloudDoctor(_ context.Context, req CloudRequest) (domain.Projection, error)

func (*Service) CloudLogin

func (s *Service) CloudLogin(_ context.Context, req CloudLoginRequest) (domain.Projection, error)

func (*Service) CloudLogout

func (s *Service) CloudLogout(_ context.Context, req CloudRequest) (domain.Projection, error)

func (*Service) CloudStatus

func (s *Service) CloudStatus(_ context.Context, req CloudRequest) (domain.Projection, error)

func (*Service) CollaborationApply added in v0.3.0

func (s *Service) CollaborationApply(ctx context.Context, root string, change CollaborationChange, digest, authorization string, policy CollaborationPolicy) (operation.View, error)

CollaborationApply replays terminal outcomes without re-reading a now-stale preview. A caller assertion never grants access: the owner policy remains authoritative.

func (*Service) CollaborationPreview added in v0.3.0

func (s *Service) CollaborationPreview(ctx context.Context, root string, change CollaborationChange, policy CollaborationPolicy) (CollaborationPreview, error)

func (*Service) CollaborationRead added in v0.3.0

func (s *Service) CollaborationRead(ctx context.Context, root, ref, intent string, policy CollaborationPolicy) (domain.Note, string, error)

func (*Service) CollaborationSearch added in v0.3.0

func (s *Service) CollaborationSearch(ctx context.Context, root, query string, offset, limit int) (CollaborationSearchResult, error)

func (*Service) CollaborationStatus added in v0.3.0

func (s *Service) CollaborationStatus(ctx context.Context, root, id string) (operation.View, error)

func (*Service) CollaborationVersion added in v0.3.0

func (s *Service) CollaborationVersion(ctx context.Context, root, id string, policy CollaborationPolicy) (domain.Note, string, error)

func (*Service) CollectionDiff added in v0.1.3

func (s *Service) CollectionDiff(ctx context.Context, req CollectionRequest) (domain.Projection, error)

func (*Service) CollectionDoctor added in v0.1.3

func (s *Service) CollectionDoctor(ctx context.Context, req CollectionRequest) (domain.Projection, error)

func (*Service) CollectionExport added in v0.1.3

func (s *Service) CollectionExport(ctx context.Context, req CollectionRequest) (domain.Projection, error)

func (*Service) CollectionImport added in v0.1.3

func (s *Service) CollectionImport(ctx context.Context, req CollectionRequest) (domain.Projection, error)

func (*Service) ConsumeDrivebridgeAsset added in v0.3.0

func (s *Service) ConsumeDrivebridgeAsset(ctx context.Context, req AssetRequest) (domain.Projection, error)

ConsumeDrivebridgeAsset resolves an asset's pinned drivebridge reference to bytes. It fails with file_version_changed when the source changed after pinning and never touches already-landed vault copies on failure. After the attach record is detached, new consumes fail; landed copies stay usable.

func (*Service) CreateFolder

func (*Service) CreateIndexPage

func (s *Service) CreateIndexPage(ctx context.Context, req IndexPageRequest) (domain.Projection, error)

func (*Service) CreateNote

func (s *Service) CreateNote(ctx context.Context, req CreateNoteRequest) (domain.Projection, error)

func (*Service) CreateProject

func (s *Service) CreateProject(_ context.Context, req ProjectRequest) (domain.Projection, error)

func (*Service) CreateTemplate

func (s *Service) CreateTemplate(_ context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) DailyAppend

func (s *Service) DailyAppend(_ context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) DailyOpen

func (s *Service) DailyOpen(ctx context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) DailyShow

func (s *Service) DailyShow(ctx context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) DatabaseSchemaInfer

func (s *Service) DatabaseSchemaInfer(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) DatabaseSchemaList added in v0.1.3

func (s *Service) DatabaseSchemaList(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) DatabaseSchemaSet

func (s *Service) DatabaseSchemaSet(_ context.Context, req DatabaseSchemaRequest) (domain.Projection, error)

func (*Service) DatabaseSchemaShow added in v0.1.3

func (s *Service) DatabaseSchemaShow(_ context.Context, req DatabaseSchemaRequest) (domain.Projection, error)

func (*Service) DataviewExplain added in v0.1.3

func (s *Service) DataviewExplain(_ context.Context, req DataviewRequest) (domain.Projection, error)

func (*Service) DataviewRun added in v0.1.3

func (s *Service) DataviewRun(ctx context.Context, req DataviewRequest) (projection domain.Projection, err error)

func (*Service) DeleteFolder

func (*Service) DeleteNote

func (s *Service) DeleteNote(ctx context.Context, req NoteDeleteRequest) (domain.Projection, error)

func (*Service) DeleteTemplate

func (s *Service) DeleteTemplate(_ context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) DeleteView

func (s *Service) DeleteView(_ context.Context, req ViewRequest) (domain.Projection, error)

func (*Service) DeliverFeishu

func (s *Service) DeliverFeishu(ctx context.Context, req FeishuDeliveryRequest) (domain.Projection, error)

func (*Service) DetachDrivebridge added in v0.3.0

func (s *Service) DetachDrivebridge(ctx context.Context, req DrivebridgeDetachRequest) (domain.Projection, error)

DetachDrivebridge removes the Pinax attach record and asks DriveBridge to release the adopt. Storage profile, Capsa config, and note bytes are never modified.

func (*Service) DraftArchive

func (s *Service) DraftArchive(ctx context.Context, req NoteMutationRequest) (domain.Projection, error)

func (*Service) DraftCreate

func (s *Service) DraftCreate(ctx context.Context, req CreateNoteRequest) (domain.Projection, error)

func (*Service) DraftDiscard

func (s *Service) DraftDiscard(ctx context.Context, req NoteMutationRequest) (domain.Projection, error)

func (*Service) DraftList

func (s *Service) DraftList(ctx context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) DraftPromote

func (s *Service) DraftPromote(ctx context.Context, req DraftPromoteRequest) (domain.Projection, error)

func (*Service) DraftShow

func (s *Service) DraftShow(ctx context.Context, req ShowNoteRequest) (domain.Projection, error)

func (*Service) EditNote

func (s *Service) EditNote(ctx context.Context, req NoteEditRequest) (domain.Projection, error)

func (*Service) ExportKnowledgeProjection added in v0.3.0

func (s *Service) ExportKnowledgeProjection(_ context.Context, req KnowledgeExportProjectionRequest) (domain.Projection, error)

func (*Service) ExportMarkdown

func (s *Service) ExportMarkdown(_ context.Context, req ExportMarkdownRequest) (domain.Projection, error)

func (*Service) GitSnapshot

func (s *Service) GitSnapshot(ctx context.Context, req SnapshotRequest) (domain.Projection, error)

func (*Service) GraphQuery added in v0.1.3

func (s *Service) GraphQuery(ctx context.Context, req GraphRequest) (domain.Projection, error)

func (*Service) GraphRebuild added in v0.1.3

func (s *Service) GraphRebuild(ctx context.Context, req GraphRequest) (domain.Projection, error)

func (*Service) GraphSummary

func (s *Service) GraphSummary(_ context.Context, vaultPath string) (domain.NoteGraphProjection, error)

GraphSummary 返回 vault 的链接图健康摘要。

func (*Service) GraphSummaryProjection added in v0.1.3

func (s *Service) GraphSummaryProjection(ctx context.Context, vaultPath string) (domain.Projection, error)

func (*Service) ImportMarkdown

func (s *Service) ImportMarkdown(_ context.Context, req ImportMarkdownRequest) (domain.Projection, error)

func (*Service) InboxCapture

func (s *Service) InboxCapture(ctx context.Context, req CreateNoteRequest) (domain.Projection, error)

func (*Service) InboxCaptureRemote added in v0.3.0

func (s *Service) InboxCaptureRemote(ctx context.Context, req CreateNoteRequest, identity RemoteOperationIdentity) (domain.Projection, error)

InboxCaptureRemote adds owner-side operation recovery only when both operation identity fields are present. Requests from legacy clients that send neither field continue through the original compatibility path.

func (*Service) InboxDiscard

func (s *Service) InboxDiscard(ctx context.Context, req NoteMutationRequest) (domain.Projection, error)

func (*Service) InboxList

func (s *Service) InboxList(ctx context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) InboxPromote

func (s *Service) InboxPromote(ctx context.Context, req InboxPromoteRequest) (domain.Projection, error)

func (*Service) InboxReview added in v0.3.0

func (s *Service) InboxReview(_ context.Context, req InboxReviewRequest) (domain.Projection, error)

InboxReview 只装配现有笔记投影,不写索引/审阅状态,也不调用模型。

func (*Service) InboxShow

func (s *Service) InboxShow(ctx context.Context, req ShowNoteRequest) (domain.Projection, error)

func (*Service) InboxTriage

func (s *Service) InboxTriage(_ context.Context, req InboxTriageRequest) (domain.Projection, error)

func (*Service) IndexDoctor

func (s *Service) IndexDoctor(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) IndexExplain

func (s *Service) IndexExplain(ctx context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) IndexLookup

func (s *Service) IndexLookup(_ context.Context, req IndexLookupRequest) (domain.Projection, error)

func (*Service) IndexRefresh

func (s *Service) IndexRefresh(ctx context.Context, req IndexRefreshRequest) (projection domain.Projection, err error)

func (*Service) IndexRepair

func (s *Service) IndexRepair(_ context.Context, req IndexRepairRequest) (projection domain.Projection, err error)

func (*Service) IndexStatus

func (s *Service) IndexStatus(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) IndexSummary

func (s *Service) IndexSummary(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) InitIndex

func (s *Service) InitIndex(_ context.Context, req VaultRequest) (projection domain.Projection, err error)

func (*Service) InitTemplates

func (s *Service) InitTemplates(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) InitVault

func (s *Service) InitVault(_ context.Context, req InitVaultRequest) (domain.Projection, error)

func (*Service) InputAttachmentApply added in v0.3.1

func (s *Service) InputAttachmentApply(ctx context.Context, root string, req inputcontract.AttachmentApply, file StagedAttachment, access OperationAccess) (operation.View, error)

func (*Service) InputAttachmentPreview added in v0.3.1

func (*Service) InspectTemplate

func (s *Service) InspectTemplate(ctx context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) ListBackends

func (s *Service) ListBackends(_ context.Context, req VaultRequest) (domain.Projection, error)

ListBackends 列出 vault 所有 backend profile。

func (*Service) ListDimension

func (s *Service) ListDimension(_ context.Context, req VaultRequest, dimension string) (domain.Projection, error)

func (*Service) ListFolders

func (s *Service) ListFolders(_ context.Context, req FolderListRequest) (domain.Projection, error)

func (*Service) ListNotes

func (s *Service) ListNotes(ctx context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) ListNotesQuery

func (s *Service) ListNotesQuery(_ context.Context, req NoteListRequest) (domain.Projection, error)

func (*Service) ListOrganizePlans

func (s *Service) ListOrganizePlans(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) ListProjects

func (s *Service) ListProjects(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) ListRepairPlans

func (s *Service) ListRepairPlans(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) ListTemplateCatalog

func (s *Service) ListTemplateCatalog(_ context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) ListTemplates

func (s *Service) ListTemplates(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) ListViews

func (s *Service) ListViews(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) MemoryCapture added in v0.1.3

func (s *Service) MemoryCapture(ctx context.Context, req MemoryCaptureRequest) (domain.Projection, error)

func (*Service) MemoryContext added in v0.1.3

func (s *Service) MemoryContext(ctx context.Context, req MemoryRecallRequest) (domain.Projection, error)

func (*Service) MemoryList added in v0.1.3

func (s *Service) MemoryList(ctx context.Context, req MemoryListRequest) (domain.Projection, error)

func (*Service) MemoryRecall added in v0.1.3

func (s *Service) MemoryRecall(ctx context.Context, req MemoryRecallRequest) (domain.Projection, error)

func (*Service) MemoryStats added in v0.1.3

func (s *Service) MemoryStats(ctx context.Context, req MemoryListRequest) (domain.Projection, error)

func (*Service) MonitorList added in v0.1.3

func (s *Service) MonitorList(_ context.Context, req MonitorRequest) (domain.Projection, error)

func (*Service) MonitorManage added in v0.1.3

func (s *Service) MonitorManage(_ context.Context, req MonitorRequest) (domain.Projection, error)

func (*Service) MonitorShow added in v0.1.3

func (s *Service) MonitorShow(_ context.Context, req MonitorRequest) (domain.Projection, error)

func (*Service) MonitorSummary added in v0.1.3

func (s *Service) MonitorSummary(_ context.Context, req MonitorRequest) (domain.Projection, error)

func (*Service) MonitorTail added in v0.1.3

func (s *Service) MonitorTail(ctx context.Context, req MonitorRequest) (domain.Projection, error)

func (*Service) MonthlyAppend

func (s *Service) MonthlyAppend(ctx context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) MonthlyOpen

func (s *Service) MonthlyOpen(ctx context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) MonthlyShow

func (s *Service) MonthlyShow(ctx context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) MoveFolder

func (*Service) MoveNote

func (*Service) NoteAttachments

func (s *Service) NoteAttachments(_ context.Context, req NoteLinkRequest) (domain.Projection, error)
func (s *Service) NoteBacklinks(ctx context.Context, req NoteLinkRequest) (domain.Projection, error)
func (s *Service) NoteLinks(ctx context.Context, req NoteLinkRequest) (domain.Projection, error)

func (*Service) NoteOrphans

func (s *Service) NoteOrphans(ctx context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) NoteReference added in v0.3.0

func (s *Service) NoteReference(ctx context.Context, req NoteRefRequest) (domain.Projection, error)

func (*Service) NoteVerify added in v0.3.0

func (s *Service) NoteVerify(ctx context.Context, req NoteVerifyRequest) (domain.Projection, error)

NoteVerify 追加一条 verified 事件到 note frontmatter(OKF 信任合同)。

- 幂等:同 actor 同 UTC 日已存在事件时不重复追加,返回既有事件。 - actor 必填(默认由 CLI 从配置 identity 解析,service 层再次 fail-closed)。 - 写入走 YAML 节点级 atomic patch(commitNoteContent),正文与其余 frontmatter 不变。

func (*Service) OperationReconcile added in v0.3.0

func (s *Service) OperationReconcile(ctx context.Context, request OperationRequest) (domain.Projection, error)

func (*Service) OperationShow added in v0.3.0

func (s *Service) OperationShow(ctx context.Context, request OperationRequest) (domain.Projection, error)

func (*Service) PatchNoteProperty

func (s *Service) PatchNoteProperty(ctx context.Context, req NotePropertyRequest) (domain.Projection, error)

func (*Service) PipelineShow added in v0.3.0

func (s *Service) PipelineShow(ctx context.Context, req PipelineShowRequest) (domain.Projection, error)

PipelineShow 展示单条 plan 或 receipt 的统一详情。只读。

func (*Service) PipelineStatus added in v0.3.0

func (s *Service) PipelineStatus(ctx context.Context, req PipelineStatusRequest) (domain.Projection, error)

PipelineStatus 聚合 pending saved plans 与最近 apply 型 receipts。只读。

func (*Service) PlanActions

func (s *Service) PlanActions(ctx context.Context, req PlanningRequest) (domain.Projection, error)

PlanActions 生成本地 planning action 草稿。

func (*Service) PlanDaily

func (s *Service) PlanDaily(ctx context.Context, req PlanningRequest) (domain.Projection, error)

PlanDaily 生成每日Plan。

func (*Service) PlanMetadata

func (s *Service) PlanMetadata(ctx context.Context, req MetadataPlanRequest) (domain.Projection, error)

func (*Service) PlanMonthly

func (s *Service) PlanMonthly(ctx context.Context, req PlanningRequest) (domain.Projection, error)

PlanMonthly 生成每月Plan。

func (*Service) PlanOrganize

func (s *Service) PlanOrganize(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) PlanRepair

func (s *Service) PlanRepair(ctx context.Context, req RepairPlanRequest) (domain.Projection, error)

func (*Service) PlanScopedOrganize added in v0.3.0

func (s *Service) PlanScopedOrganize(ctx context.Context, req ScopedOrganizeRequest) (domain.Projection, error)

PlanScopedOrganize reuses the full-vault rule engine before restricting writes.

func (*Service) PlanSnapshot

func (s *Service) PlanSnapshot(_ context.Context, req PlanningRequest) (domain.Projection, error)

PlanSnapshot 生成Plan快照。

func (*Service) PlanWeekly

func (s *Service) PlanWeekly(ctx context.Context, req PlanningRequest) (domain.Projection, error)

PlanWeekly 生成每周Plan。

func (*Service) PluginDisable added in v0.1.3

func (s *Service) PluginDisable(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginDoctor added in v0.1.3

func (s *Service) PluginDoctor(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginEnable added in v0.1.3

func (s *Service) PluginEnable(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginInspect added in v0.1.3

func (s *Service) PluginInspect(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginInstall added in v0.1.3

func (s *Service) PluginInstall(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginList added in v0.1.3

func (s *Service) PluginList(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginPermissionsGrant added in v0.1.3

func (s *Service) PluginPermissionsGrant(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginPermissionsList added in v0.1.3

func (s *Service) PluginPermissionsList(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginPermissionsRevoke added in v0.1.3

func (s *Service) PluginPermissionsRevoke(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginRun added in v0.1.3

func (s *Service) PluginRun(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginUninstall added in v0.1.3

func (s *Service) PluginUninstall(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PluginValidate added in v0.1.3

func (s *Service) PluginValidate(ctx context.Context, req PluginRequest) (domain.Projection, error)

func (*Service) PreviewIndexPage

func (s *Service) PreviewIndexPage(ctx context.Context, req IndexPageRequest) (domain.Projection, error)

func (*Service) PreviewTemplate

func (s *Service) PreviewTemplate(ctx context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) ProjectBoardConfigure

func (s *Service) ProjectBoardConfigure(_ context.Context, req ProjectBoardRequest) (domain.Projection, error)

func (*Service) ProjectBoardExport

func (s *Service) ProjectBoardExport(ctx context.Context, req ProjectBoardRequest) (domain.Projection, error)

func (*Service) ProjectBoardPlan

func (s *Service) ProjectBoardPlan(ctx context.Context, req ProjectBoardRequest) (domain.Projection, error)

func (*Service) ProjectBoardShow

func (s *Service) ProjectBoardShow(_ context.Context, req ProjectBoardRequest) (domain.Projection, error)

func (*Service) ProjectBoardViewSave added in v0.1.3

func (s *Service) ProjectBoardViewSave(_ context.Context, req ProjectBoardRequest) (domain.Projection, error)

func (*Service) ProjectDelete added in v0.1.3

func (s *Service) ProjectDelete(_ context.Context, req ProjectDeleteRequest) (domain.Projection, error)

func (*Service) ProjectItemAdd

func (s *Service) ProjectItemAdd(_ context.Context, req ProjectItemRequest) (domain.Projection, error)

func (*Service) ProjectItemArchive

func (s *Service) ProjectItemArchive(ctx context.Context, req ProjectItemRequest) (domain.Projection, error)

func (*Service) ProjectItemMove

func (s *Service) ProjectItemMove(ctx context.Context, req ProjectItemRequest) (domain.Projection, error)

func (*Service) ProjectItemPlan

func (s *Service) ProjectItemPlan(_ context.Context, req ProjectItemRequest) (domain.Projection, error)

func (*Service) ProjectItemShow added in v0.1.3

func (s *Service) ProjectItemShow(_ context.Context, req ProjectItemRequest) (domain.Projection, error)

func (*Service) ProjectLearningInit added in v0.1.3

func (s *Service) ProjectLearningInit(ctx context.Context, req ProjectLearningRequest) (domain.Projection, error)

func (*Service) ProjectShow added in v0.1.3

func (s *Service) ProjectShow(_ context.Context, req ProjectRequest) (domain.Projection, error)

func (*Service) ProjectSubprojectCreate added in v0.1.3

func (s *Service) ProjectSubprojectCreate(_ context.Context, req ProjectWorkspaceRequest) (domain.Projection, error)

func (*Service) ProjectSubprojectDelete added in v0.1.3

func (s *Service) ProjectSubprojectDelete(_ context.Context, req ProjectSubprojectDeleteRequest) (domain.Projection, error)

func (*Service) ProjectSubprojectList added in v0.1.3

func (s *Service) ProjectSubprojectList(_ context.Context, req ProjectWorkspaceRequest) (domain.Projection, error)

func (*Service) ProjectSubprojectShow added in v0.1.3

func (s *Service) ProjectSubprojectShow(_ context.Context, req ProjectWorkspaceRequest) (domain.Projection, error)

func (*Service) PromptCatalogInspect added in v0.3.0

func (s *Service) PromptCatalogInspect(ctx context.Context, req PromptCatalogRequest) (domain.Projection, error)

PromptCatalogInspect returns catalog, snapshot, and contract metadata with zero provider calls and zero durable writes.

func (*Service) PromptCatalogInstall added in v0.3.0

func (s *Service) PromptCatalogInstall(ctx context.Context, req PromptCatalogRequest) (domain.Projection, error)

PromptCatalogInstall materializes a rights-permitted verified template as a Pinax-owned draft PromptAsset. Without --yes it returns the install plan; preview-only, no-copy, or unknown-rights templates fail closed.

func (*Service) PromptCatalogPreview added in v0.3.0

func (s *Service) PromptCatalogPreview(ctx context.Context, req PromptCatalogRequest) (domain.Projection, error)

PromptCatalogPreview renders in memory: provider_calls=0, durable_writes=0, and the rendered body never leaves the bridge.

func (*Service) PromptCatalogResolve added in v0.3.0

func (s *Service) PromptCatalogResolve(ctx context.Context, req PromptCatalogRequest) (domain.Projection, error)

PromptCatalogResolve resolves an exact ref or template address.

func (*Service) PromptCatalogSearch added in v0.3.0

func (s *Service) PromptCatalogSearch(ctx context.Context, req PromptCatalogRequest) (domain.Projection, error)

PromptCatalogSearch searches the federated catalog. The local `pinax prompt search` stays vault-only; this is the external surface.

func (*Service) PromptCatalogShow added in v0.3.0

func (s *Service) PromptCatalogShow(ctx context.Context, req PromptCatalogRequest) (domain.Projection, error)

PromptCatalogShow shows one catalog solution without reading any body.

func (*Service) PromptCatalogValidate added in v0.3.0

func (s *Service) PromptCatalogValidate(ctx context.Context, req PromptCatalogRequest) (domain.Projection, error)

PromptCatalogValidate reports input readiness for a template role.

func (*Service) PromptCreate added in v0.1.1

func (s *Service) PromptCreate(ctx context.Context, req PromptAssetRequest) (domain.Projection, error)

func (*Service) PromptFeedbackImport added in v0.1.1

func (s *Service) PromptFeedbackImport(ctx context.Context, req PromptAssetRequest) (domain.Projection, error)

func (*Service) PromptImport added in v0.1.1

func (s *Service) PromptImport(ctx context.Context, req PromptAssetRequest) (domain.Projection, error)

func (*Service) PromptLifecycle added in v0.1.1

func (s *Service) PromptLifecycle(ctx context.Context, req PromptAssetRequest) (domain.Projection, error)

func (*Service) PromptRepositoryAdd added in v0.3.0

func (s *Service) PromptRepositoryAdd(ctx context.Context, req PromptRepositoryRequest) (domain.Projection, error)

PromptRepositoryAdd registers a repository profile in the shared user-level promptrepo store.

func (*Service) PromptRepositoryDisable added in v0.3.0

func (s *Service) PromptRepositoryDisable(ctx context.Context, req PromptRepositoryRequest) (domain.Projection, error)

PromptRepositoryDisable disables a repository profile without deleting it.

func (*Service) PromptRepositoryDoctor added in v0.3.0

func (s *Service) PromptRepositoryDoctor(ctx context.Context, req PromptRepositoryRequest) (domain.Projection, error)

PromptRepositoryDoctor reports repository health for diagnostics.

func (*Service) PromptRepositoryEnable added in v0.3.0

func (s *Service) PromptRepositoryEnable(ctx context.Context, req PromptRepositoryRequest) (domain.Projection, error)

PromptRepositoryEnable enables a repository profile.

func (*Service) PromptRepositoryList added in v0.3.0

func (s *Service) PromptRepositoryList(ctx context.Context, req PromptRepositoryRequest) (domain.Projection, error)

PromptRepositoryList lists shared repository profiles.

func (*Service) PromptRepositoryRemove added in v0.3.0

func (s *Service) PromptRepositoryRemove(ctx context.Context, req PromptRepositoryRequest) (domain.Projection, error)

PromptRepositoryRemove removes a repository profile from the shared store.

func (*Service) PromptRepositoryShow added in v0.3.0

func (s *Service) PromptRepositoryShow(ctx context.Context, req PromptRepositoryRequest) (domain.Projection, error)

PromptRepositoryShow shows one shared repository profile.

func (*Service) PromptRepositorySync added in v0.3.0

func (s *Service) PromptRepositorySync(ctx context.Context, req PromptRepositoryRequest) (domain.Projection, error)

PromptRepositorySync refreshes repository snapshots in the shared store.

func (*Service) PromptResolve added in v0.1.1

func (s *Service) PromptResolve(ctx context.Context, req PromptAssetRequest) (domain.Projection, error)

func (*Service) PromptSearch added in v0.1.1

func (s *Service) PromptSearch(ctx context.Context, req PromptAssetRequest) (domain.Projection, error)

func (*Service) PromptShow added in v0.1.1

func (s *Service) PromptShow(ctx context.Context, req PromptAssetRequest) (domain.Projection, error)

func (*Service) ProofLoopRun

func (s *Service) ProofLoopRun(ctx context.Context, req ProofLoopRunRequest) (domain.Projection, error)

ProofLoopRun 编排本地 proof loop。它复用内部 service,不 shell out 到子命令。 每个阶段把有界事实汇入一个 projection;preview 不写 vault,apply 路径先 fresh snapshot 再执行已批准的 repair/organize apply。

func (*Service) PruneTemplateRuns

func (s *Service) PruneTemplateRuns(_ context.Context, req RenderRunRequest) (domain.Projection, error)

func (*Service) PublishBuild added in v0.1.1

func (s *Service) PublishBuild(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDeploy added in v0.1.1

func (s *Service) PublishDeploy(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDev added in v0.1.3

func (s *Service) PublishDev(ctx context.Context, req PublishRequest) (domain.Projection, error)
func (s *Service) PublishDocLink(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocList added in v0.1.4

func (s *Service) PublishDocList(_ context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocPrepare added in v0.1.4

func (s *Service) PublishDocPrepare(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocPrepareAll added in v0.1.4

func (s *Service) PublishDocPrepareAll(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocProfileSet added in v0.1.4

func (s *Service) PublishDocProfileSet(_ context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocProviderDoctor added in v0.1.4

func (s *Service) PublishDocProviderDoctor(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocProviderList added in v0.1.4

func (s *Service) PublishDocProviderList(_ context.Context, _ PublishRequest) (domain.Projection, error)

func (*Service) PublishDocPush added in v0.1.4

func (s *Service) PublishDocPush(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocPushAll added in v0.1.4

func (s *Service) PublishDocPushAll(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocStatus added in v0.1.4

func (s *Service) PublishDocStatus(ctx context.Context, req PublishRequest) (domain.Projection, error)
func (s *Service) PublishDocUnlink(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDocUnlinkAll added in v0.1.4

func (s *Service) PublishDocUnlinkAll(_ context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishDoctor added in v0.1.1

func (s *Service) PublishDoctor(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishPlan added in v0.1.1

func (s *Service) PublishPlan(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishPreviewApprove added in v0.1.3

func (s *Service) PublishPreviewApprove(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishProfileInit added in v0.1.1

func (s *Service) PublishProfileInit(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishProfileList added in v0.1.1

func (s *Service) PublishProfileList(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishProfileShow added in v0.1.1

func (s *Service) PublishProfileShow(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishProfileValidate added in v0.1.1

func (s *Service) PublishProfileValidate(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishServe added in v0.1.1

func (s *Service) PublishServe(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishThemeEject added in v0.1.1

func (s *Service) PublishThemeEject(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) PublishThemeList added in v0.1.1

func (s *Service) PublishThemeList(ctx context.Context, req PublishRequest) (domain.Projection, error)

func (*Service) QueryAgentNoteProposals added in v0.3.0

func (s *Service) QueryAgentNoteProposals(_ context.Context, req AgentNoteQuery) (domain.Projection, error)

QueryAgentNoteProposals never opens the canonical payload store or persists cursors.

func (s *Service) QueryBacklinks(ctx context.Context, req NoteBacklinkGraphRequest) (domain.Projection, error)

QueryBacklinks 查询指定 note 的反链。

func (*Service) QueryExplain

func (s *Service) QueryExplain(_ context.Context, req QueryRequest) (domain.Projection, error)

func (*Service) QueryOrphans

func (s *Service) QueryOrphans(_ context.Context, req NoteOrphansRequest) (domain.Projection, error)

QueryOrphans 查询孤立笔记。

func (s *Service) QueryOutgoingLinks(ctx context.Context, req NoteLinkGraphRequest) (domain.Projection, error)

QueryOutgoingLinks 查询指定 note 的出链。

func (*Service) QueryRun

func (s *Service) QueryRun(ctx context.Context, req QueryRequest) (projection domain.Projection, err error)

func (*Service) ReaderAsset added in v0.3.0

ReaderAsset resolves attachment bytes for a note-bound asset reference. The note revision pins the referencing content; the asset must still match its recorded content identity; symlinks, hidden files and path escapes are rejected before any byte is read.

func (*Service) ReaderComposedDocument added in v0.3.1

func (s *Service) ReaderComposedDocument(ctx context.Context, req ReaderDocumentRequest) (domain.Projection, error)

func (*Service) ReaderDaily added in v0.3.1

func (s *Service) ReaderDaily(ctx context.Context, req ReaderDailyRequest) (ReaderDaily, error)

ReaderDaily locates an existing journal without invoking DailyShow or ensureJournalNote: both legacy operations can create files and refresh state.

func (*Service) ReaderDailyDocument added in v0.3.1

func (s *Service) ReaderDailyDocument(ctx context.Context, req ReaderDailyDocumentRequest) (domain.Projection, error)

func (*Service) ReaderDocument added in v0.3.0

func (s *Service) ReaderDocument(ctx context.Context, req ReaderDocumentRequest) (domain.Projection, error)

ReaderDocument serves one bounded page. The first request resolves the current revision unless an explicit one is pinned; every later page is validated against the same revision without ever snapshotting.

func (*Service) ReaderGraph added in v0.3.1

func (s *Service) ReaderGraph(ctx context.Context, request ReaderGraphRequest) (ReaderGraphPage, error)
func (s *Service) ReaderLinks(_ context.Context, req ReaderLinksRequest) (domain.Projection, error)

ReaderLinks returns authorized relation edges. The source revision is pinned; the relations watermark guards cursor staleness; invisible targets are excluded entirely rather than anonymized.

func (*Service) ReaderNotes added in v0.3.0

func (s *Service) ReaderNotes(_ context.Context, req ReaderNotesRequest) (domain.Projection, error)

ReaderNotes lists bounded note cards with stable keyset ordering and opaque cursors. Read-only: no index writes, no refresh, no vault mutation.

func (*Service) ReaderRichDocument added in v0.3.1

func (s *Service) ReaderRichDocument(ctx context.Context, req ReaderDocumentRequest) (domain.Projection, error)

func (*Service) ReaderSearch added in v0.3.0

func (s *Service) ReaderSearch(_ context.Context, req ReaderSearchRequest) (domain.Projection, error)

ReaderSearch runs keyword search against the loaded notes. No model, no lazy rebuild, and the query text never enters facts or evidence.

func (*Service) ReaderSource added in v0.3.0

func (s *Service) ReaderSource(_ context.Context, req ReaderSourceRequest) (domain.Projection, error)

ReaderSource describes the authorized reading surface for this session.

func (*Service) ReaderSourceExport added in v0.3.0

ReaderSourceExport serves the explicit human download of a note's markdown source. Only object ids resolve content; no path or output directory is accepted, and the bytes stream straight from the pinned revision body.

func (*Service) ReaderTags added in v0.3.1

func (s *Service) ReaderTags(ctx context.Context, req ReaderTagsRequest) (ReaderTagsPage, error)

func (*Service) RebuildIndex

func (s *Service) RebuildIndex(_ context.Context, req VaultRequest) (projection domain.Projection, err error)

func (*Service) RecommendTemplate

func (s *Service) RecommendTemplate(_ context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) RecordAdopt

func (s *Service) RecordAdopt(ctx context.Context, req RecordRequest) (domain.Projection, error)

func (*Service) RecordHistory

func (s *Service) RecordHistory(ctx context.Context, req RecordRequest) (domain.Projection, error)

func (*Service) RecordIdentityApply added in v0.1.6

func (s *Service) RecordIdentityApply(ctx context.Context, req IdentityMigrationApplyRequest) (domain.Projection, error)

func (*Service) RecordIdentityAudit added in v0.1.6

func (s *Service) RecordIdentityAudit(ctx context.Context, req IdentityMigrationRequest) (domain.Projection, error)

func (*Service) RecordIdentityPlan added in v0.1.6

func (s *Service) RecordIdentityPlan(ctx context.Context, req IdentityMigrationRequest) (domain.Projection, error)

func (*Service) RecordInit

func (s *Service) RecordInit(ctx context.Context, req RecordRequest) (domain.Projection, error)

func (*Service) RecordStatus

func (s *Service) RecordStatus(ctx context.Context, req RecordRequest) (domain.Projection, error)

func (*Service) RefreshIndexPage

func (s *Service) RefreshIndexPage(ctx context.Context, req IndexPageRequest) (domain.Projection, error)

func (*Service) RefreshNoteRendered

func (s *Service) RefreshNoteRendered(ctx context.Context, req NoteRefreshRequest) (domain.Projection, error)

func (*Service) RemoveBackend

func (s *Service) RemoveBackend(_ context.Context, req BackendRequest) (domain.Projection, error)

RemoveBackend 移除 backend profile。

func (*Service) RenameFolder

func (*Service) RenameFolderRemote added in v0.3.0

func (s *Service) RenameFolderRemote(ctx context.Context, req FolderOperationRequest, identity RemoteOperationIdentity) (domain.Projection, error)

RenameFolderRemote enables operation recovery only for callers that send both identity values. Legacy callers that send neither retain the direct route behavior and are not silently reinterpreted.

func (*Service) RenameNote

func (s *Service) RenameNote(ctx context.Context, req NoteMutationRequest) (domain.Projection, error)

func (*Service) RenderDatabaseView added in v0.1.3

func (s *Service) RenderDatabaseView(ctx context.Context, req ViewRequest) (projection domain.Projection, err error)

func (*Service) RenderNote added in v0.3.0

func (s *Service) RenderNote(ctx context.Context, req RenderNoteRequest) (domain.Projection, error)

func (*Service) RenderTemplate

func (s *Service) RenderTemplate(ctx context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) RepairFolders

func (s *Service) RepairFolders(_ context.Context, req FolderRepairRequest) (domain.Projection, error)

func (*Service) RepairTemplateRuns

func (s *Service) RepairTemplateRuns(_ context.Context, req RenderRunRequest) (domain.Projection, error)

func (*Service) ResolveManagedObjectForMutation added in v0.1.6

func (s *Service) ResolveManagedObjectForMutation(ctx context.Context, req ResolverRequest) (ResolverResult, error)

func (*Service) ResolveNote

func (s *Service) ResolveNote(ctx context.Context, req ShowNoteRequest) (domain.Note, error)

func (*Service) ResolveNoteWithResolver

func (s *Service) ResolveNoteWithResolver(ctx context.Context, req ShowNoteRequest) (domain.Note, ResolverResult, error)

func (*Service) ResolveVaultObject

func (s *Service) ResolveVaultObject(_ context.Context, req ResolverRequest) (ResolverResult, error)

func (*Service) ResolveVaultObjectForWrite

func (s *Service) ResolveVaultObjectForWrite(ctx context.Context, req ResolverRequest) (ResolverResult, error)

func (*Service) ResolveVaultObjectProjection

func (s *Service) ResolveVaultObjectProjection(ctx context.Context, req ResolverRequest) (domain.Projection, error)

func (*Service) SaveDatabaseView

func (s *Service) SaveDatabaseView(_ context.Context, req ViewRequest) (domain.Projection, error)

func (*Service) SaveView

func (s *Service) SaveView(_ context.Context, req ViewRequest) (domain.Projection, error)

func (*Service) SearchNotes

func (s *Service) SearchNotes(ctx context.Context, req SearchRequest) (result SearchResult, err error)

func (*Service) SearchProjection

func (s *Service) SearchProjection(ctx context.Context, req SearchRequest) (domain.Projection, error)

func (*Service) SearchShow added in v0.3.0

func (s *Service) SearchShow(_ context.Context, req SearchShowRequest) (domain.Projection, error)

SearchShow 聚合既有只读投影为详情卡。不输出正文全文(body 红线),snippet 有界。 只读:不触发 lazy index rebuild,不写任何 vault/index 文件。

func (*Service) SetLocalStorage

func (s *Service) SetLocalStorage(_ context.Context, req StorageRequest) (domain.Projection, error)

func (*Service) SetS3Storage

func (s *Service) SetS3Storage(_ context.Context, req StorageRequest) (domain.Projection, error)

func (*Service) ShareStart added in v0.1.3

func (s *Service) ShareStart(ctx context.Context, req ShareRequest) (domain.Projection, error)

func (*Service) ShowDatabaseView

func (s *Service) ShowDatabaseView(ctx context.Context, req ViewRequest) (domain.Projection, error)

func (*Service) ShowFolder

func (s *Service) ShowFolder(_ context.Context, req FolderRequest) (domain.Projection, error)

func (*Service) ShowNote

func (s *Service) ShowNote(ctx context.Context, req ShowNoteRequest) (domain.Note, error)

func (*Service) ShowNoteProjection

func (s *Service) ShowNoteProjection(ctx context.Context, req ShowNoteRequest) (domain.Projection, error)

func (*Service) ShowTemplate

func (s *Service) ShowTemplate(_ context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) ShowView

func (s *Service) ShowView(ctx context.Context, req ViewRequest) (domain.Projection, error)

func (*Service) StorageDoctor

func (s *Service) StorageDoctor(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) StorageHydrate added in v0.3.0

func (s *Service) StorageHydrate(ctx context.Context, req DrivebridgeHydrateRequest) (domain.Projection, error)

StorageHydrate rebuilds a working copy on a second device from the attached DriveBridge space, pinning observed file identity (ref/version/sha256), then refreshes the Pinax index. It never touches Capsa sync-state and never emits Capsa remote_write. Conflicts are handed to the existing repair flow.

func (*Service) StorageStatus

func (s *Service) StorageStatus(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) SuggestOrganize

func (s *Service) SuggestOrganize(_ context.Context, req OrganizeSuggestRequest) (domain.Projection, error)

func (*Service) SwitchProject

func (s *Service) SwitchProject(_ context.Context, req ProjectRequest) (domain.Projection, error)

func (*Service) SyncAll

func (s *Service) SyncAll(ctx context.Context, req SyncRequest) (domain.Projection, error)

func (*Service) SyncCancel added in v0.3.0

func (s *Service) SyncCancel(_ context.Context, req SyncCancelRequest) (domain.Projection, error)

SyncCancel 写入一个 sync run 的 cancel 标记。执行器在项边界发现标记后 停止后续项,已完成项的写入与 receipt 保留。标记幂等:对同一 run 重复 cancel 只刷新 requested_at。

func (*Service) SyncConflictsDiff

func (s *Service) SyncConflictsDiff(_ context.Context, req SyncConflictFileRequest) (domain.Projection, error)

func (*Service) SyncConflictsList

func (s *Service) SyncConflictsList(_ context.Context, req SyncConflictsListRequest) (domain.Projection, error)

func (*Service) SyncConflictsResolve

func (s *Service) SyncConflictsResolve(ctx context.Context, req SyncConflictResolveRequest) (domain.Projection, error)

func (*Service) SyncConflictsShow

func (s *Service) SyncConflictsShow(_ context.Context, req SyncConflictFileRequest) (domain.Projection, error)

func (*Service) SyncDaemonInstall added in v0.1.6

func (s *Service) SyncDaemonInstall(_ context.Context, req SyncDaemonInstallRequest) (domain.Projection, error)

SyncDaemonInstall writes a platform-specific service unit (systemd user unit on Linux, launchd plist on macOS) for the sync daemon. It does not start the service; the returned enable_command tells the user how to start it. Windows is unsupported and returns a platform_unsupported error.

func (*Service) SyncDaemonLogs added in v0.1.3

func (s *Service) SyncDaemonLogs(_ context.Context, req SyncDaemonRequest) (domain.Projection, error)

func (*Service) SyncDaemonRun added in v0.1.3

func (s *Service) SyncDaemonRun(ctx context.Context, req SyncDaemonRequest) (domain.Projection, error)

func (*Service) SyncDaemonStart added in v0.1.3

func (s *Service) SyncDaemonStart(_ context.Context, req SyncDaemonRequest) (domain.Projection, error)

func (*Service) SyncDaemonStatus added in v0.1.3

func (s *Service) SyncDaemonStatus(_ context.Context, req SyncDaemonRequest) (domain.Projection, error)

func (*Service) SyncDaemonStop added in v0.1.3

func (s *Service) SyncDaemonStop(_ context.Context, req SyncDaemonRequest) (domain.Projection, error)

func (*Service) SyncDaemonUninstall added in v0.1.6

func (s *Service) SyncDaemonUninstall(_ context.Context, req SyncDaemonInstallRequest) (domain.Projection, error)

SyncDaemonUninstall removes the sync daemon service unit for a vault. It does not stop a running service; the caller is expected to stop it first.

func (*Service) SyncDiff

func (s *Service) SyncDiff(ctx context.Context, req SyncRequest) (domain.Projection, error)

func (*Service) SyncEnv added in v0.1.6

SyncEnv is the entry point for the `pinax sync env` command tree. It dispatches to the per-action service handlers. Plaintext values are accepted transiently and never persisted, logged or emitted in any projection.

func (*Service) SyncIndex

func (s *Service) SyncIndex(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) SyncInit

func (s *Service) SyncInit(ctx context.Context, req SyncInitRequest) (domain.Projection, error)

func (*Service) SyncKeysStatus added in v0.2.0

func (s *Service) SyncKeysStatus(ctx context.Context, req VaultRequest) (domain.Projection, error)

SyncKeysStatus reports which key derivation the vault uses and which one the remote manifest envelope is encrypted under, so a re-encryption migration can be verified objectively: remote_derivation flips legacy→v2 after a push re-encrypts, and unknown means a foreign secret or corrupted state.

func (*Service) SyncLogsFollow added in v0.1.6

func (s *Service) SyncLogsFollow(ctx context.Context, req SyncLogsRequest, emit func(map[string]any) error) error

func (*Service) SyncLogsList

func (s *Service) SyncLogsList(_ context.Context, req SyncLogsRequest) (domain.Projection, error)

func (*Service) SyncLogsPrune

func (s *Service) SyncLogsPrune(_ context.Context, req SyncLogsRequest) (domain.Projection, error)

func (*Service) SyncLogsShow

func (s *Service) SyncLogsShow(_ context.Context, req SyncLogsRequest) (domain.Projection, error)

func (*Service) SyncLogsStatus added in v0.3.0

func (s *Service) SyncLogsStatus(_ context.Context, req SyncLogsRequest) (domain.Projection, error)

SyncLogsStatus 从 vault event JSONL 幂等重放一个 sync run 的 job status 投影。与 receipt(sync logs show)互补:本投影只依据事件流,因此对 崩溃中断(无 receipt/事件前缀)也能给出 accepted/progress 结论。

func (*Service) SyncLogsTail

func (s *Service) SyncLogsTail(_ context.Context, req SyncLogsRequest) (domain.Projection, error)

func (*Service) SyncManifestAudit added in v0.1.6

func (s *Service) SyncManifestAudit(_ context.Context, req SyncManifestMigrationRequest) (domain.Projection, error)

func (*Service) SyncManifestPlan added in v0.1.6

func (s *Service) SyncManifestPlan(ctx context.Context, req SyncManifestMigrationRequest) (domain.Projection, error)

func (*Service) SyncManifestPromote added in v0.1.6

func (s *Service) SyncManifestPromote(_ context.Context, req SyncManifestMigrationRequest) (domain.Projection, error)

func (*Service) SyncManifestRollback added in v0.1.6

func (s *Service) SyncManifestRollback(_ context.Context, req SyncManifestMigrationRequest) (domain.Projection, error)

func (*Service) SyncPull

func (s *Service) SyncPull(ctx context.Context, req SyncRequest) (domain.Projection, error)

func (*Service) SyncPush

func (s *Service) SyncPush(ctx context.Context, req SyncRequest) (domain.Projection, error)

func (*Service) SyncRepoApply added in v0.1.6

func (s *Service) SyncRepoApply(ctx context.Context, req SyncRepoRuntimeRequest) (domain.Projection, error)

SyncRepoApply regenerates the runtime config from the declaration on an already-initialized device. High-risk changes (workspace/namespace/key identity/remote-delete) require explicit --yes.

func (*Service) SyncRepoBootstrap added in v0.1.6

func (s *Service) SyncRepoBootstrap(ctx context.Context, req SyncRepoRuntimeRequest) (domain.Projection, error)

SyncRepoBootstrap is the new-device pull-only first run: it unlocks secrets, compiles + applies the runtime config and writes the source marker. On a device with no local sync receipt it does NOT upload local deletions.

func (*Service) SyncRepoCredential added in v0.1.9

func (s *Service) SyncRepoCredential(_ context.Context, req SyncRepoCredentialRequest) (domain.Projection, error)

SyncRepoCredential mutates or inspects the typed repository-encrypted S3 credential bundle through the credentialctl projectsecrets API. Pinax owns only the s3_credentials.v1 payload type and the projection; KDF/AEAD/Keychain stay in credentialctl.

func (*Service) SyncRepoDoctor added in v0.1.6

func (s *Service) SyncRepoDoctor(_ context.Context, req VaultRequest) (domain.Projection, error)

SyncRepoDoctor diagnoses drift, key identity, device and protected-path state.

func (*Service) SyncRepoInit added in v0.1.6

func (s *Service) SyncRepoInit(_ context.Context, req SyncRepoInitRequest) (domain.Projection, error)

SyncRepoInit creates or updates the repository sync declaration. It is idempotent: re-running with the same workspace preserves the encryption key identity. It never writes plaintext credentials.

func (*Service) SyncRepoMigrateDeviceProfile added in v0.2.0

func (s *Service) SyncRepoMigrateDeviceProfile(ctx context.Context, req SyncRepoMigrateRequest) (domain.Projection, error)

SyncRepoMigrateDeviceProfile is plan-first, atomic and re-entrant (pinax-passphrase-s3-bootstrap task 6.9): it evaluates the migration without writing, returns already_migrated=true for a same-identity re-run, returns migration_conflict when the existing declaration/envelope cannot be verified, and only then applies the migration with envelope-before-declaration ordering and an atomic declaration rename so any failure leaves the previous runtime, declaration and envelope usable.

func (*Service) SyncRepoPlan added in v0.1.6

SyncRepoPlan reports intended changes WITHOUT writing anything.

func (*Service) SyncRepoSecret added in v0.1.6

func (s *Service) SyncRepoSecret(_ context.Context, req SyncRepoSecretRequest) (domain.Projection, error)

SyncRepoSecret mutates or inspects the encrypted secrets asset.

func (*Service) SyncStatus

func (s *Service) SyncStatus(ctx context.Context, req SyncStatusRequest) (domain.Projection, error)

func (*Service) TagNote

func (s *Service) TagNote(ctx context.Context, req NoteTagRequest) (domain.Projection, error)

func (*Service) TaskAdopt added in v0.1.3

func (s *Service) TaskAdopt(_ context.Context, req TaskAdoptRequest) (domain.Projection, error)

func (*Service) TrashList added in v0.1.3

func (s *Service) TrashList(_ context.Context, req TrashRequest) (domain.Projection, error)

func (*Service) TrashPurge added in v0.1.3

func (s *Service) TrashPurge(_ context.Context, req TrashRequest) (domain.Projection, error)

func (*Service) TrashRestore added in v0.1.3

func (s *Service) TrashRestore(ctx context.Context, req TrashRequest) (domain.Projection, error)

func (*Service) ValidateTemplate

func (s *Service) ValidateTemplate(_ context.Context, req TemplateRequest) (domain.Projection, error)

func (*Service) ValidateVault

func (s *Service) ValidateVault(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) VaultDoctor

func (s *Service) VaultDoctor(_ context.Context, req VaultDoctorRequest) (domain.Projection, error)

func (*Service) VaultIgnoreApply added in v0.1.3

func (s *Service) VaultIgnoreApply(_ context.Context, req VaultIgnoreRequest) (domain.Projection, error)

func (*Service) VaultIgnorePlan added in v0.1.3

func (s *Service) VaultIgnorePlan(_ context.Context, req VaultIgnoreRequest) (domain.Projection, error)

func (*Service) VaultIgnoreStatus added in v0.1.3

func (s *Service) VaultIgnoreStatus(_ context.Context, req VaultIgnoreRequest) (domain.Projection, error)

func (*Service) VaultStats

func (s *Service) VaultStats(_ context.Context, req VaultStatsRequest) (domain.Projection, error)

func (*Service) VersionBackends

func (s *Service) VersionBackends(_ context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) VersionChanged

func (s *Service) VersionChanged(ctx context.Context, req VersionChangedRequest) (domain.Projection, error)

func (*Service) VersionDiff

func (s *Service) VersionDiff(ctx context.Context, req VersionDiffRequest) (domain.Projection, error)

func (*Service) VersionHistory

func (s *Service) VersionHistory(ctx context.Context, req VersionHistoryRequest) (domain.Projection, error)

func (*Service) VersionRestoreApply

func (s *Service) VersionRestoreApply(ctx context.Context, req VersionRestoreApplyRequest) (domain.Projection, error)

VersionRestoreApply 消费已保存的 restore plan,把历史 revision 的文件内容写回本地 Markdown。它复用 version backend 的 ReadFile 读取历史内容,只做本地写入: remote_write=false、local_write=true,绝不调用 provider/cloud/MCP 写面。 必须显式 --yes;plan 的 vault hash 与 revision 必须与当前 vault 一致。

func (*Service) VersionRestorePlan

func (s *Service) VersionRestorePlan(ctx context.Context, req VersionRestorePlanRequest) (domain.Projection, error)

func (*Service) VersionShow

func (s *Service) VersionShow(ctx context.Context, req VersionShowRequest) (domain.Projection, error)

func (*Service) VersionSnapshot

func (s *Service) VersionSnapshot(ctx context.Context, req SnapshotRequest) (domain.Projection, error)

func (*Service) VersionStatus

func (s *Service) VersionStatus(ctx context.Context, req VaultRequest) (domain.Projection, error)

func (*Service) WeeklyAppend

func (s *Service) WeeklyAppend(ctx context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) WeeklyOpen

func (s *Service) WeeklyOpen(ctx context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) WeeklyShow

func (s *Service) WeeklyShow(ctx context.Context, req DailyRequest) (domain.Projection, error)

func (*Service) WithNowFunc added in v0.2.0

func (s *Service) WithNowFunc(now func() time.Time) *Service

func (*Service) WithPromptBridge added in v0.3.0

func (s *Service) WithPromptBridge(bridge *promptbridge.Bridge) *Service

WithPromptBridge overrides the federated prompt bridge (tests and embedded consumers); production commands lazily open the shared engine.

func (*Service) WorkbenchStatus added in v0.1.3

func (s *Service) WorkbenchStatus(ctx context.Context, req APIRequest) (domain.Projection, error)

func (*Service) WriterApply added in v0.3.0

func (s *Service) WriterApply(ctx context.Context, root string, change CollaborationChange, digest, authorization string, identity RemoteOperationIdentity) (operation.View, error)

WriterApply saves an unchanged preview under the supervised writer identity. The operation identity is change.operation_id — required, and the only identity a recovery query may use; blind retries under a fresh identity are structurally impossible because the ledger binds idempotency to this operation id.

func (*Service) WriterCapture added in v0.3.0

WriterCapture projects inbox.capture under the supervised writer gate. Operation identity is REQUIRED (unlike the legacy REST surface): a capture without X-Pinax-Operation-ID plus Idempotency-Key never enters the ledger and fails closed with operation_identity_required.

func (*Service) WriterDailyApply added in v0.3.1

func (s *Service) WriterDailyApply(ctx context.Context, req WriterDailyRequest, p WriterDailyProposal, authorization string) (operation.View, error)

func (*Service) WriterDailyEditApply added in v0.3.1

func (s *Service) WriterDailyEditApply(ctx context.Context, req WriterDailyRequest, p WriterDailyEditProposal, authorization string) (operation.View, error)

func (*Service) WriterDailyEditPropose added in v0.3.1

func (s *Service) WriterDailyEditPropose(ctx context.Context, req WriterDailyEditRequest) (WriterDailyEditProposal, error)

func (*Service) WriterDailyEditorSource added in v0.3.1

func (s *Service) WriterDailyEditorSource(ctx context.Context, req WriterDailyEditorSourceRequest) (WriterEditorSource, error)

WriterDailyEditorSource only reads source bytes. It does not authorize a mutation, create a proposal or make ordinary system-page writes available.

func (*Service) WriterDailyPropose added in v0.3.1

func (s *Service) WriterDailyPropose(ctx context.Context, req WriterDailyRequest) (WriterDailyProposal, error)

func (*Service) WriterEditorSource added in v0.3.1

func (s *Service) WriterEditorSource(ctx context.Context, req WriterEditorSourceRequest) (WriterEditorSource, error)

WriterEditorSource does not initialize a vault, refresh an index, create a snapshot or write an operation. It reads bounded candidates through os.Root, rejects ambiguous identities, and checks the source digest after selection.

func (*Service) WriterOrganizeApply added in v0.3.0

func (s *Service) WriterOrganizeApply(ctx context.Context, root, planID, snapshotMessage string, allowStale bool) (domain.Projection, error)

WriterOrganizeApply applies a saved plan id as-is. The approval gate is the writer.organizer scope (never a request field), and the projection always requests a snapshot first: an empty snapshot message defaults to one derived from the plan id so no apply path can skip the snapshot gate. Consumption is explicit on BOTH plan shapes: scoped plans are guarded by the scoped machinery (status stays "planned" until consumed), and legacy whole-vault plans get the same writer-layer guard — an applied or partial plan re-fails with organize_plan_not_planned instead of silently re-planning, and the consumed status is persisted back to the plan file.

func (*Service) WriterOrganizePlan added in v0.3.0

func (s *Service) WriterOrganizePlan(ctx context.Context, root string, noteRefs []string) (domain.Projection, error)

WriterOrganizePlan generates a saved organize plan for the human session. note_refs present scopes the plan to exactly those objects; omitted means the whole-vault plan. Either way the plan is saved under its plan_id so apply can reference it — a preview-only surface would be unusable for the host confirmation flow.

func (*Service) WriterPropose added in v0.3.0

func (s *Service) WriterPropose(ctx context.Context, root string, change CollaborationChange) (WriterProposal, error)

WriterPropose prepares an edit proposal without writing. The preview carries the exact before/after and the digest apply must echo unchanged.

func (*Service) WriterTagsApply added in v0.3.1

func (s *Service) WriterTagsApply(ctx context.Context, req WriterTagsRequest, plan WriterTagsPlan, authorization string) (operation.View, error)

WriterTagsApply is not a multi-file transaction. The parent binds the plan; each child uses the existing snapshot/TagNote/receipt engine. Interrupted parents are inspect-only on replay, never implicit resume commands.

func (*Service) WriterTagsLookup added in v0.3.1

func (s *Service) WriterTagsLookup(ctx context.Context, req WriterTagsLookupRequest) (operation.View, error)

WriterTagsLookup returns the original parent operation, not current note state. It grants no source access and cannot resume or reconcile a mutation.

func (*Service) WriterTagsPlan added in v0.3.1

func (s *Service) WriterTagsPlan(ctx context.Context, req WriterTagsPlanRequest) (WriterTagsPlan, error)

WriterTagsPlan prepares tag-only differences from exact owner source bytes. Nothing is persisted, including operation identities or proposal contents.

type ShareRequest added in v0.1.3

type ShareRequest struct {
	VaultPath string
	Profile   string
	Out       string
	Scope     string
	Host      string
	Port      int
	AllowLAN  bool
	Readonly  bool
	NoAuth    bool
	TokenFile string
	Once      bool
	View      string
	NoEmbed   bool
}

type ShowNoteRequest

type ShowNoteRequest struct {
	VaultPath        string
	NoteRef          string
	View             string
	Display          string
	Snapshot         string
	Runs             bool
	EmbedAttachments string
	MaxEmbedDepth    int
	MaxEmbedBytes    int
	MaxPreviewBytes  int
}

type SnapshotRequest

type SnapshotRequest struct {
	VaultPath string
	Message   string
}

type StagedAttachment added in v0.3.1

type StagedAttachment struct {
	Name   string
	MIME   string
	SHA256 string
	Bytes  []byte
}

StagedAttachment is owner-only: inputrequests verifies ownership and receipt before supplying bytes. No remote request may supply a source path.

type StorageRequest

type StorageRequest struct {
	VaultPath string
	Root      string
	Bucket    string
	Region    string
	Prefix    string
	Endpoint  string
	Profile   string
}

type SyncCancelRequest added in v0.3.0

type SyncCancelRequest struct {
	VaultPath string
	RunID     string
	Reason    string
}

SyncCancelRequest 是 `pinax sync cancel` 的入参。RunID 为空时解析当前 作用域 claim 指向的活跃 run。

type SyncConflictFileRequest

type SyncConflictFileRequest struct {
	VaultPath string
	File      string
}

type SyncConflictResolveRequest

type SyncConflictResolveRequest struct {
	Operation RemoteOperationIdentity

	VaultPath  string
	File       string
	KeepLocal  bool
	KeepRemote bool
	MergedPath string
	Yes        bool
	// contains filtered or unexported fields
}

type SyncConflictsListRequest

type SyncConflictsListRequest struct {
	VaultPath string
}

type SyncCredentialResolver added in v0.1.9

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

SyncCredentialResolver unlocks one repository-encrypted S3 credential entry and returns the AWS SDK credentials provider plus the open Snapshot (caller must Close it after the sync run). It uses the credentialctl projectsecrets Resolver so pinax does not own KDF/AEAD/Keychain.

func NewSyncCredentialResolver added in v0.1.9

func NewSyncCredentialResolver(projectID, repositoryID, entryName string) *SyncCredentialResolver

NewSyncCredentialResolver builds a resolver for one declared S3 credential identity. The repository id is the vault/repository identity recorded in the envelope; pinax passes its sync workspace id.

func (*SyncCredentialResolver) Resolve added in v0.1.9

Resolve unlocks the bundle at repoRoot/.pinax/project-secrets.yaml using the supplied unlock source and returns the AWS SDK credentials provider. The returned Snapshot MUST be Closed by the caller after the sync operation.

type SyncDaemonInstallRequest added in v0.1.6

type SyncDaemonInstallRequest struct {
	VaultPath string
}

SyncDaemonInstallRequest configures a sync daemon service unit for a vault.

type SyncDaemonRequest added in v0.1.3

type SyncDaemonRequest struct {
	VaultPath    string
	Target       string
	Yes          bool
	Once         bool
	PollInterval time.Duration
	SyncTimeout  time.Duration
	LogLimit     int
	LiveEvents   syncdaemon.EventSink
	// ProjectUnlockSource, when set, unlocks the repository-encrypted credential
	// bundle for daemon poll/pull/push. The daemon never opens an interactive
	// prompt: a nil source in repository-encrypted mode drives the credential
	// gate into a degraded state (pinax-passphrase-s3-bootstrap task 6.7).
	ProjectUnlockSource projectsecrets.UnlockSource
	// UnlockFlags carries the CLI unlock flag values so SyncDaemonStart can
	// forward them to the spawned `daemon run` subprocess; the resolved source
	// itself cannot cross a process boundary.
	UnlockFlags SyncDaemonUnlockFlags
}

type SyncDaemonUnlockFlags added in v0.2.0

type SyncDaemonUnlockFlags struct {
	Unlock         string
	UnlockRef      string
	PassphraseFile string
	EnvVar         string
}

SyncDaemonUnlockFlags mirrors the daemon unlock CLI flags. Only non-interactive sources are permitted; prompt is rejected at the CLI before reaching here.

type SyncEnvRequest added in v0.1.6

type SyncEnvRequest struct {
	VaultPath string
	Action    string // init, set, list, unlock, clean, doctor
	// For set: the env key name and plaintext value (transient, never persisted).
	Key      string
	Value    string
	Provider string
	// For unlock --materialize: keys to allowlist for the materialized file.
	Allowlist []string
	// Materialize requests writing the plaintext to the managed runtime path.
	Materialize bool
}

SyncEnvRequest drives the `pinax sync env` command tree.

type SyncEvent added in v0.2.0

type SyncEvent struct {
	Type           string            `json:"type"`
	Phase          string            `json:"phase"`
	Direction      string            `json:"direction,omitempty"`
	RunID          string            `json:"run_id,omitempty"`
	Completed      int               `json:"completed,omitempty"`
	Total          int               `json:"total,omitempty"`
	BytesCompleted int64             `json:"bytes_completed,omitempty"`
	BytesTotal     int64             `json:"bytes_total,omitempty"`
	Operation      string            `json:"operation,omitempty"`
	ChangeCode     string            `json:"change_code,omitempty"`
	Path           string            `json:"path,omitempty"`
	PathHash       string            `json:"path_hash,omitempty"`
	Status         string            `json:"status,omitempty"`
	RevisionID     string            `json:"revision_id,omitempty"`
	RemoteWrite    bool              `json:"remote_write"`
	LocalWrite     bool              `json:"local_write"`
	Facts          map[string]string `json:"facts,omitempty"`
}

SyncEvent is the provider-neutral progress projection shared by one-shot sync commands and the daemon bridge. Paths are already subject to the command's path policy before they reach a sink.

type SyncEventSink added in v0.2.0

type SyncEventSink func(SyncEvent)

type SyncInitRequest

type SyncInitRequest struct {
	VaultPath   string
	Endpoint    string
	WorkspaceID string
	DeviceID    string
	SecretRef   string
}

type SyncJobStatus added in v0.3.0

type SyncJobStatus struct {
	SchemaVersion string         `json:"schema_version"`
	RunID         string         `json:"run_id"`
	Phase         string         `json:"phase"`
	Status        string         `json:"status,omitempty"`
	ErrorCode     string         `json:"error_code,omitempty"`
	Completed     int            `json:"completed"`
	Total         int            `json:"total,omitempty"`
	ChangeCounts  map[string]int `json:"change_counts,omitempty"`
	EventCount    int            `json:"event_count"`
	FirstEventAt  string         `json:"first_event_at,omitempty"`
	LastEventAt   string         `json:"last_event_at,omitempty"`
}

SyncJobStatus 是 sync run 的可重放状态汇总。它是 event JSONL 的纯函数: 同一事件流(含崩溃后不完整的前缀流)重放任意次得到同一结论。

func ReplaySyncJobStatus added in v0.3.0

func ReplaySyncJobStatus(runID string, events []syncJobStatusEvent) SyncJobStatus

ReplaySyncJobStatus 按序重放属于同一 run 的事件并汇总状态:

  • 只有受理标记、尚无逐项事件 → accepted;
  • 已有逐项事件但无终态事件(崩溃/中断前缀流)→ progress;
  • 出现终态 run 级事件 → terminal,status/error 取最后一个终态事件 (append-only 日志下重复终态以最后一条为准);
  • 逐项事件各计一次 Completed,terminal 时 Total == Completed。

幂等性:本函数是事件切片的纯函数,无时钟、随机或进程内状态。

type SyncLogsRequest

type SyncLogsRequest struct {
	VaultPath    string
	RunID        string
	Limit        int
	Keep         int
	MaxAgeDays   int
	Yes          bool
	PollInterval time.Duration
}

type SyncManifestCapabilityState added in v0.1.6

type SyncManifestCapabilityState struct {
	SchemaVersion         string `json:"schema_version"`
	Status                string `json:"status"`
	ManifestVersion       string `json:"manifest_version"`
	DeviceID              string `json:"device_id"`
	PlanID                string `json:"plan_id,omitempty"`
	AuditID               string `json:"audit_id,omitempty"`
	PromotedAt            string `json:"promoted_at,omitempty"`
	FirstV2RemoteRevision string `json:"first_v2_remote_revision,omitempty"`
}

type SyncManifestIdentityAllocation added in v0.1.6

type SyncManifestIdentityAllocation struct {
	Path       string `json:"path"`
	ObjectID   string `json:"object_id"`
	ObjectKind string `json:"object_kind"`
}

type SyncManifestIdentityAudit added in v0.1.6

type SyncManifestIdentityAudit struct {
	SchemaVersion string                                 `json:"schema_version"`
	AuditID       string                                 `json:"audit_id"`
	Eligible      bool                                   `json:"eligible"`
	DeviceID      string                                 `json:"device_id"`
	EntryCount    int                                    `json:"entry_count"`
	ResolvedCount int                                    `json:"resolved_count"`
	Issues        []SyncManifestIdentityIssue            `json:"issues,omitempty"`
	Identities    map[string]pinaxcloud.ManifestIdentity `json:"-"`
}

type SyncManifestIdentityIssue added in v0.1.6

type SyncManifestIdentityIssue struct {
	Path       string `json:"path"`
	ObjectKind string `json:"object_kind"`
	Code       string `json:"code"`
}

type SyncManifestMigrationPlan added in v0.1.6

type SyncManifestMigrationPlan struct {
	SchemaVersion       string                           `json:"schema_version"`
	PlanID              string                           `json:"plan_id"`
	AuditID             string                           `json:"audit_id"`
	FromVersion         string                           `json:"from_version"`
	ToVersion           string                           `json:"to_version"`
	DeviceID            string                           `json:"device_id"`
	EntryCount          int                              `json:"entry_count"`
	IdentityAllocations []SyncManifestIdentityAllocation `json:"identity_allocations,omitempty"`
	SavedPath           string                           `json:"saved_path"`
	CreatedAt           string                           `json:"created_at"`
}

type SyncManifestMigrationRequest added in v0.1.6

type SyncManifestMigrationRequest struct {
	VaultPath        string
	DeviceID         string
	PlanID           string
	RemoteCapability string
	Save             bool
	Yes              bool
}

type SyncManifestPromotionReceipt added in v0.1.6

type SyncManifestPromotionReceipt struct {
	SchemaVersion    string `json:"schema_version"`
	ReceiptID        string `json:"receipt_id"`
	PlanID           string `json:"plan_id"`
	AuditID          string `json:"audit_id"`
	FromVersion      string `json:"from_version"`
	ToVersion        string `json:"to_version"`
	DeviceID         string `json:"device_id"`
	RemoteCapability string `json:"remote_capability"`
	Status           string `json:"status"`
	SavedPath        string `json:"saved_path"`
	CreatedAt        string `json:"created_at"`
}

type SyncRepoCredentialRequest added in v0.1.9

type SyncRepoCredentialRequest struct {
	VaultPath  string
	Action     string // set, list, remove, init
	Name       string
	Kind       string // credential
	Format     string // s3_credentials.v1
	Version    string
	Payload    []byte // for set; transient, wiped after use
	Passphrase []byte // authorizes mutation / proves unlock
	Project    string
	Repository string
}

SyncRepoCredentialRequest drives the typed repository-encrypted S3/COS credential bundle (s3_credentials.v1). Plaintext is accepted only via the Payload field (filled from secure stdin by the CLI) and never persisted outside the credentialctl envelope; structured output carries metadata only.

type SyncRepoInitRequest added in v0.1.6

type SyncRepoInitRequest struct {
	VaultPath       string
	BackendKind     string
	Endpoint        string
	WorkspaceID     string
	TenantID        string
	AppID           string
	CredentialID    string
	EncryptionKeyID string
	RemoteDelete    string
	// ExistingIfPresent reuses an existing declaration's identity fields when the
	// repo is re-initialized (idempotent init).
	ExistingIfPresent bool
}

SyncRepoInitRequest initializes a repository sync declaration.

type SyncRepoMigrateRequest added in v0.2.0

type SyncRepoMigrateRequest struct {
	VaultPath        string
	UnlockSource     projectsecrets.UnlockSource
	RememberKeychain *projectsecrets.KeychainSource
	Yes              bool
}

SyncRepoMigrateRequest converts the current device-profile runtime into the portable repository-encrypted declaration and envelope without remote writes.

type SyncRepoRuntimeRequest added in v0.1.6

type SyncRepoRuntimeRequest struct {
	VaultPath string
	DeviceID  string
	Yes       bool
	// UnlockProvider overrides the default provider (for tests / explicit choice).
	UnlockProvider pinaxremote.UnlockProvider
	// ProjectUnlockSource, when set, unlocks a repository-encrypted S3/COS
	// credential bundle via credentialctl before compiling the runtime. Used by
	// `bootstrap --unlock` to prove the envelope unlocks (fail-closed) as part
	// of the staged bootstrap transaction. Nil is allowed when the declaration
	// is not in repository-encrypted mode.
	ProjectUnlockSource projectsecrets.UnlockSource
	// RememberKeychain, when non-nil, receives the already verified repository
	// passphrase after both credential and content-key entries authenticate.
	RememberKeychain *projectsecrets.KeychainSource
	// Pull requests the staged transaction to proceed to a pull after compiling
	// the pull-only runtime. The compile-only safety property (no remote write
	// until pull succeeds) holds regardless.
	Pull bool
}

SyncRepoRuntimeRequest drives bootstrap, plan and apply.

type SyncRepoSecretRequest added in v0.1.6

type SyncRepoSecretRequest struct {
	VaultPath string
	Action    string // set, import, list, remove
	Name      string
	Identity  string
	Kind      string // credential, encryption_key
	Plaintext string // for set; transient
	Provider  string // fake, env
}

SyncRepoSecretRequest drives secret set/import/list/remove. Plaintext is accepted only transiently and never persisted outside the encrypted asset.

type SyncRequest

type SyncRequest struct {
	Operation RemoteOperationIdentity

	VaultPath      string
	Target         string
	Yes            bool
	DryRun         bool
	BaseRevision   string
	RemoteRevision string
	Endpoint       string
	WorkspaceID    string
	DeviceID       string
	SecretRef      string
	PathPolicy     string
	Preview        string
	Limit          int
	ContentDiff    bool
	Progress       string
	LiveEvents     SyncEventSink
	// ProjectUnlockSource, when set and the runtime config is in repository-
	// encrypted S3 credential mode, unlocks the typed bundle and injects it as
	// the AWS SDK credentials provider for the sync run. Nil keeps the existing
	// device-profile credential resolution.
	ProjectUnlockSource projectsecrets.UnlockSource
	// contains filtered or unexported fields
}

type SyncRunReceipt

type SyncRunReceipt struct {
	OperationID          string               `json:"operation_id,omitempty"`
	SchemaVersion        string               `json:"schema_version"`
	RunID                string               `json:"run_id"`
	Command              string               `json:"command"`
	Target               string               `json:"target"`
	Direction            string               `json:"direction"`
	Status               string               `json:"status"`
	RemoteWrite          bool                 `json:"remote_write"`
	LocalWrite           bool                 `json:"local_write"`
	BackendKind          string               `json:"backend_kind"`
	Transport            string               `json:"transport"`
	WorkspaceID          string               `json:"workspace_id"`
	VaultID              string               `json:"vault_id"`
	DeviceID             string               `json:"device_id"`
	RequestID            string               `json:"request_id"`
	BaseRevision         string               `json:"base_revision"`
	RemoteRevisionBefore string               `json:"remote_revision_before"`
	RevisionID           string               `json:"revision_id"`
	ManifestBlobID       string               `json:"manifest_blob_id"`
	Counts               map[string]int       `json:"counts"`
	TimingsMS            map[string]int64     `json:"timings_ms"`
	Error                *domain.CommandError `json:"error"`
	Actions              []domain.Action      `json:"actions"`
	Redaction            SyncRunRedaction     `json:"redaction"`
	Operations           []syncplan.Operation `json:"operations,omitempty"`
	CreatedAt            string               `json:"created_at"`
}

type SyncRunRedaction

type SyncRunRedaction struct {
	PathPolicy   string `json:"path_policy"`
	SecretPolicy string `json:"secret_policy"`
}

type SyncStatusRequest

type SyncStatusRequest struct {
	VaultPath string
}

type TaskAdoptRequest added in v0.1.3

type TaskAdoptRequest struct {
	VaultPath string
	ItemID    string
	Yes       bool
}

type TemplateCatalogItem

type TemplateCatalogItem struct {
	Name               string                                     `json:"name"`
	Source             string                                     `json:"source"`
	Kind               string                                     `json:"kind"`
	Title              string                                     `json:"title,omitempty"`
	UseCases           []string                                   `json:"use_cases,omitempty"`
	Aliases            []string                                   `json:"aliases,omitempty"`
	Difficulty         string                                     `json:"difficulty,omitempty"`
	Starter            bool                                       `json:"starter"`
	ScenarioID         string                                     `json:"scenario_id,omitempty"`
	TemplateKind       string                                     `json:"template_kind,omitempty"`
	Intents            []string                                   `json:"intents,omitempty"`
	VariableSchema     map[string]templateengine.VariableMetadata `json:"variable_schema,omitempty"`
	OutputPolicy       templateengine.TemplateOutputPolicy        `json:"output_policy,omitempty"`
	AfterCreateActions []templateengine.TemplateActionMetadata    `json:"after_create_actions,omitempty"`
	Maturity           string                                     `json:"maturity,omitempty"`
	ProofGate          templateengine.TemplateProofGate           `json:"proof_gate,omitempty"`
	Pack               TemplatePack                               `json:"pack,omitempty"`
	Lifecycle          string                                     `json:"lifecycle,omitempty"`
	Replacement        string                                     `json:"replacement,omitempty"`
	Metrics            map[string]string                          `json:"metrics,omitempty"`
}

type TemplatePack added in v0.1.3

type TemplatePack struct {
	ID        string `json:"id,omitempty"`
	Source    string `json:"source,omitempty"`
	Version   string `json:"version,omitempty"`
	Readiness string `json:"readiness,omitempty"`
}

type TemplateRequest

type TemplateRequest struct {
	VaultPath  string
	Name       string
	Title      string
	Project    string
	Tags       []string
	SourcePath string
	Body       string
	UseStdin   bool
	Vars       map[string]string
	Yes        bool
	Overwrite  bool
	Engine     string
	SaveRun    string
	Run        string
	Runs       bool
	Pack       string
	UseCase    string
	Intent     string
}

type TrashRequest added in v0.1.3

type TrashRequest struct {
	VaultPath string
	ObjectRef string
	DryRun    bool
	Hard      bool
	Yes       bool
}

type TrustCenterMetrics added in v0.1.6

type TrustCenterMetrics struct {
	ContextReuse        float64 `json:"context_reuse"`
	SourceResolvability float64 `json:"source_resolvability"`
	ProposalAcceptance  float64 `json:"proposal_acceptance"`
	HandoffContinuation float64 `json:"handoff_continuation"`
	SilentPromotion     int     `json:"silent_promotion"`
	StaleResolved       int     `json:"stale_resolved"`
	ConflictResolved    int     `json:"conflict_resolved"`
	WindowDays          int     `json:"window_days"`
}

TrustCenterMetrics 是本地 trust metrics 投影。 只保存计数、比例和时间窗口,不保存正文或完整会话。

type TrustCenterProjection added in v0.1.6

type TrustCenterProjection struct {
	SchemaVersion string             `json:"schema_version"`
	Continuity    TrustCenterSection `json:"continuity"`
	Inbox         TrustCenterSection `json:"inbox"`
	Activity      TrustCenterSection `json:"activity"`
	Metrics       TrustCenterMetrics `json:"metrics"`
	Experimental  bool               `json:"experimental"`
}

TrustCenterProjection 是 Agent Trust Center 的只读投影。 聚合 bounded recent activity、continuity summary、inbox counts、 proposal decisions、adapter health 和 section errors。

type TrustCenterRequest added in v0.1.6

type TrustCenterRequest struct {
	VaultPath string
	Scope     agentprotocol.Scope
}

TrustCenterRequest 描述一次 Trust Center 投影请求。

type TrustCenterSection added in v0.1.6

type TrustCenterSection struct {
	Status string      `json:"status"` // "ok" | "degraded" | "unavailable"
	Error  string      `json:"error,omitempty"`
	Data   interface{} `json:"data,omitempty"`
}

TrustCenterSection 是 Trust Center 的一个 section,支持 partial success。

type VaultDoctorRequest

type VaultDoctorRequest struct {
	VaultPath  string
	StaleAfter time.Duration
}

type VaultHealthService

type VaultHealthService struct{}

func (VaultHealthService) Issues

func (VaultHealthService) Issues(root string, facts []noteFact, stats domain.VaultStats, staleAfter time.Duration) []domain.VaultIssue

type VaultIgnoreRequest added in v0.1.3

type VaultIgnoreRequest struct {
	VaultPath string
	Yes       bool
}

type VaultObjectCandidate

type VaultObjectCandidate = domain.VaultObjectCandidate

type VaultRequest

type VaultRequest struct {
	VaultPath string
	Query     string
}

type VaultStatsRequest

type VaultStatsRequest struct {
	VaultPath string
}

type VersionChangedRequest

type VersionChangedRequest struct {
	VaultPath     string
	SinceRevision string
}

type VersionDiffRequest

type VersionDiffRequest struct {
	VaultPath      string
	BaseRevision   string
	TargetRevision string
}

type VersionHistoryRequest

type VersionHistoryRequest struct {
	VaultPath string
	Limit     int
}

type VersionRestoreApplyRequest

type VersionRestoreApplyRequest struct {
	VaultPath string
	PlanID    string
	Yes       bool
	// AllowStale 显式放行 restore_plan_stale 守卫(逃生门)。
	AllowStale bool
}

VersionRestoreApplyRequest drives version restore apply.

type VersionRestorePlanRequest

type VersionRestorePlanRequest struct {
	VaultPath string
	Path      string
	Revision  string
}

type VersionShowRequest

type VersionShowRequest struct {
	VaultPath string
	Path      string
	Revision  string
}

type ViewRequest

type ViewRequest struct {
	VaultPath     string
	Name          string
	Tags          []string
	Group         string
	Folder        string
	Kind          string
	Status        string
	Sort          string
	Limit         int
	CreatedAfter  string
	UpdatedBefore string
	Yes           bool
	Language      string
	Query         string
	Columns       []string
	Display       string
	GroupBy       string
	CalendarField string
	BoardColumn   string
}

type WorkbenchProjectionRequest added in v0.3.0

type WorkbenchProjectionRequest struct {
	ProjectRef string
	ConfigDir  string
	TTLSeconds int
	Now        time.Time
}

type WorkbenchProjectionResult added in v0.3.0

type WorkbenchProjectionResult struct {
	Projection domain.WorkbenchContinuityProjection
}

type WorkflowRecommendation added in v0.1.3

type WorkflowRecommendation struct {
	Template           string                                  `json:"template"`
	ScenarioID         string                                  `json:"scenario_id,omitempty"`
	Maturity           string                                  `json:"maturity,omitempty"`
	Pack               TemplatePack                            `json:"pack,omitempty"`
	FitReason          string                                  `json:"fit_reason,omitempty"`
	PreviewCommand     string                                  `json:"preview_command,omitempty"`
	CreateCommand      string                                  `json:"create_command,omitempty"`
	EvidencePath       string                                  `json:"evidence_path,omitempty"`
	ProofGate          templateengine.TemplateProofGate        `json:"proof_gate,omitempty"`
	AfterCreateActions []templateengine.TemplateActionMetadata `json:"after_create_actions,omitempty"`
	Lifecycle          string                                  `json:"lifecycle,omitempty"`
	Executable         bool                                    `json:"executable"`
	Replacement        string                                  `json:"replacement,omitempty"`
}

type WriterCaptureRequest added in v0.3.0

type WriterCaptureRequest struct {
	VaultPath string
	Title     string
	Body      string
	Tags      []string
	Slug      string
	Dir       string
}

WriterCaptureRequest is the frozen writer.capture payload (pinax.writer.capture.request.v1alpha1): bounded capture content only. Approval is not a request field — the host grants the writer.capture scope and the caller supplies the operation identity.

type WriterDailyEditProposal added in v0.3.1

type WriterDailyEditProposal struct {
	SchemaVersion string               `json:"schema_version"`
	Date          string               `json:"date"`
	Timezone      string               `json:"timezone"`
	ObjectID      string               `json:"object_id"`
	Preview       CollaborationPreview `json:"preview"`
	Digest        string               `json:"preview_digest"`
}

type WriterDailyEditRequest added in v0.3.1

type WriterDailyEditRequest struct {
	Daily    WriterDailyRequest
	ObjectID string
	Revision string
	Body     string
}

These owner service types are not yet HTTP contracts. Bodies remain in memory; only digests and the shared operation receipt enter the ledger.

type WriterDailyEditorSourceRequest added in v0.3.1

type WriterDailyEditorSourceRequest struct {
	Source   WriterEditorSourceRequest
	Date     string
	Timezone string
}

type WriterDailyProposal added in v0.3.1

type WriterDailyProposal struct {
	SchemaVersion        string `json:"schema_version"`
	OperationID          string `json:"operation_id"`
	Date                 string `json:"date"`
	Timezone             string `json:"timezone"`
	ObjectID             string `json:"object_id"`
	Path                 string `json:"path"`
	Title                string `json:"title"`
	Before               string `json:"before"`
	After                string `json:"after"`
	TemplateDigest       string `json:"template_digest"`
	PreviewDigest        string `json:"preview_digest"`
	CreatedAt            string `json:"created_at"`
	BindingID            string `json:"binding_id"`
	FrontmatterProtected bool   `json:"frontmatter_protected"`
}

The proposal body lives only in the caller's memory. The ledger stores a digest and bounded identity/receipt facts, never this struct or its text.

type WriterDailyRequest added in v0.3.1

type WriterDailyRequest struct {
	VaultPath   string
	Session     ReaderSessionInfo
	OperationID string
	Date        string
	Timezone    string
	// Private per-server key, never exposed to the client or persisted.
	PreviewSecret []byte
}

type WriterEditorBudget added in v0.3.1

type WriterEditorBudget struct {
	MaxSourceBytes int `json:"max_source_bytes"`
	MaxBodyBytes   int `json:"max_body_bytes"`
	SourceBytes    int `json:"source_bytes"`
	BodyBytes      int `json:"body_bytes"`
}

type WriterEditorMetadata added in v0.3.1

type WriterEditorMetadata struct {
	NoteID string   `json:"note_id"`
	Title  string   `json:"title"`
	Tags   []string `json:"tags"`
	Status string   `json:"status"`
	Kind   string   `json:"kind"`
}

WriterEditorMetadata is an informational whitelist, not writable frontmatter.

type WriterEditorSource added in v0.3.1

type WriterEditorSource struct {
	SchemaVersion        string               `json:"schema_version"`
	ObjectID             string               `json:"object_id"`
	Revision             string               `json:"revision"`
	Body                 string               `json:"body"`
	BodyDigest           string               `json:"body_digest"`
	Editable             bool                 `json:"editable"`
	ReadonlyReason       string               `json:"readonly_reason"`
	FrontmatterProtected bool                 `json:"frontmatter_protected"`
	ProtectedMetadata    WriterEditorMetadata `json:"protected_metadata"`
	Budget               WriterEditorBudget   `json:"budget"`
}

type WriterEditorSourceRequest added in v0.3.1

type WriterEditorSourceRequest struct {
	VaultPath string
	ObjectID  string
	Revision  string
	Session   ReaderSessionInfo
}

WriterEditorSourceRequest selects a live, exact revision by object identity. Unlike source-export this projection is never built from the reader AST.

type WriterProposal added in v0.3.0

type WriterProposal = CollaborationPreview

WriterProposal is the prepared preview returned by propose; the shapes mirror the collaboration preview exactly (no widened HTTP form).

type WriterTagPlanItem added in v0.3.1

type WriterTagPlanItem struct {
	ObjectID string   `json:"object_id"`
	Revision string   `json:"revision"`
	Path     string   `json:"path"`
	Before   []string `json:"before"`
	After    []string `json:"after"`
}

type WriterTagTarget added in v0.3.1

type WriterTagTarget struct {
	ObjectID string `json:"object_id"`
	Revision string `json:"revision"`
}

Owner-only types: public transport contracts and apply are separate slices. Selection is explicit; this is never a claim to have migrated a whole vault.

type WriterTagsLookupRequest added in v0.3.1

type WriterTagsLookupRequest struct {
	VaultPath   string
	Session     ReaderSessionInfo
	OperationID string
}

WriterTagsLookupRequest never carries a proposal, tag draft or preview key. Session info is supplied by the trusted host, not transport request fields.

type WriterTagsPlan added in v0.3.1

type WriterTagsPlan struct {
	SchemaVersion string              `json:"schema_version"`
	OperationID   string              `json:"operation_id"`
	Operation     string              `json:"operation"`
	OldTag        string              `json:"old_tag"`
	OldTagID      string              `json:"old_tag_id"`
	NewTag        string              `json:"new_tag"`
	NewTagID      string              `json:"new_tag_id"`
	Items         []WriterTagPlanItem `json:"items"`
	Digest        string              `json:"preview_digest"`
}

type WriterTagsPlanRequest added in v0.3.1

type WriterTagsPlanRequest struct {
	Writer    WriterTagsRequest
	Operation string
	OldTag    string
	NewTag    string
	Targets   []WriterTagTarget
}

type WriterTagsRequest added in v0.3.1

type WriterTagsRequest struct {
	VaultPath     string
	Session       ReaderSessionInfo
	OperationID   string
	PreviewSecret []byte
}

Source Files

Directories

Path Synopsis
Package briefingops owns app-layer briefing workflows behind the app.Service facade.
Package briefingops owns app-layer briefing workflows behind the app.Service facade.
Package knowledgeops owns allowlisted knowledge projection export rules behind the app.Service facade.
Package knowledgeops owns allowlisted knowledge projection export rules behind the app.Service facade.
Package noteops owns app-layer note workflows behind the app.Service facade.
Package noteops owns app-layer note workflows behind the app.Service facade.
Package planningops owns app-layer planning workflows behind the app.Service facade.
Package planningops owns app-layer planning workflows behind the app.Service facade.
Package publishops owns pure rules for the publish command family.
Package publishops owns pure rules for the publish command family.
Package searchops owns app-layer search and query workflows behind the app.Service facade.
Package searchops owns app-layer search and query workflows behind the app.Service facade.
Package syncops owns app-layer cloud and backend sync workflows behind the app.Service facade.
Package syncops owns app-layer cloud and backend sync workflows behind the app.Service facade.
Package templateops owns app-layer template and journal workflows behind the app.Service facade.
Package templateops owns app-layer template and journal workflows behind the app.Service facade.
Package vaultops owns app-layer vault maintenance workflows behind the app.Service facade.
Package vaultops owns app-layer vault maintenance workflows behind the app.Service facade.
Package versionops owns app-layer version-control workflows behind the app.Service facade.
Package versionops owns app-layer version-control workflows behind the app.Service facade.

Jump to

Keyboard shortcuts

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