MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions6,005 in github.com/PerpetualSoftware/pad

↓ 1 callersFunctionSkillsInstalled
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 callersMethodSoftDeleteAttachment
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 callersMethodSoftDeleteWorkspaceAttachments
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 callersMethodStarItem
StarItem stars an item for the current user.
internal/cli/client.go:299
↓ 1 callersMethodStartWorkspacePurgeSweeper
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 callersMethodStop
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 callersFunctionStopServer
StopServer sends a stop signal to the background server process.
internal/cli/server.go:72
↓ 1 callersMethodSubscriberCount
SubscriberCount delegates to the inner bus.
internal/metrics/instrumented_bus.go:89
↓ 1 callersMethodTestWebhook
TestWebhook sends a test payload to a webhook.
internal/cli/client.go:640
↓ 1 callersMethodTimeout
()
internal/server/handlers_collab_test.go:509
↓ 1 callersFunctionToolSurfaceJSON
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 callersMethodTouchUserActivity
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 callersMethodUnderItemLock
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 callersMethodUnstarItem
UnstarItem removes a star from an item for the current user.
internal/cli/client.go:304
↓ 1 callersMethodUpdateAgentRole
(workspaceID, id string, input models.AgentRoleUpdate)
internal/store/agent_roles.go:99
↓ 1 callersMethodUpdateAgentRole
UpdateAgentRole updates an existing agent role.
internal/cli/client.go:678
↓ 1 callersMethodUpdateAgentRoleOrder
UpdateAgentRoleOrder batch-updates sort_order for a list of roles.
internal/store/agent_roles.go:410
↓ 1 callersMethodUpdateAll
UpdateAll updates all tracked installations that are outdated. Returns the number of installations updated and any errors encountered.
internal/cli/registry.go:169
↓ 1 callersMethodUpdateCollection
(wsSlug, collSlug string, input models.CollectionUpdate)
internal/cli/client.go:187
↓ 1 callersMethodUpdateComment
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 callersMethodUpdateItem
(wsSlug, itemSlug string, input models.ItemUpdate)
internal/cli/client.go:246
↓ 1 callersMethodUpdateRoleSortOrder
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 callersMethodUpdateSessionIPIfEquals
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 callersMethodUpdateWebhookFailure
(id string, failed bool)
internal/webhooks/dispatcher.go:62
↓ 1 callersMethodUpdateWorkspace
(slug string, input models.WorkspaceUpdate)
internal/cli/client.go:118
↓ 1 callersMethodUpdateWorkspaceSortOrder
UpdateWorkspaceSortOrder sets the sort_order for a workspace in a user's membership.
internal/store/workspace_members.go:577
↓ 1 callersMethodUploadAttachment
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 callersMethodUserStorageUsage
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 callersFunctionValidReportWindow
ValidReportWindow reports whether w is an accepted report window (empty is allowed and means the surface default).
internal/models/report_layout.go:32
↓ 1 callersFunctionValidateAudienceParam
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 callersMethodValidateShareLink
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 callersMethodValidateShareLinkPassword
ValidateShareLinkPassword checks a password against the share link's stored hash.
internal/store/share_links.go:291
↓ 1 callersFunctionValidateUnsubscribeToken
ValidateUnsubscribeToken checks that the token is a valid HMAC for the email.
internal/email/unsubscribe.go:23
↓ 1 callersFunctionWipeCredentialsFile
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 callersFunctionWithAPITokenAuth
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 callersMethodWorkspaceAttachmentBlobs
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 callersMethodWorkspaceAttachmentsForExport
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 callersMethodWorkspaceItemSlugMap
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 callersFunctionWriteUpdateConflictError
WriteUpdateConflictError formats an optimistic-concurrency conflict to w in the canonical two-track shape (TASK-2022), mirroring WriteOpenChildrenErro
internal/cli/client.go:1205
↓ 1 callersFunction__resetServerBusyToastForTest
()
web/src/lib/api/serverBusyToast.ts:65
↓ 1 callersFunctionactionItemBulkUpdate
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 callersFunctionactionItemUnlink
actionItemUnlink is the symmetric un-create operation. Same routing rules; uses route.unlinkCmdPath instead of route.linkCmdPath.
internal/mcp/catalog_item.go:420
↓ 1 callersFunctionactionMetaToolSurface
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 callersFunctionactionMetaVersion
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 callersFunctionactivityCmd
()
cmd/pad/cmd_project.go:888
↓ 1 callersFunctionactorIDFromRequest
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 callersMethodaddConn
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 callersFunctionaddEntry
--- format dispatch ------------------------------------------------------ Install/Uninstall/Status route through these so each agent's config is rea
internal/mcp/install.go:546
↓ 1 callersFunctionadjacentColumn
( columnOrder: string[], current: string, dir: 'left' | 'right' )
web/src/lib/collections/reorder.ts:99
↓ 1 callersMethodadminOpenItemsCountClause
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 callersFunctionadminUserSortClause
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 callersFunctionageHours
ageHours returns hours from an RFC3339 created timestamp to now, clamped at 0.
internal/store/reports.go:929
↓ 1 callersFunctionagentCmd
()
cmd/pad/groups.go:177
↓ 1 callersFunctionagentMeta
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 callersFunctionagentStatusCmd
()
cmd/pad/groups.go:215
↓ 1 callersFunctionagentUpdateCmd
()
cmd/pad/groups.go:205
↓ 1 callersFunctionallowlistedAuthorizeParams
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 callersFunctionappendChange
appendChange adds a change description to existing metadata JSON.
internal/server/handlers_documents.go:396
↓ 1 callersMethodappendCount
()
internal/collab/manager_test.go:225
↓ 1 callersFunctionapplierFirstTimeout
()
internal/collab/applier.go:95
↓ 1 callersFunctionapplierRetryTimeout
()
internal/collab/applier.go:96
↓ 1 callersFunctionapplyAspectToRect
* 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 callersFunctionapplyBlockType
(editor: Editor, block: BlockInfo, targetType: string)
web/src/lib/components/editor/block-drag-handle.ts:56
↓ 1 callersMethodapplyBulkOp
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 callersMethodapplyContentViaCollab
(r *http.Request, itemID, markdown string, directWrite directWriteFn)
internal/server/handlers_collab.go:378
↓ 1 callersMethodapplyContentViaCollabOnce
(r *http.Request, itemID, markdown string, directWrite directWriteFn)
internal/server/handlers_collab.go:400
↓ 1 callersFunctionapplyImageTransform
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 callersFunctionapplyPendingToggles
Apply pending toggles on top of a base set.
web/src/lib/stores/starred.svelte.ts:20
↓ 1 callersFunctionapplyTokenAuth
(context: BrowserContext, fixture: SuiteFixture)
web/e2e/fixtures.ts:36
↓ 1 callersFunctionarchivedPlaybooks
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 callersMethodargSource
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 callersFunctionarmRateLimitCooldown
* 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 callersFunctionartifactExportFilename
artifactExportFilename builds the download filename for an exported item: "<slug>.pad.md".
internal/server/handlers_artifact_export.go:122
↓ 1 callersFunctionartifactProvenanceFooter
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 callersFunctionasUpdateConflictError
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 callersFunctionassertExperimentalNamespace
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 callersFunctionassertLen
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 callersFunctionassertLinks
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 callersFunctionassertOverflow
(t *testing.T, name string, got, want int)
internal/server/handlers_bootstrap_test.go:909
↓ 1 callersFunctionattachmentCmd
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 callersFunctionattachmentDownloadCmd
()
cmd/pad/cmd_attachment.go:130
↓ 1 callersFunctionattachmentListCmd
()
cmd/pad/cmd_attachment.go:456
↓ 1 callersFunctionattachmentShowCmd
()
cmd/pad/cmd_attachment.go:392
↓ 1 callersFunctionattachmentUploadCmd
()
cmd/pad/cmd_attachment.go:62
↓ 1 callersFunctionattachmentUploadPlugin
(opts: AttachmentUploadOptions)
web/src/lib/components/editor/attachment-upload.ts:211
↓ 1 callersFunctionattachmentViewCmd
()
cmd/pad/cmd_attachment.go:304
↓ 1 callersMethodattemptDeliver
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 callersFunctionaudienceContains
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 callersFunctionaudienceForNewClient
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 callersFunctionaudienceListContainsNormalized
audienceListContainsNormalized reports whether haystack contains an element that compares equal to needleNorm after trailing-slash normalization. Call
internal/oauth/audience.go:165
↓ 1 callersFunctionauditLogCmd
--- watch ---
cmd/pad/cmd_workspace.go:1038
↓ 1 callersFunctionauthCmd
()
cmd/pad/groups.go:20
↓ 1 callersFunctionauthHintFor
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 callersMethodauthServerIssuerURL
===================================================================== Helpers shared with handlers_well_known.go for the discovery doc ===============
internal/server/handlers_oauth.go:1917
↓ 1 callersFunctionautosaveEntry
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 callersFunctionavgDuration
(durations []time.Duration)
internal/store/bench_concurrent_test.go:129
↓ 1 callersFunctionbackdateItemUpdatedAt
── standup ────────────────────────────────────────────────────────────────── backdateItemUpdatedAt directly rewrites an item's updated_at column so c
internal/server/handlers_project_intel_test.go:84
↓ 1 callersMethodbackfillNullItemNumbers
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 callersMethodbackfillOneChain
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 callersFunctionbacklinksCmd
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
← previousnext →1,801–1,900 of 6,005, ranked by callers