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
↓ 1 callers
Function
SkillsInstalled
SkillsInstalled checks if the pad skill is installed at global or project level. Returns ("global", true), ("project", true), or ("", false).
internal/cli/skills.go:12
↓ 1 callers
Method
SoftDeleteAttachment
SoftDeleteAttachment marks the given attachment row deleted (and every variant whose parent_id points at it) so the orphan GC will reclaim the bytes a
internal/store/attachments.go:711
↓ 1 callers
Method
SoftDeleteWorkspaceAttachments
SoftDeleteWorkspaceAttachments tombstones every live attachment row (originals AND thumbnail variants) under a workspace in a single bulk UPDATE. Used
internal/store/attachments.go:681
↓ 1 callers
Method
StarItem
StarItem stars an item for the current user.
internal/cli/client.go:299
↓ 1 callers
Method
StartWorkspacePurgeSweeper
StartWorkspacePurgeSweeper kicks off the periodic sweep loop. Idempotent — calling twice is a no-op. Must be called AFTER SetAttachments; the sweep no
internal/server/workspace_purge.go:107
↓ 1 callers
Method
Stop
Stop drains the cleanup goroutine of every limiter in the bundle. Called from Server.Stop() so test cleanup (and graceful shutdown) doesn't leak the f
internal/server/middleware_ratelimit.go:352
↓ 1 callers
Function
StopServer
StopServer sends a stop signal to the background server process.
internal/cli/server.go:72
↓ 1 callers
Method
SubscriberCount
SubscriberCount delegates to the inner bus.
internal/metrics/instrumented_bus.go:89
↓ 1 callers
Method
TestWebhook
TestWebhook sends a test payload to a webhook.
internal/cli/client.go:640
↓ 1 callers
Method
Timeout
()
internal/server/handlers_collab_test.go:509
↓ 1 callers
Function
ToolSurfaceJSON
ToolSurfaceJSON serializes the package-global Catalog into the tool-surface descriptor JSON — the same blob pad_meta.action: tool-surface emits, plus
internal/mcp/tool_surface.go:230
↓ 1 callers
Method
TouchUserActivity
TouchUserActivity updates last_active_at for a user, throttled to avoid write amplification. Only writes if the stored value is older than 5 minutes.
internal/store/users.go:845
↓ 1 callers
Method
UnderItemLock
UnderItemLock runs fn while the per-item setup lock for itemID is held — the SAME lock Join's addConn+replayTo acquires and the SAME lock PruneAndAppl
internal/collab/manager.go:672
↓ 1 callers
Method
UnstarItem
UnstarItem removes a star from an item for the current user.
internal/cli/client.go:304
↓ 1 callers
Method
UpdateAgentRole
(workspaceID, id string, input models.AgentRoleUpdate)
internal/store/agent_roles.go:99
↓ 1 callers
Method
UpdateAgentRole
UpdateAgentRole updates an existing agent role.
internal/cli/client.go:678
↓ 1 callers
Method
UpdateAgentRoleOrder
UpdateAgentRoleOrder batch-updates sort_order for a list of roles.
internal/store/agent_roles.go:410
↓ 1 callers
Method
UpdateAll
UpdateAll updates all tracked installations that are outdated. Returns the number of installations updated and any errors encountered.
internal/cli/registry.go:169
↓ 1 callers
Method
UpdateCollection
(wsSlug, collSlug string, input models.CollectionUpdate)
internal/cli/client.go:187
↓ 1 callers
Method
UpdateComment
UpdateComment replaces a comment's body and bumps updated_at. The comments_fts_update trigger re-indexes the new body. Returns sql.ErrNoRows when no l
internal/store/comments.go:50
↓ 1 callers
Method
UpdateItem
(wsSlug, itemSlug string, input models.ItemUpdate)
internal/cli/client.go:246
↓ 1 callers
Method
UpdateRoleSortOrder
UpdateRoleSortOrder batch-updates role_sort_order for a list of items. Each updated row also gets a fresh workspace-scoped seq so delta-sync clients s
internal/store/agent_roles.go:444
↓ 1 callers
Method
UpdateSessionIPIfEquals
UpdateSessionIPIfEquals atomically rotates the stored IP on a session from expectedOldIP to newIP. Returns true if a row was updated (i.e. the caller
internal/store/sessions.go:189
↓ 1 callers
Method
UpdateWebhookFailure
(id string, failed bool)
internal/webhooks/dispatcher.go:62
↓ 1 callers
Method
UpdateWorkspace
(slug string, input models.WorkspaceUpdate)
internal/cli/client.go:118
↓ 1 callers
Method
UpdateWorkspaceSortOrder
UpdateWorkspaceSortOrder sets the sort_order for a workspace in a user's membership.
internal/store/workspace_members.go:577
↓ 1 callers
Method
UploadAttachment
UploadAttachment streams the contents of body to POST /api/v1/workspaces/{wsSlug}/attachments as a multipart file part. filename is what the server st
internal/cli/client.go:1296
↓ 1 callers
Method
UserStorageUsage
UserStorageUsage returns the SUM(size_bytes) of all non-deleted attachments across workspaces owned by this user. Matches the per-workspace WorkspaceS
internal/store/users.go:326
↓ 1 callers
Function
ValidReportWindow
ValidReportWindow reports whether w is an accepted report window (empty is allowed and means the surface default).
internal/models/report_layout.go:32
↓ 1 callers
Function
ValidateAudienceParam
ValidateAudienceParam is a one-off helper for sub-PR C's HTTP handlers: validates the incoming `resource` query param shape before fosite's internal v
internal/oauth/audience.go:184
↓ 1 callers
Method
ValidateShareLink
ValidateShareLink checks if a share link is valid (not expired). Max views enforcement is handled atomically by RecordShareLinkView. Returns nil error
internal/store/share_links.go:331
↓ 1 callers
Method
ValidateShareLinkPassword
ValidateShareLinkPassword checks a password against the share link's stored hash.
internal/store/share_links.go:291
↓ 1 callers
Function
ValidateUnsubscribeToken
ValidateUnsubscribeToken checks that the token is a valid HMAC for the email.
internal/email/unsubscribe.go:23
↓ 1 callers
Function
WipeCredentialsFile
WipeCredentialsFile removes ~/.pad/credentials.json entirely. Distinct from CredentialStore.Delete (which removes a single server's entry) — used by t
internal/cli/credentials.go:239
↓ 1 callers
Function
WithAPITokenAuth
WithAPITokenAuth marks ctx as authenticated via an API token, the same way TokenAuth does on the Bearer-token path. Required when dispatching through
internal/server/context.go:35
↓ 1 callers
Method
WorkspaceAttachmentBlobs
WorkspaceAttachmentBlobs returns every attachment row for a workspace — originals AND thumbnail variants, live AND soft-deleted — so the purge sweeper
internal/store/workspace_purge.go:92
↓ 1 callers
Method
WorkspaceAttachmentsForExport
WorkspaceAttachmentsForExport returns every original (non-derived, non-deleted) attachment in the workspace so the export bundler can stream them into
internal/store/attachments.go:874
↓ 1 callers
Method
WorkspaceItemSlugMap
WorkspaceItemSlugMap returns slug → id for every live item in a workspace. Used by the bundle import path (TASK-885) to remap an old attachment's item
internal/store/attachments.go:753
↓ 1 callers
Function
WriteUpdateConflictError
WriteUpdateConflictError formats an optimistic-concurrency conflict to w in the canonical two-track shape (TASK-2022), mirroring WriteOpenChildrenErro
internal/cli/client.go:1205
↓ 1 callers
Function
__resetServerBusyToastForTest
()
web/src/lib/api/serverBusyToast.ts:65
↓ 1 callers
Function
actionItemBulkUpdate
actionItemBulkUpdate translates the catalog's `refs: array<string>` param into the repeatable positional `ref` that BuildCLIArgs feeds to `pad item bu
internal/mcp/catalog_item.go:536
↓ 1 callers
Function
actionItemUnlink
actionItemUnlink is the symmetric un-create operation. Same routing rules; uses route.unlinkCmdPath instead of route.linkCmdPath.
internal/mcp/catalog_item.go:420
↓ 1 callers
Function
actionMetaToolSurface
actionMetaToolSurface returns the catalog as JSON. Pairs with PLAN-943 TASK-957 (getpad.dev/docs/mcp) — that page can generate docs from this single c
internal/mcp/catalog_meta.go:152
↓ 1 callers
Function
actionMetaVersion
actionMetaVersion returns the same MetaPayload that pad://_meta/version serves as a resource. Two surfaces, one source of truth (BuildMetaPayload).
internal/mcp/catalog_meta.go:105
↓ 1 callers
Function
activityCmd
()
cmd/pad/cmd_project.go:888
↓ 1 callers
Function
actorIDFromRequest
actorIDFromRequest returns a non-empty identity string for the caller when one is available — user id, token id, or empty. Used in slog calls where we
internal/server/handlers_collab.go:489
↓ 1 callers
Method
addConn
addConn registers a freshly-built roomConn with the room. Cancels any pending grace timer (a reconnect within the window keeps the Room alive) and ret
internal/collab/room.go:177
↓ 1 callers
Function
addEntry
--- format dispatch ------------------------------------------------------ Install/Uninstall/Status route through these so each agent's config is rea
internal/mcp/install.go:546
↓ 1 callers
Function
adjacentColumn
( columnOrder: string[], current: string, dir: 'left' | 'right' )
web/src/lib/collections/reorder.ts:99
↓ 1 callers
Method
adminOpenItemsCountClause
adminOpenItemsCountClause returns a SQL fragment (no leading AND) that excludes terminal-status items. Single-sourced from models.DefaultTerminalStatu
internal/store/workspace_members.go:1013
↓ 1 callers
Function
adminUserSortClause
adminUserSortClause maps the public sort key + order into a safe ORDER BY expression. Hard-coded allow-list to avoid SQL injection; an unknown key fal
internal/store/users.go:527
↓ 1 callers
Function
ageHours
ageHours returns hours from an RFC3339 created timestamp to now, clamped at 0.
internal/store/reports.go:929
↓ 1 callers
Function
agentCmd
()
cmd/pad/groups.go:177
↓ 1 callers
Function
agentMeta
agentMeta returns metadata JSON with the agent name if X-Pad-Agent is set, merged with any existing metadata. Returns empty string if no agent.
internal/server/handlers_documents.go:278
↓ 1 callers
Function
agentStatusCmd
()
cmd/pad/groups.go:215
↓ 1 callers
Function
agentUpdateCmd
()
cmd/pad/groups.go:205
↓ 1 callers
Function
allowlistedAuthorizeParams
allowlistedAuthorizeParams returns a copy of in containing ONLY the keys an OAuth /authorize request is allowed to round-trip through the consent form
internal/server/handlers_oauth.go:1832
↓ 1 callers
Function
appendChange
appendChange adds a change description to existing metadata JSON.
internal/server/handlers_documents.go:396
↓ 1 callers
Method
appendCount
()
internal/collab/manager_test.go:225
↓ 1 callers
Function
applierFirstTimeout
()
internal/collab/applier.go:95
↓ 1 callers
Function
applierRetryTimeout
()
internal/collab/applier.go:96
↓ 1 callers
Function
applyAspectToRect
* Snap a rectangle to a target aspect ratio while preserving its * center. `aspect == null` is a no-op (free crop). The result is * clamped to `boun
web/src/lib/components/editor/attachment-crop-modal.ts:373
↓ 1 callers
Function
applyBlockType
(editor: Editor, block: BlockInfo, targetType: string)
web/src/lib/components/editor/block-drag-handle.ts:56
↓ 1 callers
Method
applyBulkOp
applyBulkOp dispatches one verb against one item, reusing the same store paths as the single-item handlers. Returns the post-mutation item (for seq) o
internal/server/handlers_items_bulk.go:309
↓ 1 callers
Method
applyContentViaCollab
(r *http.Request, itemID, markdown string, directWrite directWriteFn)
internal/server/handlers_collab.go:378
↓ 1 callers
Method
applyContentViaCollabOnce
(r *http.Request, itemID, markdown string, directWrite directWriteFn)
internal/server/handlers_collab.go:400
↓ 1 callers
Function
applyImageTransform
applyImageTransform dispatches on the operation discriminator. Each branch validates its own params and returns a clear error — the handler turns thos
internal/server/handlers_attachments_transform.go:244
↓ 1 callers
Function
applyPendingToggles
Apply pending toggles on top of a base set.
web/src/lib/stores/starred.svelte.ts:20
↓ 1 callers
Function
applyTokenAuth
(context: BrowserContext, fixture: SuiteFixture)
web/e2e/fixtures.ts:36
↓ 1 callers
Function
archivedPlaybooks
archivedPlaybooks holds the pre-PLAN-1377 library playbook bodies that were retired from the active library surface as part of PLAN-1397's invokable-f
internal/collections/playbook_library_archive.go:25
↓ 1 callers
Method
argSource
argSource looks up the enum_source for a positional arg on the given command path. Returns ("", false) when no binding applies.
internal/cmdhelp/dynamic.go:82
↓ 1 callers
Function
armRateLimitCooldown
* Push the global rate-limit cooldown out to `now + backoffMs`, never * pulling it in. Called on EVERY 429 (including the one that then triggers * t
web/src/lib/api/client.ts:140
↓ 1 callers
Function
artifactExportFilename
artifactExportFilename builds the download filename for an exported item: "<slug>.pad.md".
internal/server/handlers_artifact_export.go:122
↓ 1 callers
Function
artifactProvenanceFooter
artifactProvenanceFooter renders an optional Markdown footer recording where an imported artifact came from. Returns "" when there's nothing useful to
internal/server/handlers_artifact_import.go:278
↓ 1 callers
Function
asUpdateConflictError
asUpdateConflictError reports whether err is (or wraps) a store.UpdateConflictError and returns it. Handlers use it to branch the generic upstream-err
internal/server/handlers_items_open_children_guard.go:334
↓ 1 callers
Function
assertExperimentalNamespace
assertExperimentalNamespace fails the test if exp[key] doesn't carry the expected version + a tool_surface_stable=true flag. Shared by the padCmdhelp
internal/mcp/server_test.go:82
↓ 1 callers
Function
assertLen
assertLen and assertOverflow are tiny helpers used by TestCapBootstrapDashboard to keep the per-array assertion noise from drowning the actual contrac
internal/server/handlers_bootstrap_test.go:902
↓ 1 callers
Function
assertLinks
assertLinks compares two WikiLinkRef slices for the fields Phase 1 + Phase 2a care about. WorkspaceSlug is excluded because Phase 2b (TASK-1597) is th
internal/links/extract_test.go:842
↓ 1 callers
Function
assertOverflow
(t *testing.T, name string, got, want int)
internal/server/handlers_bootstrap_test.go:909
↓ 1 callers
Function
attachmentCmd
attachmentCmd is the root for `pad attachment ...` operations. Phase 1 ships upload + download — the endpoints TASK-871 and TASK-872 added. List + de
cmd/pad/cmd_attachment.go:26
↓ 1 callers
Function
attachmentDownloadCmd
()
cmd/pad/cmd_attachment.go:130
↓ 1 callers
Function
attachmentListCmd
()
cmd/pad/cmd_attachment.go:456
↓ 1 callers
Function
attachmentShowCmd
()
cmd/pad/cmd_attachment.go:392
↓ 1 callers
Function
attachmentUploadCmd
()
cmd/pad/cmd_attachment.go:62
↓ 1 callers
Function
attachmentUploadPlugin
(opts: AttachmentUploadOptions)
web/src/lib/components/editor/attachment-upload.ts:211
↓ 1 callers
Function
attachmentViewCmd
()
cmd/pad/cmd_attachment.go:304
↓ 1 callers
Method
attemptDeliver
attemptDeliver performs a single HTTP POST to the webhook URL and classifies the outcome. It does NOT record the result — deliver owns the single term
internal/webhooks/dispatcher.go:234
↓ 1 callers
Function
audienceContains
audienceContains reports whether haystack contains needle, treating scheme-equivalent forms as equal via oauth.NormalizeAudience. Why normalize: real
internal/server/middleware_mcp_auth.go:508
↓ 1 callers
Function
audienceForNewClient
audienceForNewClient is what sub-PR C's DCR handler will use to populate a freshly-registered client's audience list. Centralized here so the policy (
internal/oauth/audience.go:209
↓ 1 callers
Function
audienceListContainsNormalized
audienceListContainsNormalized reports whether haystack contains an element that compares equal to needleNorm after trailing-slash normalization. Call
internal/oauth/audience.go:165
↓ 1 callers
Function
auditLogCmd
--- watch ---
cmd/pad/cmd_workspace.go:1038
↓ 1 callers
Function
authCmd
()
cmd/pad/groups.go:20
↓ 1 callers
Function
authHintFor
authHintFor generates the actionable hint for ErrAuthRequired. Distinct from the upstream body — agents see "fix your auth", not the literal upstream
internal/mcp/errors.go:1095
↓ 1 callers
Method
authServerIssuerURL
===================================================================== Helpers shared with handlers_well_known.go for the discovery doc ===============
internal/server/handlers_oauth.go:1917
↓ 1 callers
Function
autosaveEntry
TestCollapseAutosaveBursts guards the BUG-1612 clutter fix: the web editor flushes a collab-snapshot version every ~5s while typing, so an uninterrupt
internal/server/handlers_timeline_collapse_test.go:14
↓ 1 callers
Function
avgDuration
(durations []time.Duration)
internal/store/bench_concurrent_test.go:129
↓ 1 callers
Function
backdateItemUpdatedAt
── standup ────────────────────────────────────────────────────────────────── backdateItemUpdatedAt directly rewrites an item's updated_at column so c
internal/server/handlers_project_intel_test.go:84
↓ 1 callers
Method
backfillNullItemNumbers
backfillNullItemNumbers assigns the next workspace-global item_number to any items that have a NULL item_number (e.g. from interrupted inserts or pre-
internal/store/store.go:1052
↓ 1 callers
Method
backfillOneChain
backfillOneChain seeds the oauth_connections + (when applicable) oauth_connection_workspaces rows for a single grant chain. Returns: - created
internal/store/oauth_connections_backfill.go:219
↓ 1 callers
Function
backlinksCmd
backlinksCmd serves `pad item backlinks <ref>` — the CLI surface for PLAN-1593's reverse `[[...]]` index. Lists items that contain a `[[<ref>]]` refer
cmd/pad/cmd_item.go:1588
← previous
next →
1,801–1,900 of 6,005, ranked by callers