Documentation
¶
Overview ¶
Package mount is how a host names a cloud folder for a session to mount: the binding, its credential, and the parameter names providers read.
Index ¶
Constants ¶
const ( ProviderGoogleDrive = "gdrive" ProviderMicrosoft = "msgraph" ParamFolderID = "folderId" ParamName = "name" ParamDriveID = "driveId" ParamItemID = "itemId" ParamSiteID = "siteId" // ParamAccount selects a Microsoft account kind on a bind ("organization" or "personal"). ParamAccount = "account" )
ProviderGoogleDrive is the bind kind for Drive. ProviderMicrosoft is the bind kind for OneDrive and SharePoint libraries.
const WorkspacePoint = "/workspace"
WorkspacePoint is the only top-level mount. Backends live at /workspace/<name> via Tree(At(...)).
Variables ¶
var ErrInvalidBinding = errors.New("mount: invalid binding")
ErrInvalidBinding is a binding or alias that Validate or ValidAlias rejects.
Functions ¶
func ValidAlias ¶
ValidAlias checks that alias is one path segment and not a name the workspace keeps for itself (work, skills, workspace).
Types ¶
type Binding ¶
type Binding struct {
Provider string `json:"provider"`
Point string `json:"point,omitempty"`
Auth Credential `json:"auth,omitempty"`
Params map[string]string `json:"params,omitempty"`
Writable bool `json:"writable,omitempty"`
}
Binding is one user-owned cloud folder under /workspace/<alias>. Alias is params["name"] or a leftover single-segment Point (not /workspace). Provider is the bind kind (gdrive, msgraph). Writable is opt-in; the Go zero value stays read-only.
type Credential ¶
type Credential struct {
Token string `json:"token,omitempty"`
ExpiresAt time.Time `json:"expiresAt,omitempty"`
}
Credential is a session-scoped access token. Never store this on MountSpec or in a checkpoint / session.Store. Work-item payloads (Prompt/Resume) may carry it; backends must not persist it with recipes. Workflow history must not contain Token; the runtime keeps it in SecretStorage.