MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions7,856 in github.com/PerpetualSoftware/pad

↓ 4 callersFunctionlistCmd
()
cmd/pad/cmd_item.go:270
↓ 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:797
↓ 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:1724
↓ 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 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:926
↓ 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:1257
↓ 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 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:569
↓ 4 callersFunctionparseFields
(item: Item)
web/src/lib/types/index.ts:1915
↓ 4 callersFunctionparseItemFields
(fieldsJSON string)
internal/models/item.go:523
↓ 4 callersFunctionparseMutableItemFields
(fieldsJSON string)
internal/models/item.go:534
↓ 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 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:343
↓ 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 callersFunctionrenderItemCopyResult
renderItemCopyResult writes the outcome of a completed copy.
cmd/pad/cmd_item.go:1919
↓ 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
↓ 4 callersFunctionsaveCredentials
(cfg *config.Config, resp *cli.LoginResponse)
cmd/pad/cmd_auth.go:676
↓ 4 callersFunctionschemaHasField
schemaHasField returns true if the collection schema defines a field with the given key.
internal/server/handlers_items.go:2525
↓ 4 callersFunctionschemaTypeBrief
schemaTypeBrief returns a one-line type description for a schema proxy: the declared type, format if present, item type for arrays, or the ref name fo
internal/urlimport/openapi.go:450
↓ 4 callersMethodseedItem
seedItem creates a collection (idempotent on slug) + an item with the given title, returning the resolved item record.
internal/server/handlers_ref_resolver_test.go:99
↓ 4 callersFunctionsendSync
(t *testing.T, c *websocket.Conn, payload byte)
internal/collab/manager_test.go:386
↓ 4 callersFunctionsetCSRFCookie
setCSRFCookie writes a new CSRF token cookie. The cookie is NOT HttpOnly so that JavaScript can read it and send it back as a header.
internal/server/middleware_csrf.go:299
↓ 4 callersFunctionsetupItemOpenTest
(t *testing.T, handler http.Handler)
cmd/pad/item_open_test.go:15
↓ 4 callersFunctionsetupOwnedDeletedWorkspace
setupOwnedDeletedWorkspace registers Alice + Bob, has Alice create and then soft-delete a workspace, and returns their tokens plus the workspace. Shar
internal/server/handlers_workspaces_test.go:154
↓ 4 callersFunctionshowMissing
()
web/src/lib/components/editor/attachment-image.ts:484
↓ 4 callersMethodsince
since returns all buffered events with ID > sinceID, in chronological order. Returns nil if sinceID is older than the oldest buffered event AND the bu
internal/events/bus.go:187
↓ 4 callersFunctionsingleLine
singleLine collapses internal whitespace and newlines for safe inclusion in a markdown table cell.
internal/urlimport/openapi.go:488
↓ 4 callersMethodsnapshotBeforeMigrate
snapshotBeforeMigrate copies the live SQLite database file to <db>.pre-<VERSION> before any pending migrations run, so a botched upgrade can be rolled
internal/store/migration_guard.go:107
↓ 4 callersFunctionsortedActionNames
sortedActionNames returns def.Actions' keys in lexical order. Used for both the schema's action enum (so the ordering is stable across builds and repr
internal/mcp/catalog.go:381
↓ 4 callersFunctionssrSafe
()
web/src/lib/stores/localSearch.svelte.ts:354
↓ 4 callersFunctionstreamWatchEvents
streamWatchEvents reads SSE lines from an open connection, printing formatMonitorLine for each "notification" event, until the body is exhausted (conn
cmd/pad/cmd_watch.go:394
↓ 4 callersFunctiontightenPerms
tightenPerms sets path to 0600 if it exists. Best-effort: errors only emit a warning to stderr (the user's primary intent — install / no-op — already
internal/mcp/install.go:250
↓ 4 callersFunctiontoIdle
()
web/src/lib/attachments/viewerImageLoader.svelte.ts:163
↓ 4 callersFunctiontoSkinny
* Strip a row down to the skinny shape. Defensive: discard `content` * if a caller passed a full `Item` rather than an `ItemIndexRow`. The * destruc
web/src/lib/stores/localIndex.svelte.ts:158
↓ 4 callersFunctiontransformOf
The `transform` inline style on the viewer's image (empty before it mounts).
web/src/lib/components/common/Lightbox.svelte.test.ts:210
↓ 4 callersMethoduniqueSlug
uniqueSlug generates a unique slug within a scope by appending -2, -3, etc.
internal/store/store.go:1127
↓ 4 callersFunctionunwrapItems
unwrapItems extracts the array from a `{items: [...]}` envelope — the post-BUG-985 shape ExecDispatcher and packageHTTPResponse use for top-level arra
internal/mcp/dispatch_http_links_test.go:460
↓ 4 callersFunctionuploadedAttachmentID
uploadedAttachmentID pulls the new attachment's id out of a 201 upload response body.
internal/server/handlers_attachments_test.go:334
↓ 4 callersFunctionupstreamHTTPErrorResult
upstreamHTTPErrorResult is the canonical wrapper for "the dispatcher made an HTTP call that returned a non-2xx" cases outside the main executeRequest/
internal/mcp/errors.go:1264
↓ 4 callersFunctionvariantUrl
* The URL for one variant. `original` is the CANONICAL, no-`?variant` download — * that is what "the original" IS on the server (it serves the origin
web/src/lib/attachments/viewerImageLoader.svelte.ts:139
↓ 4 callersFunctionviewerClose
(page: Page)
web/e2e/lib/attachment-viewer.ts:148
↓ 4 callersFunctionwrapItemNotFound
wrapItemNotFound rewrites a bare "not_found" APIError from the item-by-ref endpoints into a message that echoes the failing ref and workspace, so `pad
internal/cli/client.go:267
↓ 4 callersMethodwrite
write performs a single insert with a per-call timeout. DB errors log + drop the row — there's no retry path because the audit log is best-effort by d
internal/server/middleware_mcp_audit.go:159
↓ 4 callersFunctionwriteAttachmentNotFound
writeAttachmentNotFound is the single denial writer for the blob read path. Every authorization-dependent refusal — attachment missing, wrong workspac
internal/server/handlers_attachments.go:524
↓ 4 callersFunctionwriteConfig
(t *testing.T, path string, data map[string]any)
internal/mcp/install_test.go:805
↓ 4 callersFunctionwriteRateLimitResponse
writeRateLimitResponse sends a 429 response with Retry-After and X-RateLimit-* headers.
internal/server/middleware_ratelimit.go:621
↓ 4 callersFunctionwriteSSEEvent
writeSSEEvent writes a single SSE event to the response writer. If eventID > 0, an "id:" field is included for Last-Event-ID support. Returns nil for
internal/server/handlers_events.go:696
↓ 3 callersFunctionAllToolNames
AllToolNames returns all valid names and aliases that can be passed to `pad agent install`.
internal/cli/agents.go:236
↓ 3 callersFunctionAppendDecisionLogEntry
(fieldsJSON string, entry ItemDecisionLogEntry)
internal/models/item.go:463
↓ 3 callersFunctionAppendImplementationNote
(fieldsJSON string, note ItemImplementationNote)
internal/models/item.go:451
↓ 3 callersMethodAsOpenChildren
AsOpenChildren returns the parsed open-children details when this APIError carries them, or nil otherwise. Returns nil for any error other than "open_
internal/cli/client.go:1142
↓ 3 callersFunctionAttachmentDownloadURL
AttachmentDownloadURL builds the canonical attachment download URL. Pass an empty variant for the original; otherwise "thumb-sm" / "thumb-md" (the ser
internal/server/render/attachments.go:63
↓ 3 callersMethodBackfillStatusTransitions
BackfillStatusTransitions populates status_transitions from history in two passes, designed to be called once from server startup after migrations run
internal/store/status_transitions_backfill.go:149
↓ 3 callersMethodCancelCustomer
CancelCustomer asks pad-cloud to cancel every active Stripe subscription for customerID and then delete the Stripe customer object. Idempotent at the
internal/billing/cloud_client.go:195
↓ 3 callersMethodCapabilities
Capabilities reports what this backend can do. The editor reads these flags via GET /api/v1/server/capabilities and gates rotate/crop UI on per-format
internal/attachments/processor.go:71
↓ 3 callersFunctionCategoryLabel
CategoryLabel returns the human-readable label for a category slug. Unknown categories are returned unchanged so the picker can still render a reasona
internal/collections/templates.go:49
↓ 3 callersFunctionChildLinkTypes
ChildLinkTypes is the exported, read-only view of childLinkTypes (items.go) — the link types GetChildItems walks to find an item's children. It exist
internal/store/link_types.go:17
← previousnext →1,001–1,100 of 7,856, ranked by callers