MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions6,005 in github.com/PerpetualSoftware/pad

↓ 2 callersMethodvalidateFTSInvariants
validateFTSInvariants checks that every trigger in expectedFTSTriggers exists. Missing triggers are logged as structured warnings; this function is in
internal/store/store.go:388
↓ 2 callersFunctionvalidateFieldType
(def models.FieldDef, val any)
internal/items/validate.go:120
↓ 2 callersFunctionvalidateNoReservedFieldKeys
validateNoReservedFieldKeys rejects a schema that newly introduces a field keyed "parent" or "plan". prevSchema is nil on collection create (nothing t
internal/server/handlers_collections.go:38
↓ 2 callersFunctionvalidateShareLinkOpts
validateShareLinkOpts checks that share link creation constraints are sane. Returns an error message string (empty if valid).
internal/server/handlers_share_links.go:53
↓ 2 callersFunctionvalidationFailedFromBuildErr
validationFailedFromBuildErr wraps a BuildCLIArgs error (typically "missing required argument %q" or "flag %q: <type-mismatch>") as a structured valid
internal/mcp/errors.go:586
↓ 2 callersFunctionveCollabMember
--------------------------------------------------------------------- Perimeter 4: collab WebSocket GET-upgrade (persists Yjs edits). ----------------
internal/server/middleware_verified_email_test.go:342
↓ 2 callersFunctionveOAuthUnverifiedSession
--------------------------------------------------------------------- Perimeter 5: OAuth-provider authorize + decide (mints auth codes). -------------
internal/server/middleware_verified_email_test.go:433
↓ 2 callersFunctionwaitForAuditRows
waitForAuditRows polls ListMCPAuditByUser until we see the expected count or the deadline expires. The middleware writes async via a buffered channel
internal/server/middleware_mcp_audit_test.go:69
↓ 2 callersFunctionwalk
(cur, root *cobra.Command, doc *Document, depth, maxDepth int)
internal/cmdhelp/json.go:111
↓ 2 callersMethodwireOAuthMetricsObserver
wireOAuthMetricsObserver attaches the OAuth metrics that need both the metrics registry AND the OAuth server: the active-tokens callback collector (re
internal/server/server.go:828
↓ 2 callersFunctionworkspaceHintLine
workspaceHintLine returns a concise comma-joined slug list, or an empty string when no hints were resolved (avoids "Available workspaces: " trailing n
internal/mcp/errors.go:281
↓ 2 callersFunctionwriteFlagsTable
writeFlagsTable renders a flag map as a markdown table with sorted keys. Repeatable flags are marked in the type column for visibility.
internal/cmdhelp/md.go:219
↓ 2 callersFunctionwriteJSONConfig
(path string, cfg map[string]any)
internal/mcp/install.go:353
↓ 2 callersMethodwriteMessage
writeMessage is a tiny helper that holds writeMu while writing one frame. All writes (replay during addConn, writeLoop fan-out) go through here so we
internal/collab/room.go:87
↓ 2 callersFunctionwriteOpenChildrenError
writeOpenChildrenError emits the 409 response with both a human message AND the structured details payload. `parentRef` is the already-formatted paren
internal/server/handlers_items_open_children_guard.go:276
↓ 2 callersFunctionwritePlanLimitError
writePlanLimitError writes a structured 403 response for plan limit violations. The envelope follows the standard {"error":{"code":...,"message":...,"
internal/server/handlers_cloud.go:1143
↓ 2 callersFunctionwriteTOMLConfig
(path string, cfg map[string]any)
internal/mcp/install.go:522
↓ 1 callersMethodApproveCLIAuthSession
ApproveCLIAuthSession marks a pending session as approved, storing the session token and user ID. Returns an error if the session doesn't exist, is ex
internal/store/cli_auth_sessions.go:119
↓ 1 callersMethodAreItemsStarred
AreItemsStarred returns a set of item IDs that are starred by the given user. Pass the item IDs you want to check; the returned map contains only the
internal/store/item_stars.go:57
↓ 1 callersMethodAsUpdateConflict
AsUpdateConflict returns the parsed conflict details when this APIError carries them, or nil otherwise. Returns nil for any error other than "update_c
internal/cli/client.go:1186
↓ 1 callersMethodAttachmentReferenced
AttachmentReferenced returns true when anything in the workspace mentions "pad-attachment:<id>" — either a live item's content/fields JSON or a commen
internal/store/attachments.go:638
↓ 1 callersMethodBackfillEncryptTOTPSecrets
BackfillEncryptTOTPSecrets encrypts any plaintext TOTP secrets in the database. Idempotent: skips secrets that already have the "enc:" prefix. Called
internal/store/encryption.go:107
↓ 1 callersMethodBackfillUserPlans
BackfillUserPlans sets the plan for all users that have an empty or default plan. In cloud mode, call with "free" to ensure all users have a plan set.
internal/store/limits.go:310
↓ 1 callersMethodBuildAgentBootstrap
BuildAgentBootstrap assembles the bootstrap blob from store queries. This is the single canonical code path; the HTTP handler, the MCP resource handle
internal/server/handlers_bootstrap.go:423
↓ 1 callersFunctionBuildWorkspaceContext
BuildWorkspaceContext converts detected project metadata plus the current Pad client configuration into a machine-readable workspace context.
internal/cli/workspace_context_detect.go:15
↓ 1 callersMethodCheckLimit
CheckLimit checks whether a workspace operation is allowed under the owner's plan. Resolution order: 1. User plan_overrides[feature] — per-user overri
internal/store/limits.go:63
↓ 1 callersMethodClaimWorkspace
ClaimWorkspace redeems a 6-digit claim code against the api/v1/oauth/claim endpoint, granting the calling OAuth connection access to the named workspa
internal/cli/client.go:164
↓ 1 callersMethodCleanExpiredCLIAuthSessions
CleanExpiredCLIAuthSessions removes all expired CLI auth sessions.
internal/store/cli_auth_sessions.go:161
↓ 1 callersMethodCleanExpiredPasswordResets
CleanExpiredPasswordResets removes old reset tokens.
internal/store/password_resets.go:110
↓ 1 callersFunctionCleanupStaleBootstrapToken
CleanupStaleBootstrapToken removes a token file left behind by a previous run that completed bootstrap but failed to delete the file. Called at startu
internal/server/bootstrap.go:132
↓ 1 callersMethodClose
()
internal/store/store.go:258
↓ 1 callersMethodCloseConn
CloseConn force-closes a single WebSocket connection registered with the manager, sending a close frame with a machine-readable reason first. Used by
internal/collab/manager.go:762
↓ 1 callersMethodCollectionCheckboxProgress
CollectionCheckboxProgress returns the per-item checkbox totals for every item in a collection whose content has at least one `- [ ]` / `- [x]` marker
internal/store/items.go:1484
↓ 1 callersFunctionComputeAdminUserStatusValue
ComputeAdminUserStatusValue is the exported wrapper around computeAdminUserStatus. Used by handlers that compute the status pill for a single-user res
internal/store/users.go:317
↓ 1 callersMethodConsumePasswordReset
ConsumePasswordReset atomically validates and marks a reset token as used. Returns the user if the token is valid, unused, and not expired. Returns ni
internal/store/password_resets.go:78
↓ 1 callersMethodCountActiveOAuthAccessTokens
CountActiveOAuthAccessTokens returns the number of access-token rows with active=1. Backs the pad_oauth_active_tokens gauge (TASK-961). Caveat: the s
internal/store/oauth.go:450
↓ 1 callersMethodCountAttachmentsForStorageKeyOutsideWorkspace
CountAttachmentsForStorageKeyOutsideWorkspace counts attachment rows in a DIFFERENT workspace that point at the same PHYSICAL blob (storage_key). Atta
internal/store/workspace_purge.go:134
↓ 1 callersMethodCountProtectingAttachmentsForHash
CountProtectingAttachmentsForHash returns the number of rows pointing at the given content_hash whose presence requires the on-disk blob to stay. A ro
internal/store/attachments.go:601
↓ 1 callersMethodCountStarredItems
CountStarredItems returns the number of starred items for a user in a workspace.
internal/store/item_stars.go:148
↓ 1 callersMethodCreateAgentRole
CreateAgentRole creates a new agent role in a workspace.
internal/cli/client.go:666
↓ 1 callersMethodCreateCLIAuthSession
CreateCLIAuthSession generates a new pending CLI auth session with a cryptographically random code and the default TTL. Returns the session including
internal/store/cli_auth_sessions.go:36
↓ 1 callersMethodCreateCollection
(wsSlug string, input models.CollectionCreate)
internal/cli/client.go:177
↓ 1 callersMethodCreatePKCERequestSession
===================================================================== PKCERequestStorage =============================================================
internal/oauth/storage.go:398
↓ 1 callersMethodCreateWebhook
CreateWebhook registers a new webhook for a workspace.
internal/cli/client.go:629
↓ 1 callersFunctionDecomposePlaybook
DecomposePlaybook returns the library entry for the generic `decompose` playbook. Title is "Decompose a plan into tasks" to read well in the library c
internal/collections/playbook_library_decompose.go:157
↓ 1 callersFunctionDefaultTerminalStatusPlaceholders
DefaultTerminalStatusPlaceholders returns placeholders and args for the default terminal statuses list.
internal/models/terminal.go:201
↓ 1 callersMethodDelete
Delete removes the credential for the given server URL. No-op if the entry isn't present, or if the receiver is nil.
internal/cli/credentials.go:199
↓ 1 callersMethodDeleteAPIToken
DeleteAPIToken removes an API token by ID.
internal/store/api_tokens.go:191
↓ 1 callersMethodDeleteAgentRole
(workspaceID, id string)
internal/store/agent_roles.go:147
↓ 1 callersMethodDeleteAgentRole
DeleteAgentRole removes an agent role from a workspace.
internal/cli/client.go:684
↓ 1 callersMethodDeleteCLIAuthSession
DeleteCLIAuthSession removes a CLI auth session by code.
internal/store/cli_auth_sessions.go:152
↓ 1 callersMethodDeleteCollection
DeleteCollection soft-deletes a collection by setting collections.deleted_at. Items in the collection are NOT cascaded; they remain in the database wi
internal/cli/client.go:199
↓ 1 callersMethodDeleteCollectionGrant
DeleteCollectionGrant revokes a collection grant by ID, scoped to a workspace.
internal/store/grants.go:86
↓ 1 callersMethodDeleteComment
DeleteComment removes a comment by ID.
internal/store/comments.go:178
↓ 1 callersMethodDeleteInvitation
DeleteInvitation removes a pending invitation.
internal/store/workspace_members.go:749
↓ 1 callersMethodDeleteItem
(wsSlug, itemSlug string)
internal/cli/client.go:254
↓ 1 callersMethodDeleteItemGrant
DeleteItemGrant revokes an item grant by ID, scoped to a workspace.
internal/store/grants.go:174
↓ 1 callersMethodDeletePKCERequestSession
DeletePKCERequestSession removes the row after a successful /token exchange. fosite's PKCE lifecycle is delete-on-use, distinct from auth codes (which
internal/oauth/storage.go:424
↓ 1 callersMethodDeleteRefreshToken
DeleteRefreshToken removes a refresh row entirely. Used by the rotation flow to drop the previous-step's refresh after the new one is in place.
internal/store/oauth.go:371
↓ 1 callersMethodDeleteShareLink
DeleteShareLink deletes a share link by ID, scoped to a workspace.
internal/store/share_links.go:201
↓ 1 callersMethodDeleteStarsForItem
DeleteStarsForItem removes all stars for a given item (used when deleting an item).
internal/store/item_stars.go:230
↓ 1 callersMethodDeleteUser
DeleteUser permanently deletes a user by ID.
internal/store/users.go:937
↓ 1 callersMethodDeleteView
DeleteView removes a view by ID.
internal/store/views.go:197
↓ 1 callersMethodDeleteWebhook
DeleteWebhook removes a webhook by ID.
internal/store/webhooks.go:115
↓ 1 callersMethodDeleteWebhook
DeleteWebhook removes a webhook by ID.
internal/cli/client.go:635
↓ 1 callersFunctionDetectProject
DetectProject analyzes the current directory to determine project type, build system, test runner, CI, and other metadata.
internal/cli/detect.go:30
↓ 1 callersFunctionDispatchInputFromContext
DispatchInputFromContext returns the original MCP tool-call JSON input attached by WithDispatchInput, or nil if none. Safe to call on any context.
internal/mcp/dispatch.go:65
↓ 1 callersMethodDriver
()
internal/store/dialect.go:134
↓ 1 callersMethodDriver
()
internal/store/dialect.go:212
↓ 1 callersMethodEnableUser
EnableUser re-enables a disabled user account by clearing disabled_at.
internal/store/users.go:895
↓ 1 callersFunctionErrManagerClosed
ErrManagerClosed exposes the manager's internal closed-flag error to callers via a public sentinel they can wrap. The internal errManagerClosed (in ma
internal/collab/applier.go:291
↓ 1 callersMethodFTSMatch
(table, _ string)
internal/store/dialect.go:184
↓ 1 callersFunctionFieldsDSLToSchemaJSON
FieldsDSLToSchemaJSON parses the DSL and returns the marshaled CollectionSchema JSON string. Empty input returns "{}" — an empty schema. Convenience w
internal/collections/dsl.go:69
↓ 1 callersMethodGenerate
()
cmd/pad/cmd_server.go:1025
↓ 1 callersMethodGet
Get returns the credential for the given server URL, or nil if none exists. URL is canonicalized (trailing slash + whitespace stripped) before lookup.
internal/cli/credentials.go:174
↓ 1 callersMethodGetAgentBootstrap
--- Bootstrap --- GetAgentBootstrap returns the consolidated bootstrap blob — workspace + user + collections + always-on conventions + roles + playboo
internal/cli/client.go:430
↓ 1 callersMethodGetAuditLog
--- Audit Log --- GetAuditLog fetches the global audit log (admin-only).
internal/cli/client.go:1030
↓ 1 callersMethodGetChildItemsTx
GetChildItemsTx is the in-transaction variant of GetChildItems. The underlying query is the same as GetChildItems; using a *sql.Tx ties the read to th
internal/store/items.go:3550
↓ 1 callersMethodGetCustomTemplate
(id string)
internal/store/templates.go:36
↓ 1 callersMethodGetDeletedItemsWithCollection
GetDeletedItemsWithCollection returns minimal item info (ID + CollectionID) for soft-deleted items, used to filter deleted item IDs by collection visi
internal/store/items.go:4425
↓ 1 callersMethodGetItemBySlugIncludeDeleted
GetItemBySlugIncludeDeleted finds an item by slug including soft-deleted items. Used for restore operations where the item is archived.
internal/store/items.go:766
↓ 1 callersMethodGetItemLinkByID
GetItemLinkByID returns a single item link by its ID, or nil if not found.
internal/store/items.go:2754
↓ 1 callersMethodGetItemVersionResolved
GetItemVersionResolved returns a single version with its diff resolved to full content. Reverse-patch versions can only be reconstructed by walking th
internal/store/items.go:4229
↓ 1 callersMethodGetLibraryEntry
GetLibraryEntry fetches one library entry by exact title match. Conventions- first precedence — a title that resolves to a convention is returned as o
internal/cli/client.go:613
↓ 1 callersMethodGetPKCERequestSession
GetPKCERequestSession hydrates the PKCE session. Returns fosite.ErrNotFound when missing (e.g. someone replayed an old auth code that's already been d
internal/oauth/storage.go:409
↓ 1 callersMethodGetPlatformSettings
GetPlatformSettings returns all platform settings as a map.
internal/store/platform_settings.go:25
↓ 1 callersMethodGetReport
GetReport returns the windowed project report JSON (PLAN-1628 / TASK-1630). window is one of day|week|2wk|month (empty = server default "week"); colle
internal/cli/client.go:406
↓ 1 callersMethodGetRoleBoardItems
GetRoleBoardItems returns non-terminal items across all collections, grouped by role.
internal/store/agent_roles.go:289
↓ 1 callersMethodGetShareLinkByToken
GetShareLinkByToken looks up a share link by its raw token (hashes it first).
internal/store/share_links.go:139
↓ 1 callersMethodGetUserMemberWorkspaces
GetUserMemberWorkspaces returns only workspaces where the user has a workspace_members row — NO guest-grant fallback. Mirrors the first half of GetUse
internal/store/workspace_members.go:372
↓ 1 callersMethodGetUserWorkspaces
GetUserWorkspaces returns all workspaces a user has access to, sorted by the user's custom sort order (then name as tiebreaker).
internal/store/workspace_members.go:410
↓ 1 callersMethodGetVersion
(id string)
internal/store/versions.go:133
↓ 1 callersMethodGetVersionResolved
GetVersionResolved returns a version with full content reconstructed. For diff-based versions, this requires walking the version chain.
internal/store/versions.go:155
↓ 1 callersMethodGetWorkspacesBySlugForUser
GetWorkspacesBySlugForUser finds workspaces matching a slug that are accessible to the given user (owned, member, or guest with grants).
internal/store/workspaces.go:178
↓ 1 callersMethodGroupConcat
GroupConcat returns SQL for string aggregation with a separator. SQLite: GROUP_CONCAT(DISTINCT expr) PostgreSQL: STRING_AGG(DISTINCT expr, ',')
internal/store/dialect.go:64
↓ 1 callersMethodGroupConcat
(expr string, distinct bool)
internal/store/dialect.go:164
↓ 1 callersMethodGroupConcat
(expr string, distinct bool)
internal/store/dialect.go:247
↓ 1 callersMethodHandler
Handler returns the configured HTTP handler (router). Useful for testing with httptest.NewServer.
internal/server/server.go:1779
↓ 1 callersMethodHardDeleteAttachment
HardDeleteAttachment removes the attachments row outright. Used by orphan GC after the grace period; never call from a request handler — soft-delete i
internal/store/attachments.go:579
↓ 1 callersMethodHasActiveConnectionForUser
HasActiveConnectionForUser reports whether the user has ANY active OAuth connection at all, regardless of which workspaces it covers. The claim-code
internal/store/oauth_connections.go:527
← previousnext →1,601–1,700 of 6,005, ranked by callers