MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions8,091 in github.com/PerpetualSoftware/pad

↓ 7 callersFunctionplaybooksCollection
playbooksCollection returns a Playbooks collection scoped to the caller's domain. Like conventionsCollection, the trigger and scope select options are
internal/collections/templates.go:484
↓ 7 callersMethodpublishItemEventWithName
publishItemEventWithName publishes a real-time event for item changes with actor name. `seq` is the item's workspace-scoped monotonic mutation cursor
internal/server/handlers_items.go:1994
↓ 7 callersMethodreadAttachment
readAttachment handles pad://workspace/{ws}/attachments/{id}. It requests the existing thumb-md path so authorization, workspace isolation, image proc
internal/mcp/resources.go:467
↓ 7 callersFunctionrenderedScale
(page: Page, selector = VIEWER_IMAGE)
web/e2e/lib/attachment-viewer.ts:252
↓ 7 callersFunctionrunApplierEcho
runApplierEcho spawns a goroutine that reads all incoming TextMessage frames on conn, looks for applier_request, and immediately responds with applier
internal/collab/applier_test.go:16
↓ 7 callersMethodseedGrantee
seedGrantee creates a throwaway user to be the recipient of a grant, for tests that need a real grant/link ID on a hidden or visible resource (BUG-192
internal/server/handlers_grant_visibility_test.go:128
↓ 7 callersFunctionseqPtr
(v int64)
internal/store/item_workspace_moves_test.go:68
↓ 7 callersMethodstopMCPSessionTracker
stopMCPSessionTracker signals the sweeper to exit. Called from Server.Stop. Idempotent.
internal/server/middleware_mcp_session.go:245
↓ 7 callersFunctionstripReservedUnparentedViewFilter
(config string)
internal/server/handlers_views.go:256
↓ 7 callersFunctionswapApplierTimeouts
(first, retry time.Duration)
internal/collab/applier_test.go:660
↓ 7 callersFunctionwriteCredsFile
(t *testing.T, home, body string)
internal/cli/credentials_test.go:21
↓ 6 callersMethodAddr
Addr returns the host:port listen address.
internal/config/config.go:342
↓ 6 callersMethodAllowedAudience
AllowedAudience returns the canonical resource URL the server is configured to accept. Sub-PR C's /authorize handler reads this to reject mismatched `
internal/oauth/server.go:236
↓ 6 callersFunctionApplyPatch
ApplyPatch applies a patch to baseText to produce the target text. Returns an error if the patch cannot be applied cleanly.
internal/diff/diff.go:24
↓ 6 callersMethodClone
Clone overrides DefaultSession.Clone so the returned value is a *Session, not a *DefaultSession. Without this override, fosite's internal Clone() call
internal/oauth/session.go:163
↓ 6 callersMethodCloudMode
CloudMode reports whether the marketing footer is currently enabled. Templates read it through getCloudMode() so they pick up the same snapshot for th
internal/email/sender.go:87
↓ 6 callersMethodComputeRef
ComputeRef sets the Ref field from CollectionPrefix and ItemNumber. Call this after populating the item from a database query.
internal/models/item.go:137
↓ 6 callersFunctionConvertGeneric
ConvertGeneric converts an HTML document into markdown by first running go-readability to strip chrome, navigation, and ads, then piping the cleaned H
internal/urlimport/generic.go:37
↓ 6 callersMethodCreateCollection
(wsSlug string, input models.CollectionCreate)
internal/cli/client.go:180
↓ 6 callersMethodDeleteUserSessions
DeleteUserSessions destroys all sessions for a user (logout everywhere).
internal/store/sessions.go:247
↓ 6 callersFunctionDetectTools
DetectTools returns the tools that appear to be in use, based on any of: a project-local directory, a home-directory install, or a binary on PATH.
internal/cli/agents.go:104
↓ 6 callersFunctionEmitJSON
EmitJSON walks the command tree below `target`, builds a cmdhelp v0.1 Document, and writes it to w as indented JSON terminated by a newline. `root` M
internal/cmdhelp/json.go:73
↓ 6 callersMethodEnableTOTP
EnableTOTP atomically enables 2FA for a user and stores hashed recovery codes. The expectedSecret is the plaintext secret — it's compared against the
internal/store/users.go:1198
↓ 6 callersFunctionEnsureBootstrapToken
EnsureBootstrapToken generates a fresh first-run bootstrap token (or loads the existing one if a valid file is already present). Returns the token str
internal/server/bootstrap.go:66
↓ 6 callersMethodError
()
internal/attachments/mime.go:291
↓ 6 callersMethodError
()
internal/server/handlers_items.go:667
↓ 6 callersFunctionExtractItemImplementationNotes
(fieldsJSON string)
internal/models/item.go:401
↓ 6 callersMethodGetAccessToken
GetAccessToken hydrates an access token by its HMAC signature. Returns ErrOAuthInactiveToken if the row exists but has been revoked / rotated out, Err
internal/store/oauth.go:317
↓ 6 callersMethodGetBillingMetrics
GetBillingMetrics fetches an aggregated Stripe-derived snapshot from pad-cloud's /admin/metrics/billing endpoint (active subs, MRR, ARR, churn, cancel
internal/server/server.go:536
↓ 6 callersMethodGetClient
===================================================================== fosite.ClientManager ===========================================================
internal/oauth/storage.go:143
↓ 6 callersMethodGetRefreshToken
GetRefreshToken hydrates a refresh token. Returns ErrOAuthInactiveToken when active=false, which fosite uses to trigger family revocation on the match
internal/store/oauth.go:357
↓ 6 callersMethodGuestVisibleResources
GuestVisibleResources returns the two-level visibility for a guest: - fullCollectionIDs: collections where the user has a direct collection grant (ful
internal/store/grants.go:508
↓ 6 callersMethodHasOAuthProvider
HasOAuthProvider returns true if the user has linked the given provider.
internal/models/user.go:59
↓ 6 callersFunctionInstallForTool
InstallForTool writes the skill content to the appropriate location for a tool.
internal/cli/agents.go:163
↓ 6 callersMethodIsExpired
IsExpired reports whether an invitation is past its expiration window. Invitations created before the expires_at migration (nil ExpiresAt) are treated
internal/models/user.go:127
↓ 6 callersMethodIsItemStarred
IsItemStarred checks whether a specific item is starred by a user.
internal/store/item_stars.go:43
↓ 6 callersMethodListArchivedItemWorkspaceMovesBySource
ListArchivedItemWorkspaceMovesBySource returns at most `limit` MOVE rows for one source — rows with archived_source true — newest first. It serves th
internal/store/item_workspace_moves.go:160
↓ 6 callersMethodListAuditLog
ListAuditLog returns activities matching the given audit log filters. Supports filtering by action, actor, workspace, and date range.
internal/store/activities.go:507
↓ 6 callersMethodListItemVersions
ListItemVersions returns all versions for an item.
internal/store/items.go:4728
↓ 6 callersMethodListItemVersionsResolved
ListItemVersionsResolved returns versions with full content (diffs resolved). Requires the current item content to reconstruct diff-based versions.
internal/store/items.go:4627
↓ 6 callersMethodListSystemCollectionIDs
ListSystemCollectionIDs returns the IDs of system collections in a workspace. System collections are always visible to members regardless of collectio
internal/store/workspace_members.go:333
↓ 6 callersMethodListWatchesForUser
ListWatchesForUser returns every watch a user holds, across ALL workspaces they're a member of, newest first — enriched with the watched item's ref/ti
internal/store/watches.go:70
↓ 6 callersFunctionNewMemorySessionPresence
NewMemorySessionPresence returns an empty in-process registry.
internal/server/session_presence.go:185
↓ 6 callersFunctionNewRoomManagerWithConfig
NewRoomManagerWithConfig is the explicit-config form. Empty config fields fall back to package defaults.
internal/collab/manager.go:254
↓ 6 callersFunctionNewSender
NewSender creates a new email sender.
internal/email/sender.go:35
↓ 6 callersFunctionNormalizeSlug
NormalizeSlug maps the common singular / shorthand collection-name forms users actually type ("task", "idea", "doc", etc.) to the canonical plural slu
internal/collections/prefix.go:15
↓ 6 callersMethodPlanAttachmentCopy
PlanAttachmentCopy plans the attachment side of a cross-workspace item copy. It writes nothing. DR-11a, restated because it is the whole point of the
internal/store/attachments_copy_plan.go:356
↓ 6 callersFunctionPlaybookLibrary
PlaybookLibrary returns all pre-defined playbook categories with their playbooks. As of PLAN-1397's invokable-first overhaul (TASK-1403), the library
internal/collections/playbook_library.go:37
↓ 6 callersFunctionPromptBody
PromptBody returns the canonical body text for a registered prompt. Exported so tests can assert lockstep with SKILL.md without duplicating the litera
internal/mcp/prompts.go:85
↓ 6 callersFunctionRenderMarkdown
RenderMarkdown writes a Document as markdown matching cmdhelp v0.1 §6. Useful for tests that build a Document manually and want to render it without r
internal/cmdhelp/md.go:29
↓ 6 callersMethodRenewSessionIfStale
RenewSessionIfStale implements sliding-window expiration. When a session is past its renewal threshold (less than half its renewal window remaining) i
internal/store/sessions.go:120
↓ 6 callersFunctionResolveTool
ResolveTool finds an AgentTool by name or alias. Returns nil if not found.
internal/cli/agents.go:86
↓ 6 callersMethodRevokeAccessTokenFamily
RevokeAccessTokenFamily mirrors RevokeRefreshTokenFamily for access tokens. fosite calls these in pairs when revoking by request_id (the unified Revok
internal/store/oauth.go:504
↓ 6 callersFunctionSanitizeMarkdownText
Markdown list rendering (#898). The `--format markdown` branch of the list commands writes a GitHub-flavored markdown table. Two rules separate it fr
internal/cli/format_markdown.go:32
↓ 6 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
internal/mcp/dispatch_http_advanced_test.go:910
↓ 6 callersMethodSetEmailSender
SetEmailSender attaches a transactional email sender. The apiKey is stored separately for deriving the unsubscribe HMAC secret. If the server is alre
internal/server/server.go:791
↓ 6 callersMethodSetOpLogGCConfig
SetOpLogGCConfig overrides the default sweep interval (1h) and minimum row age (24h). Pass 0 for either to keep the package default. Must be called be
internal/server/oplog_gc.go:44
↓ 6 callersMethodSetSpawn
SetSpawn injects the goroutine spawner used for deliveries. Passing the server's tracked-goroutine helper (Server.goAsync) makes Server.Stop() wait fo
internal/webhooks/dispatcher.go:93
↓ 6 callersMethodSetUserRole
SetUserRole updates a user's role (admin or member). When demoting an admin to member, the update is conditional: it only proceeds if at least one oth
internal/store/users.go:908
↓ 6 callersMethodStartOpLogGC
StartOpLogGC kicks off the periodic prune-sweep loop. Idempotent — calling twice silently no-ops. Must be called AFTER SetCollabRoomManager; the loop
internal/server/oplog_gc.go:64
↓ 6 callersMethodSubscribe
Subscribe returns a channel that receives every future Notification, with NO replay. There is exactly one logical stream (unlike internal/events.Event
internal/watchevents/watchevents.go:154
↓ 6 callersMethodSubscribe
Subscribe registers a subscriber for itemID and returns a buffered channel of size subscriberBufSize.
internal/collab/memory_bus.go:50
↓ 6 callersMethodTouchUserWrite
TouchUserWrite updates last_write_at for a user, throttled to avoid write amplification. Only writes if the stored value is older than 5 minutes. Best
internal/store/users.go:864
↓ 6 callersMethodUnmarkStripeEventProcessed
UnmarkStripeEventProcessed deletes a row from stripe_processed_events, allowing Stripe retries of the same event ID to be handled again (TASK-736). Us
internal/store/stripe_events.go:86
↓ 6 callersMethodUpdateDocument
(id string, input models.DocumentUpdate)
internal/store/documents.go:224
↓ 6 callersMethodUpdateItemWithParentLink
UpdateItemWithParentLink is UpdateItemWithPreCheck plus an OPTIONAL parent-link mutation applied inside the same transaction (BUG-2013). When parentLi
internal/store/items.go:2081
↓ 6 callersMethodUpdateUser
UpdateUser updates mutable user fields.
internal/store/users.go:162
↓ 6 callersMethodUserHasGrantsInWorkspace
UserHasGrantsInWorkspace checks if a user has any active collection or item grants in a workspace (even though they are not a member). Used to detect
internal/store/grants.go:368
↓ 6 callersFunctionValidatePartialFields
ValidatePartialFields validates ONLY the keys present in `patch` against the schema (TASK-2022, field-level PATCH / IDEA-1480). Unlike ValidateFields
internal/items/validate.go:153
↓ 6 callersMethodValidatePassword
ValidatePassword checks an email/password combination. Returns the user if valid, nil if the credentials are wrong (not an error).
internal/store/users.go:214
↓ 6 callersMethodValidateToken
ValidateToken hashes the provided plaintext token, looks it up in the database, checks expiry, and updates last_used_at. Returns nil if the token is i
internal/store/api_tokens.go:222
↓ 6 callersFunctionVerifyClaimCode
VerifyClaimCode returns true if code matches the derived code for (userID, workspaceID) at the current OR previous time bucket — the sliding 5–10 minu
internal/server/claim_codes.go:127
↓ 6 callersFunctionapiRequest
apiRequest makes a JSON API request to the test server.
internal/server/handlers_events_test.go:91
↓ 6 callersFunctionapplyImageSemantics
()
web/src/lib/components/editor/attachment-image.ts:439
↓ 6 callersFunctionassertTransformDenied
assertTransformDenied pins the shared denial: 404 with the exact body every other attachment denial writes.
internal/server/handlers_attachments_transform_authz_test.go:120
↓ 6 callersMethodattachWith
(t *testing.T, ws *models.Workspace, filename string, size int64, storageKey, hash string)
internal/store/attachments_copy_plan_test.go:42
↓ 6 callersFunctionauthHeaders
(fixture: SuiteFixture)
web/e2e/pane-full-page-capstone.spec.ts:60
↓ 6 callersFunctionauthJson
(fixture: SuiteFixture)
web/e2e/lib/attachment-viewer.ts:559
↓ 6 callersFunctioncountIPChangeEvents
countIPChangeEvents returns the number of session_ip_changed rows in the audit log.
internal/server/middleware_session_ip_test.go:405
↓ 6 callersFunctioncountLiveAttachments
(t *testing.T, s *Store, wsID string)
internal/store/attachments_live_item_test.go:35
↓ 6 callersFunctiondecodeItemFields
(t *testing.T, fieldsJSON string)
internal/server/handlers_items_fieldpatch_test.go:27
↓ 6 callersMethoddecryptUserTOTP
decryptUserTOTP decrypts the TOTP secret on a User struct in place.
internal/store/users.go:72
↓ 6 callersFunctiondistinctPNG
distinctPNG returns a valid PNG whose bytes differ per seed, so an assertion on served content can tell one blob from another. The download handler ne
internal/server/handlers_attachments_download_authz_test.go:149
↓ 6 callersFunctiondoLoopbackRequest
(srv *Server, method, path string, body interface{})
internal/server/server_test.go:44
↓ 6 callersMethodenrichItemForResponse
enrichItemForResponse populates derived closure and parent info on a single item. An optional visibleIDs slice filters related items so hidden-collect
internal/server/item_lineage.go:80
↓ 6 callersFunctionerrStructured
errStructured wraps a Go error into the standard MCP tool-error envelope (TASK-1077) with a stable identifier prefix (e.g. "pad_item.link"). Local hel
internal/mcp/catalog_item.go:555
↓ 6 callersFunctionescapeTableCell
escapeTableCell escapes characters that would break a markdown table row: `|` becomes `\|`, and existing backslashes are doubled so the escape stays v
internal/urlimport/openapi.go:505
↓ 6 callersFunctionextractCommandBlock
extractCommandBlock returns the substring of `md` covering one command's section, identified by its full path (e.g. "item create"). Used to scope asse
internal/cmdhelp/md_test.go:356
↓ 6 callersFunctionextractFieldValue
extractFieldValue pulls a named string field out of an item's fields JSON blob. Returns "" when the blob is empty, unparseable, or carries no string v
internal/store/status_transitions_backfill.go:17
↓ 6 callersFunctionfakeUser
===================================================================== Helpers ===================================================================== fa
internal/mcp/dispatch_http_envelope_test.go:414
↓ 6 callersFunctionfileExists
(dir, name string)
internal/cli/detect.go:203
↓ 6 callersMethodfilterWatchesByCurrentAccess
filterWatchesByCurrentAccess re-checks each watch's CURRENT visibility (workspace membership / role / collection access / item grants) before it is us
internal/server/handlers_watch_access.go:33
↓ 6 callersFunctionflexJSONToString
flexJSONToString accepts a raw JSON value and returns it as a canonical JSON-encoded string. Acceptable inbound shapes: - absent / empty / null → nil
internal/models/item.go:856
↓ 6 callersFunctiongetConfiguredConfig
()
cmd/pad/configure.go:68
↓ 6 callersMethodgetWorkspaceDocument
isUUID is defined in handlers_items.go getWorkspaceDocument resolves workspace slug and document ID from URL params.
internal/server/server.go:2558
↓ 6 callersMethodhasBootstrapToken
hasBootstrapToken reports whether a bootstrap token is currently configured. Lock-aware — safe to call without holding s.bootstrapMu. Used by handleSe
internal/server/bootstrap.go:156
↓ 6 callersFunctionisAPITokenAuth
isAPITokenAuth returns true if the request was authenticated via an API token (not a session cookie or CLI session). Use this to gate sensitive operat
internal/server/middleware_auth.go:486
↓ 6 callersFunctionlistTransitions
listTransitions returns all status_transitions rows for an item, oldest first.
internal/store/status_transitions_test.go:12
↓ 6 callersFunctionliveItemAttachmentFixture
Store-level tests for CreateAttachmentForLiveItem — PLAN-2391 DR-14 / TASK-2402. The handler-level coverage lives in internal/server; these pin the in
internal/store/attachments_live_item_test.go:18
↓ 6 callersMethodmarkUploadInFlight
markUploadInFlight increments the in-flight counter for a content hash. Returns a release func the caller MUST defer; the release decrements and remov
internal/server/server.go:839
← previousnext →601–700 of 8,091, ranked by callers