Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
6,005 in github.com/PerpetualSoftware/pad
⨍
Functions
6,005
◇
Types & classes
763
↓ 2 callers
Method
publishReactionEvent
publishReactionEvent publishes a real-time event for reaction changes.
internal/server/handlers_comments.go:459
↓ 2 callers
Function
rawJSONOrNil
rawJSONOrNil returns s as json.RawMessage when it is a non-empty, non-empty- container JSON value, else nil (so the field is omitted). Guards against
internal/cli/item_summary.go:79
↓ 2 callers
Function
readBundle
readBundle decompresses + extracts a gzipped tar bundle into a map[name]bytes. Test helper kept here so both export and (later) import tests can read
internal/server/handlers_export_bundle_test.go:283
↓ 2 callers
Function
readChoice
()
cmd/pad/cmd_workspace.go:735
↓ 2 callers
Method
readDashboard
readDashboard handles pad://workspace/{ws}/dashboard.
internal/mcp/resources.go:336
↓ 2 callers
Method
readParentLinkTarget
readParentLinkTarget returns the target_id of an item's `parent` link, or "" when it has none. Parameterized over rowQueryer so it can read either unl
internal/store/items.go:2982
↓ 2 callers
Function
readPassword
()
cmd/pad/cmd_auth.go:703
↓ 2 callers
Function
readRepoFile
readRepoFile reads a file relative to the repo root. Go runs tests with the package directory as the working directory, so the repo root is two levels
internal/mcp/tool_surface_drift_test.go:132
↓ 2 callers
Function
readResourceJSON
readResourceJSON drives a resources/read request through the server for uri and returns the text body. Fails the test on protocol errors, missing cont
internal/mcp/meta_test.go:95
↓ 2 callers
Function
readScrollY
(target: HTMLElement | Window | null)
web/src/lib/scroll/restore.svelte.ts:71
↓ 2 callers
Function
readStructuredEntryBody
()
cmd/pad/notes.go:156
↓ 2 callers
Function
rebindQuery
---------- Helper ---------- rebindQuery converts "?" placeholders to PostgreSQL's "$1", "$2", etc. Respects string literals (single quotes) and does
internal/store/dialect.go:328
↓ 2 callers
Method
rebuildFTSForWorkspace
rebuildFTSForWorkspace rebuilds the FTS index for all items in a workspace. This is needed after import because direct INSERTs bypass the FTS triggers
internal/store/export.go:437
↓ 2 callers
Function
redactQueryString
redactQueryString replaces sensitive query-key values with REDACTED while leaving the rest of the query string intact for diagnostics. Operates on the
internal/server/middleware_logging.go:29
↓ 2 callers
Function
refresh
()
web/src/lib/components/editor/attachment-image.ts:277
↓ 2 callers
Function
refreshFilenameDom
()
web/src/lib/components/editor/attachment-chip.ts:273
↓ 2 callers
Function
refreshHref
()
web/src/lib/components/editor/attachment-chip.ts:263
↓ 2 callers
Function
registryPath
registryPath returns ~/.pad/installations.json.
internal/cli/registry.go:34
↓ 2 callers
Function
relatedEntryFromLink
relatedEntryFromLink projects a link's source-side or target-side metadata into a relatedEntry. Mirrors cmd/pad/query.go's helper.
internal/mcp/dispatch_http_links.go:651
↓ 2 callers
Function
relatedEntryFromLink
(link models.ItemLink, useSource bool)
cmd/pad/query.go:366
↓ 2 callers
Function
relativeTimeStr
(t time.Time)
cmd/pad/cmd_github.go:419
↓ 2 callers
Method
removeConn
removeConn unsubscribes the connection from the bus and, if it was the last subscriber, schedules a graceTTL grace timer. The caller is responsible fo
internal/collab/room.go:196
↓ 2 callers
Function
renderAttachmentChip
( meta: AttachmentMeta, displayText: string | undefined, workspaceSlug: string )
web/src/lib/markdown/attachments.ts:145
↓ 2 callers
Function
renderAttachmentMissing
(uuid: string, alt: string)
web/src/lib/markdown/attachments.ts:163
↓ 2 callers
Function
reorderedList
( ordered: Item[], itemId: string, dir: ReorderDirection )
web/src/lib/collections/reorder.ts:30
↓ 2 callers
Method
reportVisibleCollections
reportVisibleCollections computes the collection-visibility scope for the aggregate report. Aggregate counts have no item-level filtering, so a collec
internal/server/handlers_reports.go:78
↓ 2 callers
Function
requireArg
(args: Record<string, unknown>, key: string)
web/src/lib/webmcp/dispatch.ts:106
↓ 2 callers
Function
requireRef
(args: Record<string, unknown>)
web/src/lib/webmcp/dispatch.ts:100
↓ 2 callers
Method
requireShareLinkTargetVisible
requireShareLinkTargetVisible resolves a share link's target (item or collection) and gates on the appropriate visibility check (BUG-1923). Item-scope
internal/server/handlers_share_links.go:340
↓ 2 callers
Method
requireUnrestrictedExportAccess
requireUnrestrictedExportAccess denies workspace export (both the JSON and tar.gz bundle forms) to a caller whose workspace access is scoped to specif
internal/server/handlers_export_bundle.go:38
↓ 2 callers
Method
requireViewEditable
requireViewEditable is like requireViewVisible but also checks edit permission on the view's collection (grant-aware for guests/restricted members).
internal/server/handlers_views.go:144
↓ 2 callers
Method
resolveBrokenTitleLinks
resolveBrokenTitleLinks flips item_wiki_links rows in the workspace that have target_kind='title' and a target_title matching the given (collSlug, tit
internal/store/wiki_links.go:731
↓ 2 callers
Function
resolveItemLink
resolveItemLink reads link_type/ref/target from input and returns the dispatch tuple for action=link (creating=true) or action=unlink (creating=false)
internal/mcp/catalog_item.go:437
↓ 2 callers
Function
resolveLinkRoute
(args: Record<string, unknown>)
web/src/lib/webmcp/dispatch.ts:311
↓ 2 callers
Method
resolveParentFilter
resolveParentFilter extracts a "parent" (or "plan") key from the field filters and converts it to a ParentLinkID filter (which uses item_links instead
internal/server/handlers_items.go:2289
↓ 2 callers
Method
resolvePlaybook
resolvePlaybook finds a playbook by either its invocation_slug, its item slug, or its issue ref. invocation_slug takes precedence — that's the user-fa
internal/server/handlers_playbooks.go:297
↓ 2 callers
Function
resolveSQLiteDBPath
resolveSQLiteDBPath returns the SQLite database path using the SAME precedence the server uses (PAD_DB_PATH > PAD_DATA_DIR/pad.db > ~/.pad/pad.db), vi
cmd/pad/cmd_db.go:52
↓ 2 callers
Function
resolveShareWithPassword
resolveShareWithPassword issues an anonymous GET /api/v1/s/{token} from the given source IP with the password supplied via the X-Share-Password header
internal/server/handlers_share_links_bruteforce_test.go:16
↓ 2 callers
Function
resolveWikiBody
* Resolve a same-workspace wiki-link body against the in-memory items list. * Callers handle the cross-workspace `[[ws::REF]]` form first; this cover
web/src/lib/utils/markdown.ts:491
↓ 2 callers
Function
run
(api: ReturnType<typeof mockApi>, tool: string, args: Record<string, unknown>)
web/src/lib/webmcp/dispatch.test.ts:120
↓ 2 callers
Method
run
run is the worker goroutine. Drains queue → InsertMCPAuditEntry, logs (but doesn't crash on) DB errors, exits on stop. Tracked via Server.bg so Stop()
internal/server/middleware_mcp_audit.go:133
↓ 2 callers
Function
runMCPStatus
(cmd *cobra.Command, inst *mcpserver.Installer)
cmd/pad/mcp.go:160
↓ 2 callers
Method
runTokenReaperTick
runTokenReaperTick runs one sweep. Each cleaner is independent — a failure in one is logged and does not skip the others. Quiet on success (operators
internal/server/token_reaper.go:97
↓ 2 callers
Function
safeJsonParse
(raw: string | undefined | null, fallback: T)
web/src/lib/stores/localSearch.svelte.ts:262
↓ 2 callers
Function
sanitizeHeaderFilename
sanitizeHeaderFilename strips characters that can't safely appear in a Content-Disposition filename header — quotes, CR, LF, and any control byte. The
internal/server/handlers_attachments.go:516
↓ 2 callers
Function
scanAPIToken
scanAPIToken scans an API token from a row scanner.
internal/store/api_tokens.go:304
↓ 2 callers
Function
scanBool
---- helpers ---- scanBool normalizes the dialect-specific bool encoding (SQLite INTEGER 0/1; Postgres BOOLEAN true/false) into a Go bool. Mirrors the
internal/store/oauth_connections.go:581
↓ 2 callers
Method
scanBucketCounts
scanBucketCounts runs a "SELECT <bucket>, COUNT(*) ... GROUP BY <bucket>" query and returns a label→count map.
internal/store/reports.go:867
↓ 2 callers
Function
screenDialAddr
screenDialAddr rejects a dial to a private/reserved IP. The dialer calls this with the resolved connection address (ip:port), so it validates the exac
internal/webhooks/dispatcher.go:163
↓ 2 callers
Function
seedActiveAccessTokenForChain
seedActiveAccessTokenForChain inserts one active access-token row in the chain identified by requestID for subject userID. Lets the IsWorkspaceCovered
internal/server/handlers_claim_code_test.go:25
↓ 2 callers
Function
seedAuditRow
MCP audit handler tests (PLAN-943 TASK-960). Two endpoints: - GET /api/v1/connected-apps/{id}/audit — owner-scoped per-connection. - GET /api/v1/ad
internal/server/handlers_mcp_audit_test.go:32
↓ 2 callers
Function
seedFullWorkspace
seedFullWorkspace inserts one row into every workspace-scoped child table so a purge can be proven exhaustive. Raw inserts deliberately omit columns t
internal/store/workspace_purge_test.go:60
↓ 2 callers
Function
seedOwnerWorkspace
32 hex chars, never issued seedOwnerWorkspace bootstraps the first admin (so RequireAuth is active and users exist) and returns the owner plus a fresh
internal/server/handlers_invitation_preview_test.go:28
↓ 2 callers
Function
seedRealisticContent
(fixture: SuiteFixture, request: APIRequestContext)
web/e2e/lib/demo-seed.ts:59
↓ 2 callers
Function
seedUser
seedUser inserts a user directly with the given plan + created_at so tests can deterministically populate the customers_by_plan and new_signups_30d ag
internal/server/handlers_admin_billing_test.go:59
↓ 2 callers
Method
sendWith
sendWith is the internal send implementation.
internal/email/sender.go:142
↓ 2 callers
Function
serverBusyMessage
(retryAfterMs?: number)
web/src/lib/api/serverBusyToast.ts:38
↓ 2 callers
Method
setParentLinkTx
setParentLinkTx performs the lock acquisition, cycle check, and the DELETE-then-INSERT of the parent link entirely within the caller's transaction, re
internal/store/items.go:2882
↓ 2 callers
Function
setTokenExpiryWarning
setTokenExpiryWarning adds an X-Token-Expires-Soon header if the API token used for this request is within the warning threshold of its expiry. Called
internal/server/handlers_tokens.go:244
↓ 2 callers
Function
setupCmd
()
cmd/pad/cmd_auth.go:25
↓ 2 callers
Function
sha256Hex
sha256Hex returns the hex-encoded sha256 of b. The FS storage backend keys blobs by this exact form, so the value also serves as the storage_key suffi
internal/server/handlers_attachments_thumbnails.go:204
↓ 2 callers
Function
sha256hex
sha256hex returns the SHA-256 hex digest of a string.
internal/server/middleware_auth.go:794
↓ 2 callers
Function
shouldDedupeEditorSpace
( lastFlushedContent: string | null, seedMarkdown: string | null, normalizedMarkdown: string, )
web/src/lib/collab/flushDedupe.ts:22
↓ 2 callers
Function
showDropLine
(pos: number)
web/src/lib/components/editor/block-drag-handle.ts:596
↓ 2 callers
Function
showMenu
()
web/src/lib/components/editor/block-drag-handle.ts:407
↓ 2 callers
Function
signEmail
(emailAddr, secret string)
internal/email/unsubscribe.go:28
↓ 2 callers
Function
slugSet
(hints []WorkspaceHint)
internal/mcp/dispatch_http_envelope_test.go:453
↓ 2 callers
Function
snippetAround
snippetAround returns roughly `snippetRadius*2` bytes of `content` centered on `position` (the start of the `[[`). Caller doesn't need the snippet to
internal/store/wiki_links.go:1453
↓ 2 callers
Function
snippetFor
(text: string)
web/src/lib/utils/hiddenContentDetector.ts:243
↓ 2 callers
Function
sourcesOf
(versions []models.Version)
internal/server/handlers_items_collab_versions_test.go:214
↓ 2 callers
Function
splitAroundArguments
(body: string)
web/src/lib/playbooks/arguments.ts:91
↓ 2 callers
Function
splitCodeFences
splitCodeFences partitions markdown source into alternating fenced / non-fenced spans. The fence detector recognizes the CommonMark form: at least thr
internal/server/render/attachments.go:336
↓ 2 callers
Function
splitOnUnescapedPipe
splitOnUnescapedPipe scans `body` for the first `|` that isn't preceded by an unescaped `\`, splitting the body into (key, display, found). Mirrors sp
internal/links/extract.go:615
↓ 2 callers
Function
splitWikiBody
(body: string)
web/src/lib/utils/markdown.ts:701
↓ 2 callers
Function
sseEventVisibleFor
sseVisibility is the per-connection event-filter state. All four fields are rebuilt atomically on each revalidation tick so that permission-tightening
internal/server/handlers_events.go:326
↓ 2 callers
Function
startDrag
()
web/src/lib/components/editor/block-drag-handle.ts:689
↓ 2 callers
Method
startRedisSubscription
startRedisSubscription begins listening on a Redis channel for a workspace. Must be called with b.mu held.
internal/events/redis_bus.go:224
↓ 2 callers
Function
strArray
* Coerce an array<string> param (the MCP transport may also deliver a single * string). Returns undefined when absent/empty. Throws on a non-string e
web/src/lib/webmcp/dispatch.ts:119
↓ 2 callers
Function
stripCobraUsageBlock
stripCobraUsageBlock removes cobra's auto-appended "Usage: ..." help block from a stderr string. cobra emits this block on any runtime error from a Ru
internal/mcp/errors.go:624
↓ 2 callers
Function
stripDuplicatedFieldsKeys
stripDuplicatedFieldsKeys removes implementation_notes and decision_log from a parsed fields object. The server hydrates both onto items as top-level
internal/mcp/dispatch.go:251
↓ 2 callers
Function
stripErrorPrefix
stripErrorPrefix removes the leading "Error:" prefix that the CLI (and many of its dependencies) emit on stderr lines. Cosmetic — the envelope's error
internal/mcp/errors.go:517
↓ 2 callers
Function
surfacesUntrustedContent
(tool: ToolSurfaceTool)
web/src/lib/webmcp/descriptors.ts:111
↓ 2 callers
Function
swapNodeUuid
(newId: string)
web/src/lib/components/editor/attachment-image.ts:317
↓ 2 callers
Function
throttleTime
throttleTime returns a timestamp 5 minutes before the given RFC3339 time string.
internal/store/users.go:876
↓ 2 callers
Function
tick
()
web/src/lib/components/editor/block-drag-handle.ts:672
↓ 2 callers
Function
titleCaseLabel
titleCaseLabel converts a snake_case key into a Title Case label the same way the CLI does ("due_date" → "Due Date"). Avoids pulling in golang.org/x/t
internal/mcp/dispatch_http_routes.go:654
↓ 2 callers
Method
totalChildRows
totalChildRows sums every seeded child row for a workspace, checking item-scoped tables against the original parent IDs so a leaked row is detectable
internal/store/workspace_purge_test.go:185
↓ 2 callers
Function
trimRedundantSchemaLabels
trimRedundantSchemaLabels parses the schema JSON, drops field labels equal to TitleCase(key), and re-marshals. Returns the original bytes verbatim on
internal/server/handlers_bootstrap.go:174
↓ 2 callers
Function
truncateTitle
truncateTitle limits an uncolorized, SGR-free title to maxRunes visible columns, appending an ellipsis when it had to cut. Callers strip SGR escapes f
internal/cli/format.go:167
↓ 2 callers
Function
unescapeMarkdownText
unescapeMarkdownText reverses CommonMark escape sequences in a captured label. Marked's tokenizer drops the backslash and emits the literal character,
internal/server/render/attachments.go:254
↓ 2 callers
Function
unescapeWikiBody
unescapeWikiBody undoes the editor's body-escape sequences: `\]` → `]`, `\|` → `|`, `\\` → `\`. Other backslash sequences are left as-is (the renderer
internal/links/extract.go:634
↓ 2 callers
Function
unescapeWikiBody
(s: string)
web/src/lib/utils/markdown.ts:694
↓ 2 callers
Function
uniqueStrings
(values []string)
internal/models/item.go:503
↓ 2 callers
Function
unknownWorkspaceResult
unknownWorkspaceResult wraps a "workspace X doesn't exist" failure. Same available_workspaces enrichment as no_workspace. Empty slug emits a generic m
internal/mcp/errors.go:264
↓ 2 callers
Function
unwrapErrorEnvelope
unwrapErrorEnvelope extracts the structured ErrorEnvelope from a CallToolResult. Test helper — fails fast if the result isn't shaped like a structured
internal/mcp/dispatch_http_envelope_uniform_test.go:276
↓ 2 callers
Function
updateAspectActive
()
web/src/lib/components/editor/attachment-crop-modal.ts:150
↓ 2 callers
Function
userActorLabel
userActorLabel produces a stable string label for the actor that created a structured entry. Mirrors the CLI's "user" label for CLI-driven entries; fo
internal/mcp/dispatch_http_project.go:645
↓ 2 callers
Function
validHash
validHash returns true if h looks like a hex-encoded sha256 — 64 lowercase hex characters. We only accept this canonical form so on-disk paths are sta
internal/attachments/fs_store.go:85
↓ 2 callers
Function
validTOTPCode
validTOTPCode mints the current valid TOTP code for a secret, using the same library the handler validates against.
internal/server/handlers_account_test.go:414
↓ 2 callers
Method
validateAssignmentScope
validateAssignmentScope checks that the assigned user and agent role belong to the same workspace as the item. This prevents cross-workspace assignmen
internal/store/items.go:40
← previous
next →
1,501–1,600 of 6,005, ranked by callers