MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions8,091 in github.com/PerpetualSoftware/pad

↓ 4 callersMethoddoClaimCodeGet
()
internal/server/handlers_claim_code_test.go:95
↓ 4 callersFunctiondoHeadlessBootstrap
doHeadlessBootstrap is the shared core of the non-interactive (agent) admin bootstrap introduced by BUG-988. Both setupCmd and padInitCmd funnel throu
cmd/pad/cmd_auth.go:240
↓ 4 callersFunctiondocsCollection
docsCollection returns the standard Docs collection shared across templates.
internal/collections/templates.go:248
↓ 4 callersMethoddown
Press a finger down at (x, y); sends `touchStart` with the full active set.
web/e2e/lib/attachment-viewer.ts:349
↓ 4 callersFunctiondrainSSE
drainSSE collects everything published to a workspace's channel, giving stragglers a short window to arrive.
internal/server/handlers_items_copy_test.go:633
↓ 4 callersMethoddrainWebhooks
drainWebhooks collects deliveries over one quiet window. The window is a wait for something that must NOT arrive in half these assertions, so it is ge
internal/server/handlers_items_copy_test.go:649
↓ 4 callersFunctiondroppedByKey
(resp ItemCopyPreflight, key string)
internal/server/handlers_items_copy_preflight_test.go:240
↓ 4 callersMethodemailUnverifiedBlocked
emailUnverifiedBlocked is the central predicate for PLAN-1933 DR-4's email-verification gate. It reports whether a request carrying `user` must be rej
internal/server/middleware_verified_email.go:41
↓ 4 callersMethodenforcePlanLimit
--- Plan Limit Enforcement --- enforcePlanLimit checks a workspace-scoped plan limit and writes a 403 error if the limit is exceeded. Returns true if
internal/server/handlers_cloud.go:1078
↓ 4 callersMethodensureRouter
ensureRouter lazily initializes the router on first use, so all Set* configuration is applied before the middleware chain is built.
internal/server/server.go:1866
↓ 4 callersFunctionensureState
(ws: string)
web/src/lib/stores/localIndex.svelte.ts:143
↓ 4 callersFunctionescapeMarkdownCell
escapeMarkdownCell makes an arbitrary string safe INSIDE a table cell: it sanitizes as above, then escapes backslashes and pipes. Order matters. Esca
internal/cli/format_markdown.go:48
↓ 4 callersMethodevict
evict removes an entry. No-op on empty id or unknown id. Fires onChange only when an entry was actually removed. See touch's comment for why onChange
internal/server/middleware_mcp_session.go:128
↓ 4 callersMethodfetcherFor
(user *models.User)
internal/mcp/resources_http_attachment_acl_test.go:112
↓ 4 callersFunctionfileRef
(id string)
internal/store/attachments_copy_plan_test.go:106
↓ 4 callersFunctionflush
( ctx: CollabFlushContext, markdown: string, keepalive: boolean, )
web/src/lib/collab/collabFlush.svelte.ts:171
↓ 4 callersFunctionforcePlainColor
forcePlainColor disables ANSI so width/content assertions are deterministic regardless of whether the test binary's stdout happens to be a TTY.
internal/cli/format_test.go:15
↓ 4 callersFunctionfrontRoot
()
web/src/lib/a11y/viewerBackdrop.ts:64
↓ 4 callersFunctiongetCSRFToken
()
web/src/lib/api/client.ts:404
↓ 4 callersMethodgetItemTx
getItemTx is the in-transaction variant of GetItem. Used by UpdateItemWithPreCheck to re-read the parent under the workspace + parent-children locks s
internal/store/items.go:601
↓ 4 callersFunctiongetNaturalBoundsPx
()
web/src/lib/components/editor/attachment-crop-modal.ts:297
↓ 4 callersFunctionguardSchemaAhead
guardSchemaAhead refuses to start when the database contains migrations this binary doesn't ship — i.e. the DB is AHEAD of the binary, the tell-tale o
internal/store/migration_guard.go:62
↓ 4 callersFunctionhandleCmdhelpCapabilitiesFallback
handleCmdhelpCapabilitiesFallback scans args for the --cmdhelp-capabilities flag (cmdhelp v0.1 §8 fallback form). If found, it writes the capability b
cmd/pad/main.go:70
↓ 4 callersMethodhandleCopyItem
handleCopyItem copies one item into another workspace, optionally archiving the source. See the file header for the full contract.
internal/server/handlers_items_copy.go:295
↓ 4 callersFunctionhead
(s string, lines int)
internal/cmdhelp/md_test.go:371
↓ 4 callersMethodinsertOAuthRequestRow
============================================================ Helpers — shared by the three "request-row" tables ======================================
internal/store/oauth.go:575
↓ 4 callersFunctioninvalidateAttachmentMetadata
(workspaceSlug: string, uuid: string)
web/src/lib/components/editor/attachment-metadata.ts:146
↓ 4 callersFunctionisBlockedByModal
(owner?: Element | null, event?: Event | null)
web/src/lib/a11y/viewerBackdrop.ts:376
↓ 4 callersFunctionisDeadlockError
isDeadlockError reports whether err is a genuine deadlock — Postgres' SQLSTATE 40P01. It deliberately does NOT match SQLite's "database is locked"; se
internal/store/items_cross_workspace_copy.go:1163
↓ 4 callersFunctionisReadOnlyAction
isReadOnlyAction reports whether (toolName, action) performs no mutation. Defaults to false (write) for any pair not in the allowlist — the conservati
internal/mcp/tool_surface.go:181
↓ 4 callersFunctionisSupportedOAuthProvider
isSupportedOAuthProvider reports whether provider is one pad accepts.
internal/server/handlers_cloud.go:34
↓ 4 callersFunctionisUUID
(s string)
internal/server/handlers_items.go:2655
↓ 4 callersFunctionitemCopyList
itemCopyList renders a list of server-supplied strings. Every element is quoted, unconditionally — unlike itemCopyLine, which quotes only when it mus
cmd/pad/cmd_item.go:2286
↓ 4 callersFunctionitemDisplayLabel
(item *models.Item)
cmd/pad/lineage.go:205
↓ 4 callersFunctionitemRefOrSlug
itemRefOrSlug formats an item's issue ref (e.g. "TASK-5") when its collection prefix + item number are populated, falling back to its slug. Avoids pul
internal/server/handlers_items_open_children_guard.go:99
↓ 4 callersFunctionitoa
itoa is strconv.Itoa renamed to keep test bodies readable when they're already heavy on ref-formatting.
internal/store/wiki_links_test.go:1698
↓ 4 callersFunctionlistCmd
()
cmd/pad/cmd_item.go:377
↓ 4 callersFunctionliveAttachmentCount
liveAttachmentCount counts the workspace's live, non-derived attachment rows — the quota-counted surface a refused transform must not grow.
internal/server/handlers_attachments_transform_authz_test.go:132
↓ 4 callersFunctionmakeEditor
(element: HTMLElement, address = DEFAULT_ADDRESS)
web/src/lib/components/editor/attachmentImageMissing.svelte.test.ts:83
↓ 4 callersFunctionmakeEditor
(element: HTMLElement, address = () => ADDRESS)
web/src/lib/components/editor/attachmentChipPanel.svelte.test.ts:61
↓ 4 callersFunctionmapRoleUpdate
mapRoleUpdate dispatches `pad role update <slug> [--name ...] [--slug ...] [--description ...] [--icon ...] [--tools ...] [--sort-order ...]`. PATCH
internal/mcp/dispatch_http_routes.go:806
↓ 4 callersFunctionmarshalItemFields
(fieldsMap map[string]any)
internal/models/item.go:545
↓ 4 callersFunctionmkACLUser
(t *testing.T, st *store.Store, email string)
internal/mcp/resources_http_attachment_acl_test.go:134
↓ 4 callersFunctionmkAdminCookieReq
mkAdminCookieReq is the same shape minus the Authorization header. Simulates the cookie-session path where isBearerAuth must return false and the admi
internal/server/handlers_admin_bearer_gate_test.go:47
↓ 4 callersFunctionmount
(html: string)
web/src/lib/collections/paneFocus.svelte.test.ts:17
↓ 4 callersFunctionmustCollection
(t *testing.T, srv *Server, wsID, name string)
internal/server/authz_cross_workspace_test.go:105
↓ 4 callersFunctionmustCreateOwnedWorkspace
(t *testing.T, srv *Server, name string, owner *models.User)
internal/server/token_workspace_consent_scope_test.go:56
↓ 4 callersFunctionmustCreatePATForTest
mustCreatePATForTest creates a real PAT against a fresh user + workspace. Returns the raw token string suitable for the Authorization: Bearer header.
internal/server/handlers_mcp_test.go:1831
↓ 4 callersFunctionmustLegacyPlanLink
--- TASK-2369: the ACL filter must be visible, and must not leak ------- mustLegacyPlanLink writes an item_links row carrying the pre-rename "plan" li
internal/server/handlers_items_copy_preflight_test.go:1503
↓ 4 callersFunctionmustWorkspaceID
mustWorkspaceID resolves a workspace slug to its internal ID via the store. Tests use it because they don't have access to the request context that ge
internal/server/handlers_attachments_test.go:823
↓ 4 callersFunctionnewAttachmentACLFixture
(t *testing.T)
internal/mcp/resources_http_attachment_acl_test.go:39
↓ 4 callersFunctionnewParentFixture
(t *testing.T)
internal/mcp/dispatch_http_clear_parent_test.go:46
↓ 4 callersFunctionnewRestoreCollabFixture
(t *testing.T, name string)
internal/server/handlers_items_collab_versions_test.go:566
↓ 4 callersFunctionnoBearerRequest
noBearerRequest returns a bare request with no Authorization header — isBearerAuth(r) reports false for it, matching a cookie-session-style caller. No
internal/server/handlers_watch_access_test.go:17
↓ 4 callersFunctionnormalizeServerURL
normalizeServerURL canonicalizes a server URL for use as a credential key. Trailing slash and surrounding whitespace are stripped; nothing else is tou
internal/cli/credentials.go:256
↓ 4 callersFunctionnormalizeWebhookEvents
normalizeWebhookEvents canonicalizes a webhook's event filter to the JSON-array string the store + dispatcher expect. Returns (value, true) when a no
internal/mcp/dispatch_http_routes.go:935
↓ 4 callersFunctionnotifyAttachmentDeleted
(uuid: string)
web/src/lib/attachments/events.ts:45
↓ 4 callersFunctionnotifyAttachmentSurfaceOpen
(event: AttachmentSurfaceOpenEvent)
web/src/lib/attachments/events.ts:457
↓ 4 callersFunctionnthPositional
nthPositional returns pos[n] or "" when absent.
internal/mcp/resources_http.go:319
↓ 4 callersFunctionnumericInput
numericInput pulls an int64 out of a JSON-typed input value. JSON decoders deliver numbers as float64 (or json.Number when UseNumber()); we accept bot
internal/mcp/dispatch_http_routes.go:1334
↓ 4 callersMethodoauthRequestToFositeRequest
oauthRequestToFositeRequest hydrates a stored row into a fresh fosite.Request, fetching the client by ID and unmarshalling the session bytes into the
internal/oauth/storage.go:495
↓ 4 callersMethodonError
Surface an upload failure to the user.
web/src/lib/utils/commentAttachments.ts:99
↓ 4 callersMethodopenBootstrapEnabled
openBootstrapEnabled reports whether open-bootstrap is active for this server: bypass flag is set AND we're not in cloud mode. Cloud mode always wins
internal/server/bootstrap.go:199
↓ 4 callersFunctionpaneNavInFlight
()
web/src/lib/collections/paneHostController.ts:147
↓ 4 callersMethodparentLink
(t *testing.T)
internal/mcp/dispatch_http_clear_parent_test.go:133
↓ 4 callersFunctionparseCollectionFieldsDSL
parseCollectionFieldsDSL parses the CLI's --fields DSL into a {fields: [...]} map ready for json.Marshal. Empty input returns an empty Fields slice (t
internal/mcp/dispatch_http_routes.go:578
↓ 4 callersFunctionparseFields
(item: Item)
web/src/lib/types/index.ts:2001
↓ 4 callersFunctionparseItemFields
(fieldsJSON string)
internal/models/item.go:523
↓ 4 callersFunctionparseMutableItemFields
(fieldsJSON string)
internal/models/item.go:534
↓ 4 callersFunctionparseSessionIdentity
parseSessionIdentity reads the self-declared session identity off a stream request. It never fails: every malformed input degrades to the S1 behaviour
internal/server/session_identity.go:63
↓ 4 callersFunctionparseWorkspaceSettingsMap
(raw string)
internal/models/workspace_settings.go:148
↓ 4 callersFunctionprStateColor
(state string)
cmd/pad/cmd_github.go:406
↓ 4 callersMethodpreflightAsAttacker
preflightAsAttacker runs the dry run as the restricted editor and returns both the parsed response and the RAW bytes, because one of the assertions be
internal/server/handlers_items_copy_attachment_authz_test.go:104
↓ 4 callersMethodpublishCommentEvent
publishCommentEvent publishes a real-time event for comment changes.
internal/server/handlers_comments.go:494
↓ 4 callersFunctionpushCmd
pushCmd is `pad push <ref> -m "message"` (IDEA-2544 Phase 1) — the "push this to my agent" verb: an explicit, user-authored instruction bound to an it
cmd/pad/cmd_push.go:30
↓ 4 callersMethodqueryOAuthRequestRow
queryOAuthRequestRow reads a row by signature from the named table and returns (request, active, err). - For oauth_pkce_requests, active is always tr
internal/store/oauth.go:671
↓ 4 callersFunctionrawPeerAddr
rawPeerAddr returns the untampered TCP peer address captured by CapturePeerAddr, falling back to the current r.RemoteAddr if the middleware wasn't ins
internal/server/middleware_realip.go:32
↓ 4 callersFunctionread
()
web/src/lib/attachments/hostAddress.test.ts:26
↓ 4 callersMethodreadItem
readItem handles pad://workspace/{ws}/items/{ref}. Why JSON-then-format instead of `--format markdown`: pad's CLI `--format markdown` for `item show`
internal/mcp/resources.go:315
↓ 4 callersFunctionreadMigrationNames
readMigrationNames returns sorted .sql filenames from an embedded FS directory.
internal/store/store.go:275
↓ 4 callersFunctionreadTOML
Helpers ------------------------------------------------------------------
internal/mcp/install_test.go:792
↓ 4 callersFunctionreconcileNewItem
(t *testing.T, srv *Server, slug, content string)
internal/server/handlers_item_versions_test.go:28
↓ 4 callersMethodrecordMCPCallMetrics
recordMCPCallMetrics fans the audit-row data out to Prometheus. No-op when metrics aren't wired (selfhost / tests). Kept separate from MCPAuditLog so
internal/server/middleware_mcp_audit.go:349
↓ 4 callersMethodrecoverSweeper
recoverSweeper is the panic firewall for the long-running background sweeper loops (orphan GC, op-log GC, token reaper, workspace purge). Each of thos
internal/server/server.go:362
↓ 4 callersFunctionrefreshAccessibleName
()
web/src/lib/components/editor/attachment-chip.ts:297
↓ 4 callersFunctionregisterNonAdmin
--- helpers --- registerNonAdmin inserts a member-role user directly into the store and mints a session token for them. Bypasses the admin-registratio
internal/server/handlers_admin_billing_test.go:334
↓ 4 callersFunctionrenderCommentsMarkdown
renderCommentsMarkdown is the markdown counterpart of cli.PrintCommentTable. Comments are not tabular — the terminal form prints an attribution line t
cmd/pad/cmd_item.go:2567
↓ 4 callersFunctionrenderItemCopyResult
renderItemCopyResult writes the outcome of a completed copy.
cmd/pad/cmd_item.go:2145
↓ 4 callersFunctionrenderRect
()
web/src/lib/components/editor/attachment-crop-modal.ts:301
↓ 4 callersMethodreplaceWikiLinks
replaceWikiLinks deletes prior wiki-link rows for `sourceItemID` and inserts fresh ones extracted from `content`. Resolution against the workspace's i
internal/store/wiki_links.go:31
↓ 4 callersFunctionrequestIsLoopback
(r *http.Request)
internal/server/handlers_auth.go:236
↓ 4 callersMethodrequireConnectionOwner
requireConnectionOwner is the per-mutation prologue. Returns the (currentUser, requestID, ok) triple. On `ok=false` the response has already been writ
internal/server/handlers_connected_apps.go:267
↓ 4 callersMethodresourceArgs
()
internal/mcp/resources_http_attachment_acl_test.go:119
↓ 4 callersMethodrespondWithConnection
respondWithConnection re-fetches + writes the connection DTO post- mutation so the page can re-render without a separate list refresh. Stats lookup is
internal/server/handlers_connected_apps.go:293
↓ 4 callersFunctionrestrictedWarnings
(t *testing.T, f *copyPreflightFixture, u *models.User)
internal/server/handlers_items_copy_preflight_test.go:1624
↓ 4 callersFunctionrootFlagsToArgs
rootFlagsToArgs converts a startup root-flags map into the pre-formatted CLI token list every fetch should append. Empty values are skipped (matching
internal/mcp/resources.go:613
↓ 4 callersFunctionrun
(ctx)
web/src/lib/attachments/actions.ts:218
↓ 4 callersMethodrunOpenChildrenGuard
runOpenChildrenGuard executes the guard logic inside the store-layer transaction. Returns: - (nil, nil) when the guard doesn't apply (no transition,
internal/server/handlers_items_open_children_guard.go:155
↓ 4 callersFunctionrunTopEscape
(event?: KeyboardEvent)
web/src/lib/stores/escapeStack.ts:85
↓ 4 callersFunctionsamplePlaybook
()
internal/artifact/encode_test.go:13
← previousnext →1,001–1,100 of 8,091, ranked by callers