MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions7,856 in github.com/PerpetualSoftware/pad

↓ 5 callersFunctionformatItemAsMarkdown
formatItemAsMarkdown turns the JSON body returned by `pad item show --format json` into a self-contained markdown document: heading with ref + title,
internal/mcp/resources.go:348
↓ 5 callersFunctionfullVersion
()
cmd/pad/main.go:35
↓ 5 callersFunctiongaugeValueOrZero
gaugeValueOrZero pulls the gauge value or returns 0 when the underlying metric hasn't been touched yet.
internal/server/middleware_mcp_metrics_test.go:218
↓ 5 callersMethodgetLimiter
(key string)
internal/server/middleware_ratelimit.go:87
↓ 5 callersFunctiongoto
(_url: string | URL, _opts?: unknown)
web/src/test/mocks/app-navigation.ts:15
↓ 5 callersMethodgrantHiddenItemToOwner
grantHiddenItemToOwner gives the fixture's restricted owner an item-level grant on the hidden item, independent of their collection_access restriction
internal/server/handlers_grant_visibility_test.go:115
↓ 5 callersMethodhandleControlMessage
handleControlMessage dispatches a TextMessage frame received from a peer: applier_apply_start / applier_ack (the designated-applier bracket, TASK-1257
internal/collab/room.go:606
↓ 5 callersMethodhandleCopyItemPreflight
handleCopyItemPreflight answers "what would this cross-workspace copy do?" without doing any of it. See the file header for the full contract.
internal/server/handlers_items_copy_preflight.go:471
↓ 5 callersFunctionhideHandle
()
web/src/lib/components/editor/block-drag-handle.ts:426
↓ 5 callersFunctionhideMenu
()
web/src/lib/components/editor/block-drag-handle.ts:488
↓ 5 callersFunctionimageRect
(page: Page, selector = VIEWER_IMAGE)
web/e2e/lib/attachment-viewer.ts:267
↓ 5 callersFunctionintPtr
(n int)
internal/cli/item_summary_test.go:11
↓ 5 callersFunctionisItemDone
isItemDone reports whether an item is in a terminal state for its collection's configured done field. Falls back to the default-terminal list against
internal/server/handlers_dashboard.go:245
↓ 5 callersFunctionisPublicAPIPath
isPublicAPIPath reports whether the given request path is an API endpoint that bypasses authentication entirely. These handlers must work even when th
internal/server/middleware_auth.go:341
↓ 5 callersFunctionitemCopyLine
itemCopyLine makes a server-supplied string safe to drop into a table row. Schema keys, labels, option values, link types and validator messages are a
cmd/pad/cmd_item.go:2043
↓ 5 callersMethoditemLock
itemLock returns the lazily-allocated mutex guarding setup-phase operations on itemID. Locks live in the manager for the lifetime of the process — for
internal/collab/manager.go:233
↓ 5 callersFunctionitemOpenCmdWithOpener
(opener func(string) error)
cmd/pad/cmd_item.go:774
↓ 5 callersMethoditemsPath
()
internal/server/middleware_verified_email_test.go:115
↓ 5 callersFunctionlatchMissing
* Latch the permanent placeholder for a row the server says is * gone. Same end state as the deletion broadcast, reached by a * different rout
web/src/lib/components/editor/attachment-image.ts:549
↓ 5 callersFunctionmaskAPIKey
maskAPIKey returns the display form of a sensitive setting value. Keys longer than 8 chars show their first and last 4 chars (abcd...wxyz); shorter no
internal/server/handlers_admin.go:93
↓ 5 callersFunctionmintOAuthTokenForTest
mintOAuthTokenForTest drives the consent → token exchange and returns the access token. Lightly customizable via the form arg so callers can vary the
internal/server/handlers_mcp_test.go:1634
↓ 5 callersFunctionmkAdminBearerReq
BUG-1616 extended coverage — admin-via-bearer gate at the SSE and WebSocket-collab entry points that sit OUTSIDE RequireWorkspaceAccess. These endpoin
internal/server/handlers_admin_bearer_gate_test.go:37
↓ 5 callersFunctionmustCreateUser
(t *testing.T, srv *Server, email, name, role string)
internal/server/token_workspace_consent_scope_test.go:45
↓ 5 callersFunctionneedsValueByKey
(resp ItemCopyPreflight, key string)
internal/server/handlers_items_copy_preflight_test.go:249
↓ 5 callersFunctionnewBearerGateItemFixture
(t *testing.T)
internal/server/handlers_items_test.go:2560
↓ 5 callersFunctionnewCopyAttachmentFixture
(t *testing.T)
internal/server/handlers_items_copy_attachment_authz_test.go:56
↓ 5 callersFunctionnewCopyFanoutObserver
(t *testing.T, f *copyPreflightFixture)
internal/server/handlers_items_copy_test.go:557
↓ 5 callersFunctionnewDerivationFixture
(t *testing.T)
internal/server/handlers_attachments_thumbnails_parent_test.go:35
↓ 5 callersFunctionnewRootCmd
newRootCmd constructs the pad CLI's root cobra command tree. Extracted from main() so tests can use the real tree (golden snapshots, schema validatio
cmd/pad/main.go:90
↓ 5 callersFunctionnewWebhookTestWorkspace
newWebhookTestWorkspace creates a user + workspace so webhook FK constraints are satisfied, and returns the workspace ID.
internal/store/webhooks_test.go:16
↓ 5 callersFunctionnormalizeCollectionSlug
normalizeCollectionSlug maps common singular/short forms to actual collection slugs. Thin wrapper around the shared collections.NormalizeSlug so the C
cmd/pad/cmd_collection.go:498
↓ 5 callersMethodobserveOAuthFlowDuration
observeOAuthFlowDuration records the elapsed time since `start` for the given stage. Designed to be `defer`'d at the top of each OAuth flow handler so
internal/server/handlers_oauth.go:135
↓ 5 callersFunctionopen
* Open the workspace's IDB database for the given user, creating * object stores on first run. Cached so subsequent calls reuse the * connection. Re
web/src/lib/stores/localIndexPersistence.ts:98
↓ 5 callersFunctionpaneFocusables
( container: HTMLElement, isVisible: (el: HTMLElement) => boolean = isFocusableVisible, )
web/src/lib/collections/paneFocus.ts:37
↓ 5 callersFunctionparseFieldKVP
parseFieldKVP normalizes the --field flag's various wire shapes (single string, []string, []any) into a `key→value` map. Empty / invalid entries are s
internal/mcp/dispatch_http.go:892
↓ 5 callersMethodpatch
(path string, body interface{}, result interface{})
internal/cli/client.go:1603
↓ 5 callersMethodpathFor
pathFor returns the full on-disk path for a given hash. Callers MUST have already validated the hash via validHash — this function does not re-check,
internal/attachments/fs_store.go:61
↓ 5 callersFunctionpercentile
percentile returns the linearly-interpolated p-quantile (p in [0,1]) of vals, rounded to 1 decimal. 0 for an empty sample. Computed in Go so the same
internal/store/reports.go:944
↓ 5 callersFunctionpostOAuthLogin
postOAuthLogin fires a cloud-secret-authenticated oauth-login request and returns the recorder. The cloud secret rides the JSON body (the same channel
internal/server/handlers_oauth_provider_test.go:21
↓ 5 callersMethodpublishEventWithName
publishEventWithName publishes a real-time event with actor name.
internal/server/handlers_documents.go:223
↓ 5 callersFunctionreadConfig
(t *testing.T, path string)
internal/mcp/install_test.go:819
↓ 5 callersFunctionreconcile
* Recompute and apply the desired inert set from scratch. This is the ONLY * mutator: release doesn't undo its own writes, it re-derives the truth fr
web/src/lib/a11y/viewerBackdrop.ts:96
↓ 5 callersMethodrecordMCPAuthzDenial
recordMCPAuthzDenial bumps the pad_mcp_authz_denials_total counter when the request originated from the MCP surface. The discriminator is the presence
internal/server/middleware_auth.go:734
↓ 5 callersFunctionremoteCfg
remoteCfg builds a Config wired to point at the given test server URL.
cmd/pad/init_test.go:37
↓ 5 callersFunctionremoteHeadlessCfg
remoteHeadlessCfg builds a Config wired to point at the given httptest server URL in Remote mode. Remote mode makes EnsureServer a no-op.
cmd/pad/setup_headless_test.go:78
↓ 5 callersFunctionrenderItemsGroupedByCollectionMarkdown
renderItemsGroupedByCollectionMarkdown is the markdown counterpart of printItemsGroupedByCollection (#898): one `## Icon Name (N)` heading per collect
cmd/pad/cmd_item.go:457
↓ 5 callersMethodrequireCommentVisible
requireCommentVisible checks that a comment's underlying item is in a visible collection. Writes a 404 and returns false if not.
internal/server/handlers_comments.go:484
↓ 5 callersMethodresolveAttachmentParentItem
resolveAttachmentParentItem loads and validates the parent item of an attachment row that has ALREADY been established as live and belonging to the re
internal/server/attachments_authz.go:73
↓ 5 callersMethodresolveRoleSlug
resolveRoleSlug rewrites a `--role <slug>` input into `agent_role_id <uuid>` by hitting the agent-roles endpoint and finding a matching role. Mirrors
internal/mcp/dispatch_http_advanced.go:92
↓ 5 callersMethodrestore
(t *testing.T)
internal/server/handlers_items_collab_versions_test.go:625
↓ 5 callersFunctionretryOnParentSetChanged
retryOnParentSetChanged runs fn, retrying (up to maxParentLockRetries) while it returns errParentSetChanged. fn MUST open and own its own transaction
internal/store/items.go:4043
↓ 5 callersFunctionrevalidateAttachmentMetadata
( workspaceSlug: string, uuid: string, getDownloadUrl: AttachmentUrlBuilder, options?: MetadataFetchOption
web/src/lib/components/editor/attachment-metadata.ts:202
↓ 5 callersFunctionsampleConvention
()
internal/artifact/encode_test.go:38
↓ 5 callersFunctionscanActivitiesWithUser
(rows interface { Next() bool Scan(dest ...interface{}) error Err() error })
internal/store/activities.go:480
↓ 5 callersFunctionscanItems
(rows *sql.Rows)
internal/store/items.go:4738
↓ 5 callersFunctionscanUser
scanUser scans a user row into a User struct. Note: does NOT decrypt the TOTP secret — call store.decryptUserTOTP() after scanning if you need the pla
internal/store/users.go:35
↓ 5 callersFunctionseedAccess
seedAccess inserts an access-token row in the chain identified by requestID. ts is the requested_at timestamp; sessionData + scopes land on the row. R
internal/store/connected_apps_test.go:77
↓ 5 callersFunctionseedClient
seedClient creates an oauth_clients row so chains have something to FK against. Returns the client ID.
internal/store/connected_apps_test.go:42
↓ 5 callersFunctionseedGrantChain
seedGrantChain inserts one access-token row in a chain. Returns the request_id so tests can revoke / list / audit by it.
internal/server/handlers_connected_apps_test.go:71
↓ 5 callersFunctionseedWorkspaceForConn
seedWorkspaceForConn creates a workspace and returns its ID — the join table stores workspace IDs, so tests need a real row.
internal/store/oauth_connections_test.go:48
↓ 5 callersMethodsetSourceContent
setSourceContent rewrites the source item's body — the attacker's own legitimate edit of an item they hold, which is the whole vector.
internal/server/handlers_items_copy_attachment_authz_test.go:94
↓ 5 callersFunctionsetupEnsureWorkspaceTest
setupEnsureWorkspaceTest produces a clean tempdir, points HOME at a tempdir (so credential/config writes don't leak), chdirs into the project so cli.D
cmd/pad/init_test.go:20
↓ 5 callersMethodsnapshot
()
internal/server/handlers_items_copy_preflight_test.go:846
↓ 5 callersFunctionsoftDeleteWorkspaceAt
softDeleteWorkspaceAt stamps a workspace's deleted_at to a specific time so the sweep's age cutoff can be exercised deterministically — there's no API
internal/server/workspace_purge_test.go:36
↓ 5 callersMethodsseSubscriberStillHasAccess
sseSubscriberStillHasAccess re-runs the workspace access check for an already-subscribed SSE client. Returns false when the caller can no longer see t
internal/server/handlers_events.go:609
↓ 5 callersFunctiontokenScopeAllows
tokenScopeAllows checks if the token's scopes permit the given HTTP method and path. Scopes are stored as a JSON array of strings. Supported scopes (
internal/server/middleware_auth.go:1155
↓ 5 callersFunctiontp
A touch pointer event, dispatched on the IMAGE by default (the painted-image hit).
web/src/lib/components/common/Lightbox.svelte.test.ts:2711
↓ 5 callersFunctionvariantRow
variantRow looks up a derived variant of parentID. GetAttachmentVariant is workspace-scoped (PLAN-2391 DR-16), so the scope is read back off the paren
internal/server/handlers_attachments_thumbnails_test.go:26
↓ 5 callersMethodwaitForUpdate
()
internal/webhooks/dispatcher_test.go:55
↓ 5 callersFunctionwithAuthorizer
(req AttachmentCopyRequest, auth AttachmentAuthorizer)
internal/store/attachments_copy_plan_test.go:1087
↓ 5 callersFunctionwithLocalFetcher
withLocalFetcher replaces the package-level fetcher with one that allows loopback dials so httptest.NewServer addresses (127.0.0.1) can be reached. Re
internal/server/handlers_import_test.go:17
↓ 4 callersMethodCheckUserLimit
CheckUserLimit checks a user-level limit (not workspace-scoped), such as total workspace count or total API tokens.
internal/store/limits.go:139
↓ 4 callersFunctionCleanup
Cleanup removes the process-wide template database, if one was built. Call it from TestMain after m.Run() so a lazily-built template file doesn't ling
internal/store/storetest/storetest.go:113
↓ 4 callersFunctionCopyCommitted
CopyCommitted reports whether err is a post-commit reporting failure — the copy happened, only its result was lost. Callers must not present these as
internal/cli/client_items_copy.go:305
↓ 4 callersMethodCopyItemPreflight
CopyItemPreflight runs the DRY RUN. It mutates nothing in the copy's own domain, so it is safe to call repeatedly and safe to retry. Returns the deco
internal/cli/client_items_copy.go:251
↓ 4 callersMethodCreateAuthorizationCode
============================================================ Authorization codes (handler/oauth2/storage.go AuthorizeCodeStorage) ====================
internal/store/oauth.go:261
↓ 4 callersFunctionCreatePatch
CreatePatch computes a compact patch that transforms oldText into newText. The patch can be applied with ApplyPatch to recover newText from oldText.
internal/diff/diff.go:16
↓ 4 callersFunctionCreateReversePatch
CreateReversePatch computes a patch that transforms newText back into oldText. Used for reverse-diff version storage: current doc has latest content,
internal/diff/diff.go:55
↓ 4 callersMethodCreateView
CreateView adds a new saved view.
internal/store/views.go:11
↓ 4 callersMethodEncryptWebhookSecretsAtRest
EncryptWebhookSecretsAtRest encrypts plaintext webhook HMAC secrets (BUG-2057). Called on startup when an encryption key is configured. It handles two
internal/store/encryption.go:165
↓ 4 callersFunctionExtractItemDecisionLog
(fieldsJSON string)
internal/models/item.go:426
↓ 4 callersFunctionExtractWorkspaceContext
(raw string)
internal/models/workspace_settings.go:118
↓ 4 callersMethodFTSRank
FTSRank returns the column/expression for full-text relevance ranking. SQLite: rank (built-in FTS5 column) — consumes ZERO args. PostgreSQL: ts_rank b
internal/store/dialect.go:99
↓ 4 callersFunctionFindAgent
FindAgent returns the matching Agent for a name or alias. Names are case-insensitive (Claude / claude / CLAUDE all resolve).
internal/mcp/install.go:118
↓ 4 callersFunctionGenerateUsername
--- Username backfill --- GenerateUsername derives a URL-safe username from a display name. Falls back to the email local part if the name produces an
internal/store/users.go:1053
↓ 4 callersMethodGetAgentRole
(workspaceID, idOrSlug string)
internal/store/agent_roles.go:39
↓ 4 callersMethodGetChildItemsForParents
GetChildItemsForParents returns the live child items for each of the given parent item IDs, grouped by parent ID, in ONE query — collapsing the per-pa
internal/store/items.go:4221
↓ 4 callersMethodGetCollectionAnyState
GetCollectionAnyState is GetCollection without the `deleted_at IS NULL` filter — used by the open-children guard (IDEA-1494 R3 P3) so a child still at
internal/store/collections.go:188
↓ 4 callersMethodGetDeletedWorkspaceBySlug
GetDeletedWorkspaceBySlug returns a SOFT-DELETED workspace by slug (deleted_at IS NOT NULL), including its owner_id, or nil when no such row exists (l
internal/store/workspaces.go:307
↓ 4 callersMethodGetInvitationByCode
GetInvitationByCode retrieves a pending invitation by its join code. Looks up by SHA-256 hash first (new invitations), then falls back to plaintext lo
internal/store/workspace_members.go:688
↓ 4 callersFunctionGetLibraryPlaybook
GetLibraryPlaybook finds a playbook in the library by its title. Returns nil if no playbook with the given title exists.
internal/collections/playbook_library.go:80
↓ 4 callersMethodGetUserByUsername
GetUserByUsername retrieves a user by username (case-insensitive).
internal/store/users.go:146
↓ 4 callersMethodGetView
GetView returns a single view by ID.
internal/store/views.go:47
↓ 4 callersMethodGetWebhook
GetWebhook retrieves a single webhook by ID.
internal/store/webhooks.go:40
↓ 4 callersFunctionGroupTemplatesByCategory
GroupTemplatesByCategory returns the visible workspace templates grouped by category in the canonical CategoryOrder. Categories with no visible templa
internal/collections/templates.go:66
↓ 4 callersMethodHasEncryptionKey
HasEncryptionKey reports whether an encryption key is configured.
internal/store/encryption.go:24
↓ 4 callersFunctionIsDiffSmaller
IsDiffSmaller returns true if storing a diff would be meaningfully smaller than storing the full content. Returns false for near-complete rewrites whe
internal/diff/diff.go:45
↓ 4 callersMethodListAgentRoles
(workspaceID string)
internal/store/agent_roles.go:63
↓ 4 callersMethodListAgentRoles
--- Agent Roles --- ListAgentRoles returns all agent roles for a workspace.
internal/cli/client.go:709
↓ 4 callersMethodListCollectionsMinimal
ListCollectionsMinimal returns collection rows populated with just the fields needed for done-detection context and slug lookups: ID, Slug, Schema, Se
internal/store/collections.go:218
← previousnext →801–900 of 7,856, ranked by callers