MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 4 callersFunctionNormalizeSlug
NormalizeSlug maps the common singular / shorthand collection-name forms users actually type ("task", "idea", "doc", etc.) to the canonical plural slu
internal/collections/prefix.go:14
↓ 4 callersMethodOccurrenceState
OccurrenceState is the current open occurrence state, separate from history.
internal/models/schedule.go:119
↓ 4 callersFunctionOffsetFromDrop
OffsetFromDrop retains a link's mode and computes its new offset after a drag. Civil uses the child's date and second-resolution clock in zone, or mid
internal/schedule/links.go:121
↓ 4 callersMethodOpen
(string)
internal/store/nultriggers_test.go:593
↓ 4 callersMethodPendingAck
PendingAck reports whether this reminder has fired and not been acknowledged — the set the agent poll surface reads.
internal/models/reminder.go:47
↓ 4 callersMethodPendingInstallBlobs
PendingInstallBlobs returns a pending install's staged blobs, by key.
internal/store/app_pending.go:277
↓ 4 callersFunctionPlaybookSummary
PlaybookSummary extracts a short prose hint from a playbook body. Picks the first non-heading non-empty paragraph and caps at ~240 chars so summary pa
internal/collections/summary.go:12
↓ 4 callersMethodPost
(ctx context.Context, rawURL string, body []byte, header http.Header)
internal/webhooks/app_delivery.go:56
↓ 4 callersMethodPrepare
Prepare delegates to PrepareContext so there is ONE wrapping site. A mutation showed the separate body was unreachable: database/sql routes to Prepare
internal/store/nulguard.go:433
↓ 4 callersMethodPruneUndispatchedOutbox
PruneUndispatchedOutbox deletes events that were never dispatched and are older than the given timestamp, returning how many rows went. This one DROP
internal/store/event_outbox.go:1921
↓ 4 callersMethodPublicLinkBaseURL
PublicLinkBaseURL returns the URL the server should embed in emailed links (password reset, invites, share links, admin invitations). Resolution order
internal/config/config.go:846
↓ 4 callersMethodPublish
Publish delegates to the inner bus, counts the attempt, and counts a failure by outcome. The error is returned unchanged. pad_eventbus_publish_total
internal/metrics/instrumented_bus.go:113
↓ 4 callersFunctionPublishFailureOutcome
PublishFailureOutcome names a non-nil Publish error by the outcome it reports: "closed" for ErrBusClosed, "unconfirmed" for anything else. It is the l
internal/events/bus.go:28
↓ 4 callersMethodPushDispatchTimings
PushDispatchTimings parses the four PAD_PUSH_DISPATCH_* knobs (TASK-3939 part C, decision 77a8fae7). A knob that is set but is not a Go duration, or i
internal/config/config.go:1019
↓ 4 callersFunctionQuoteExcerpt
QuoteExcerpt is the first non-empty line of body with whitespace collapsed, cut so the result, "..." included, is at most ConversationExcerptRunes run
internal/models/conversation.go:133
↓ 4 callersMethodRecordShareLinkView
RecordShareLinkView atomically increments the view counter (respecting max_views) and records a view entry inside a single transaction. Returns true i
internal/store/share_links.go:254
↓ 4 callersMethodReenableInstall
ReenableInstall: inactive -> active. The epoch is NEVER moved back (DOC-3371 §2): every token issued before the disable stays dead, and the app obtain
internal/store/app_lifecycle.go:252
↓ 4 callersFunctionRefuseRepeatedMember
RefuseRepeatedMember returns a *RepeatedMemberError when the JSON object `data` carries more than one top-level member that encoding/json would decode
internal/models/repeated_member.go:43
↓ 4 callersMethodRelease
Release undoes one Hold.
internal/attachments/inflight.go:44
↓ 4 callersMethodReleaseNotifications
ReleaseNotifications hands claimed rows back after a retryable failure: the claim is cleared and attempts goes up by one. A row reaching MaxNotificati
internal/store/push_dispatch.go:313
↓ 4 callersMethodReminderCompatibility
ReminderCompatibility checks the shape for HTTP error precedence. Every mutation checks it again while holding the item, workspace and schedule.
internal/store/reminder_commitment.go:68
↓ 4 callersMethodRemove
Remove implements SessionPresence: idempotent, and safe for a session id that was never added (the stream handler's defer runs on paths where Add may
internal/server/session_presence_redis.go:581
↓ 4 callersFunctionRemovePadEntry
RemovePadEntry deletes mcpServers.pad while leaving other servers + top-level keys intact. Returns (true, nil) when an entry was removed, (false, nil)
internal/mcp/install.go:267
↓ 4 callersMethodRemoveWorkspaceMemberAndRevokeGrants
RemoveWorkspaceMemberAndRevokeGrants atomically removes a user from a workspace and revokes all their grants in a single transaction. This prevents th
internal/store/workspace_members.go:386
↓ 4 callersMethodRenewSessionIfStaleContext
RenewSessionIfStaleContext is RenewSessionIfStale under ctx (TASK-4278): a cancelled request stops the read or the UPDATE and returns ctx's error.
internal/store/sessions.go:347
↓ 4 callersMethodReorderWorkspaceTabs
ReorderWorkspaceTabs rewrites the user's tab positions. The workspaces in order come first, in that order; ids that name no open tab are ignored. Open
internal/store/workspace_tabs.go:300
↓ 4 callersMethodResize
Resize returns a new image with the longer edge fitted to maxLong, preserving aspect ratio. Images already within maxLong are returned unchanged so ca
internal/attachments/processor.go:41
↓ 4 callersMethodResolveBacklinksVisibilityQ
ResolveBacklinksVisibilityQ is ResolveBacklinksVisibility parameterized over its executor (see Queryer). The cross-workspace copy's attachment authori
internal/store/backlinks_visibility.go:66
↓ 4 callersMethodResolveDefault
ResolveDefault returns the workspace to inject into a dispatched call that didn't carry an explicit `workspace` — or "" when this state must not be tr
internal/mcp/workspace.go:99
↓ 4 callersMethodResolveRelationReferentsQ
ResolveRelationReferentsQ is ResolveRelationReferents parameterised over its read executor, following the store's own `...Q` convention (`GetItemQ`, `
internal/store/relation_referents.go:226
↓ 4 callersMethodResolveUserPermission
ResolveUserPermission resolves the effective permission for a user on a specific item, following the permission resolution order from DOC-406: 1. Owne
internal/store/grants.go:344
↓ 4 callersMethodRestoreDocument
RestoreDocument un-archives a document of workspaceID. Both the read and the update are scoped to that workspace, so a document of another workspace i
internal/store/documents.go:1128
↓ 4 callersMethodRevokeAccessToken
RevokeAccessToken mirrors RevokeRefreshToken for access tokens. fosite calls these in pairs when revoking a grant (the unified "revoke the whole famil
internal/oauth/storage.go:454
↓ 4 callersMethodRevokeRefreshTokenFamily
============================================================ Token revocation (handler/oauth2/revocation_storage.go) =================================
internal/store/oauth.go:551
↓ 4 callersMethodRotateInstallClientSecretTx
RotateInstallClientSecretTx replaces the client's secret and returns the new one. Tokens already issued are the caller's business: rotate bumps the in
internal/store/install_clients.go:254
↓ 4 callersMethodRotateRefreshToken
RotateRefreshToken retires every token of the grant — both the refresh family AND the paired access family for the given requestID (the grant itself l
internal/store/oauth.go:429
↓ 4 callersMethodRunStdio
RunStdio is Run with explicit stdin / stdout streams. Used by tests that drive the server in-process via io.Pipe. The same shutdown semantics as Run
internal/mcp/server.go:133
↓ 4 callersFunctionRunWorker
RunWorker serves the materializer worker protocol: frames of a uint32 big-endian length followed by that many bytes of JSON, a WorkerRequest in on r a
internal/materialize/worker.go:66
↓ 4 callersMethodSetBaseURL
SetBaseURL sets the public base URL used for generating shareable links. If the supplied URL has an unspecified bind-all host ("0.0.0.0", "::", "[::]
internal/server/server.go:1073
↓ 4 callersMethodSetDecisionBase
SetDecisionBase records the config-file source and the question-set registry, both fixed for the process lifetime. Call reconfigureDecisions (via Conf
internal/server/decision_settings.go:60
↓ 4 callersMethodSetDecisionTickChannel
SetDecisionTickChannel replaces the interval ticker with a caller-driven channel. Test affordance only.
internal/server/decision_tick.go:121
↓ 4 callersFunctionSetDisplayLocationResolver
SetDisplayLocationResolver installs the CLI process's lazy viewer-zone lookup. A nil resolver restores the UTC default, including for non-CLI consumer
internal/cli/zone.go:9
↓ 4 callersMethodSetFailureObserver
SetFailureObserver attaches the callback; nil detaches. Safe to call after the registry is running. The callback must be safe for concurrent use and m
internal/server/session_presence_observer.go:52
↓ 4 callersMethodSetImageProcessor
SetImageProcessor wires the image processor that the upload handler uses to derive thumbnail variants (TASK-878). Optional — without it uploads still
internal/server/server.go:1339
↓ 4 callersMethodSetImportArtifactMaxBytes
SetImportArtifactMaxBytes overrides the default 1 MiB cap on a single playbook/convention artifact import. Set to 0 to fall back to the default. Wired
internal/server/server.go:1382
↓ 4 callersMethodSetMCPWriteCallClassifier
SetMCPWriteCallClassifier tells the /mcp mount which tool calls need a write scope (TASK-2308). cmd/pad wires the catalog's own read-only knowledge; n
internal/server/middleware_mcp_scope.go:20
↓ 4 callersMethodSetPushDispatchConfig
SetPushDispatchConfig overrides the timings; zero keeps the current value. Server startup calls it from the PAD_PUSH_DISPATCH_* knobs (cmd/pad configu
internal/server/push_dispatch.go:137
↓ 4 callersFunctionSetRelativeDataDirWarningSink
SetRelativeDataDirWarningSink routes the relative data-dir warning: the server sets it so the line goes through slog; a machine-read stream (the plugi
internal/config/config.go:366
↓ 4 callersMethodSetRestoreBoundary
SetRestoreBoundary records a restore boundary for itemID, keeping the stored value monotonically non-decreasing (a later restore always has a higher o
internal/collab/manager.go:222
↓ 4 callersMethodSetSeedCollectionsFailureHookForTesting
SetSeedCollectionsFailureHookForTesting makes SeedCollectionsFromTemplate return hook's error, once the template's collections exist and before any of
internal/store/testing_helpers.go:205
↓ 4 callersMethodSetShareAssetSecret
SetShareAssetSecret wires the key for protected share-link image signatures (see Server.shareAssetSecret). Copied like SetClaimSecret; nil clears it.
internal/server/handlers_oauth.go:114
↓ 4 callersMethodSetTokenReaperConfig
SetTokenReaperConfig overrides the default sweep interval (1h). Pass 0 to keep the package default. Must be called before StartTokenReaper; calling af
internal/server/token_reaper.go:31
↓ 4 callersMethodSetToolSurfaceHandler
SetToolSurfaceHandler wires the MCP catalog→JSON serializer onto the server (PLAN-1888 / TASK-1891). Called once at startup by cmd/pad/main.go with mc
internal/server/handlers_mcp.go:106
↓ 4 callersMethodSetTrustedProxies
SetTrustedProxies configures which direct TCP peers are allowed to set X-Real-IP / X-Forwarded-For on incoming requests. Accepts a comma- separated li
internal/server/server.go:1623
↓ 4 callersMethodSetWriteDeadline
SetWriteDeadline is where a handler's http.ResponseController lands: the controller stops at the first writer that has the method. A handler that sets
internal/server/middleware_write_deadline.go:202
↓ 4 callersFunctionShortWorkerID
ShortWorkerID is the display form ("wk_3f2a"): enough to tell two holders apart in a conflict message or an item's detail, never the full id, which is
internal/models/lease_worker.go:34
↓ 4 callersFunctionShouldEmbedAsImage
ShouldEmbedAsImage decides <img> vs file chip (BUG-2964). THE RULE IS A DISJUNCTION: embed as <img> iff THE VARIANT THIS RENDER WILL REQUEST exists (
internal/server/render/attachments.go:139
↓ 4 callersMethodStagePendingBlob
StagePendingBlob writes one fetched blob into a fetching reservation. The staged total may not exceed the reservation's charge (the per-install cap),
internal/store/app_pending.go:158
↓ 4 callersMethodStageUpload
StageUpload runs steps 1 to 4: size, admission, type and blob.
internal/appstore/attachments.go:171
↓ 4 callersMethodStartDecisionTick
StartDecisionTick starts the evaluation loop. Idempotent, a no-op with no runner attached, and a no-op once Stop() has run.
internal/server/decision_tick.go:129
↓ 4 callersMethodStartTokenReaper
StartTokenReaper kicks off the periodic sweep that deletes expired/used email-verification tokens, password-reset tokens, sessions, CLI-auth sessions,
internal/server/token_reaper.go:49
↓ 4 callersFunctionStatusColor
StatusColor returns a *color.Color appropriate for the given status string.
internal/cli/format.go:28
↓ 4 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:689
↓ 4 callersMethodString
String names a result, for logs and tests.
internal/webhooks/app_delivery.go:221
↓ 4 callersMethodSubscribeWithOverflow
SubscribeWithOverflow is Subscribe with the overflow signal (TASK-1273): onOverflow runs once, on its own goroutine, the first time an event this subs
internal/collab/memory_bus.go:67
↓ 4 callersMethodSubscriberCount
SubscriberCount returns the number of active local subscribers.
internal/events/bus.go:324
↓ 4 callersMethodSweepExpiredPendingInstalls
SweepExpiredPendingInstalls deletes every expired reservation and its blobs, returning how many records it removed.
internal/store/app_pending.go:238
↓ 4 callersMethodTOTPSecretForVerify
TOTPSecretForVerify returns the plaintext TOTP secret of a user whose 2FA is enabled, for the second-factor check and nothing else. It is the only rea
internal/store/users.go:96
↓ 4 callersFunctionToItemAgentView
ToItemAgentView projects one item for machine consumption. The full content replaces content_preview so the same text is never paid for twice.
internal/cli/item_summary.go:180
↓ 4 callersMethodUninstall
Uninstall removes the pad entry from the named agent's config. Idempotent: a missing file or missing entry is not an error and returns (path, false, n
internal/mcp/install.go:689
↓ 4 callersMethodUpdateComment
UpdateComment replaces the body of a comment this install wrote as this actor, addressed through its item, in one FencedTx.
internal/appstore/comments.go:89
↓ 4 callersMethodUpdateItemFields
UpdateItemFields applies a fields patch (declared, scalar, non-relation keys, validated by appstore) to an item this install created. The seq lock is
internal/store/fenced_items.go:328
↓ 4 callersMethodUpgradeAppInstall
UpgradeAppInstall applies a reviewed upgrade in ONE transaction. Locks (Postgres), in this order: the owner's users row FOR SHARE (as provisioning, a
internal/store/app_upgrade.go:121
↓ 4 callersFunctionValidateAbandonedOptions
ValidateAbandonedOptions refuses a schema whose abandoned_options name a value that is not one of the same field's terminal_options (BUG-2347). An aba
internal/models/terminal.go:252
↓ 4 callersFunctionValidateCalendarFields
ValidateCalendarFields checks a calendar's date_field and end_field against the collection's schema. date_field is required: a schema date field or a
internal/models/view_calendar.go:63
↓ 4 callersFunctionValidateChatGPTCatalog
ValidateChatGPTCatalog checks the catalog against Catalog: every entry's source exists, every parameter exists on it, required parameters are declared
internal/mcp/chatgpt_catalog.go:600
↓ 4 callersFunctionValidateConventionMetadata
ValidateConventionMetadata normalizes a typed convention member and refuses one that carries nothing: an empty object would lower to a key the extract
internal/models/item.go:1380
↓ 4 callersFunctionWindowsDeviceName
WindowsDeviceName reports whether Windows would open name as a device. It reads the name as Windows does: the stem is everything before the FIRST dot
internal/attachments/filename.go:187
↓ 4 callersFunctionWithValidatedSchema
WithValidatedSchema hands MoveItemWithPreCheck the exact bytes of the target collection's schema its caller validated the moved fields against (BUG-34
internal/store/event_outbox.go:98
↓ 4 callersMethodWorkspaceHasAgentActivity
WorkspaceHasAgentActivity reports whether any non-deleted item VISIBLE to the caller was created via an agent surface — direct CLI invocation or the R
internal/store/items.go:7202
↓ 4 callersMethodWorkspaceID
WorkspaceID is a nil-safe accessor for the resolved workspace's ID.
internal/server/authz_cross_workspace.go:176
↓ 4 callersMethodWorkspaceSlug
WorkspaceSlug is a nil-safe accessor for the resolved workspace's canonical slug — the value the token allow-list was tested against.
internal/server/authz_cross_workspace.go:185
↓ 4 callersMethodWorkspaceSubscriberCount
WorkspaceSubscriberCount returns the number of active local subscribers for a workspace.
internal/events/redis_bus.go:1675
↓ 4 callersMethodWrite
(p []byte)
internal/materialize/supervisor.go:1082
↓ 4 callersMethodWrite
(p []byte)
internal/events/redis_subscribe_rejected_test.go:72
↓ 4 callersMethodWrite
(p []byte)
internal/server/bug3821_write_deadline_test.go:607
↓ 4 callersMethodWrite
(p []byte)
internal/watchevents/redis_subscribe_failed_test.go:41
↓ 4 callersMethodWriteDenied
WriteDenied writes the acknowledging denial, for paths where the caller supplied the target slug themselves and a bare 404 would be unhelpful — the co
internal/server/authz_cross_workspace.go:238
↓ 4 callersFunctionWriteOpenChildrenError
WriteOpenChildrenError formats an open-children rejection to w in the canonical two-track shape the project guarantees (IDEA-1494): 1. A single `pad-
internal/cli/client.go:2474
↓ 4 callersFunctionabortDrag
* Tear a block gesture down mid-flight (BUG-2453). * * ABORT RATHER THAN EARLY-RETURN, the same choice `ItemGraph`'s * `abortPan` ma
web/src/lib/components/editor/block-drag-handle.ts:883
↓ 4 callersMethodaccessSince
accessSince renders every workspace_access_changed notification after id as sorted "change user-email workspace-id" lines, so an assertion names peopl
internal/server/workspace_access_notify_test.go:86
↓ 4 callersMethodaccountExists
(t *testing.T, email string)
internal/server/handlers_invitation_accept_limit_test.go:85
↓ 4 callersMethodaccountStorageUsageQ
accountStorageUsageQ is the bytes of non-deleted attachments across every workspace ownerID owns: the pool a per-account limit is checked against. A
internal/store/attachments.go:1772
↓ 4 callersFunctionact
(minutesAgo: number, over: Partial<Activity> = {})
web/src/lib/components/activity/EpisodeFeed.svelte.test.ts:28
↓ 4 callersFunctionact
(minutesAgo: number, over: Partial<Activity> = {})
web/src/lib/utils/activityEpisodes.test.ts:10
↓ 4 callersFunctionactionItemImport
actionItemImport handles pad_item.action=import. The CLI's `pad item import <file>` reads the artifact from a file (or stdin when the positional is `-
internal/mcp/catalog_item.go:1071
↓ 4 callersFunctionactivityKeysetClause
activityKeysetClause is the keyset predicate the paginated activity feeds share (BUG-2781): rows strictly after the cursor in (created_at, id) DESCEND
internal/store/activities.go:1058
↓ 4 callersMethodadd
add records user under kind unless they are the actor, empty, or already in.
internal/store/notifications.go:204
↓ 4 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:366
↓ 4 callersFunctionaddWorkerIDFlag
addWorkerIDFlag declares --worker-id on a lease-aware command (claim, release, project next / ready; TASK-3613). Unset, the client sends this session'
cmd/pad/worker_flag.go:11
← previousnext →3,601–3,700 of 28,840, ranked by callers