MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 7 callersMethodGetAuthorizationCode
GetAuthorizationCode hydrates the code's session. Returns ErrOAuthInvalidatedCode if the row exists but active=false (fosite triggers grant-family rev
internal/store/oauth.go:291
↓ 7 callersMethodGetCurrentUser
GetCurrentUser returns the authenticated user's profile.
internal/cli/client.go:2316
↓ 7 callersMethodGetItemBuiltinOrigin
GetItemBuiltinOrigin returns the built-in an item was made from, or nil when it was not made from one.
internal/store/builtin_origin.go:50
↓ 7 callersMethodGetOAuthProviders
GetOAuthProviders parses the JSON oauth_providers field into a string slice.
internal/models/user.go:114
↓ 7 callersMethodGetRefreshToken
GetRefreshToken hydrates a refresh token. Returns ErrOAuthInactiveToken when active=false, which fosite uses to trigger family revocation on the match
internal/store/oauth.go:379
↓ 7 callersMethodGetWorkspaceMemberQ
GetWorkspaceMemberQ is GetWorkspaceMember parameterized over its executor (see Queryer).
internal/store/workspace_members.go:452
↓ 7 callersMethodHandler
Handler returns the configured HTTP handler (router). Useful for testing with httptest.NewServer.
internal/server/server.go:2918
↓ 7 callersMethodHasEncryptionKey
HasEncryptionKey reports whether an encryption key is configured.
internal/store/encryption.go:27
↓ 7 callersMethodHijack
()
internal/server/flush_error_writer.go:94
↓ 7 callersFunctionIndex
Index builds the lookup for sec. A body with no acceptance-criteria section yields an empty index, in which every id is missing.
internal/verification/verification.go:57
↓ 7 callersMethodIsCompactedLog
IsCompactedLog reports whether itemID's op-log is exactly its compaction snapshot (one row, the snapshot row), so the sweep does not compact it again.
internal/store/yjs_compaction.go:165
↓ 7 callersMethodIsEdited
IsEdited reports whether the body changed after creation: create stamps created_at and updated_at with one value, and only an edit moves updated_at (r
internal/models/comment.go:83
↓ 7 callersFunctionIsReservedAppEmail
IsReservedAppEmail reports whether email is in the bot principals' domain, compared case-insensitively after trimming, as the users table stores it.
internal/models/user.go:69
↓ 7 callersMethodListCommentsBeforeTime
ListCommentsBeforeTime returns comments for an item created before the given time, ordered newest-first, limited to `limit` results. Used for cursor-b
internal/store/comments.go:464
↓ 7 callersMethodListForUser
ListForUser returns userID's live sessions, oldest connection first. The returned slice is a copy and is safe to retain. THE ERROR IS NOT DECORATION,
internal/server/session_presence.go:343
↓ 7 callersMethodListForUser
ListForUser implements SessionPresence, oldest connection first with the session id as a tiebreaker — the same deterministic order MemorySessionPresen
internal/server/session_presence_redis.go:666
↓ 7 callersMethodListPendingOutboxEvents
ListPendingOutboxEvents returns up to limit undispatched events in drain order. Ordering is (occurred_at, id) and is NOT a delivery-order contract —
internal/store/event_outbox.go:1738
↓ 7 callersFunctionListTemplates
ListTemplates returns all workspace templates that should be shown in pickers. Templates flagged Hidden are excluded.
internal/collections/templates.go:1130
↓ 7 callersMethodListWebhooks
(workspaceID string)
internal/webhooks/dispatcher.go:74
↓ 7 callersFunctionMCPTokenIdentityFromContext
MCPTokenIdentityFromContext returns (kind, ref) attached by WithMCPTokenIdentity, or ("", "") if none was set. The audit middleware uses this to popul
internal/server/context.go:192
↓ 7 callersMethodMarkMigratedTx
MarkMigratedTx installs the refusal triggers and writes the marker row. IT MUST RUN INSIDE THE MIGRATION'S OWN TRANSACTION, after the last import has
internal/store/migrated.go:415
↓ 7 callersMethodMarkNotificationsSkipped
MarkNotificationsSkipped records ids as deliberately not pushed, with the reason. Same guard as MarkNotificationsSent.
internal/store/push_dispatch.go:304
↓ 7 callersMethodModel
Model is the pinned model identifier this provider will use.
internal/decision/decision.go:299
↓ 7 callersMethodMoveItemWithPreCheck
MoveItemWithPreCheck is MoveItem with the same precheck escape hatch UpdateItemWithPreCheck offers. A `pad item move ... --field status=done` writes a
internal/store/items.go:6125
↓ 7 callersFunctionNewCursor
NewCursor mints the cursor after row r.
internal/needs/cursor.go:144
↓ 7 callersFunctionNewGraph
NewGraph validates and copies edges without depending on their order.
internal/schedule/links.go:166
↓ 7 callersFunctionNewRemoteTransport
NewRemoteTransport builds the Streamable HTTP transport pad serves at /mcp in cloud mode. It lives here rather than inline at the call site so the op
internal/mcp/transport.go:74
↓ 7 callersFunctionNewSender
NewSender creates a new email sender.
internal/email/sender.go:36
↓ 7 callersMethodNewWatchEventsStreamRequest
NewWatchEventsStreamRequest builds an authenticated GET request for GET /api/v1/events/stream (TASK-2533), used by `pad watch --stream --for-session`.
internal/cli/client.go:983
↓ 7 callersFunctionNormalizeRule
NormalizeRule turns a shorthand or RRULE text into the canonical rule. One leading "RRULE:" and surrounding space are stripped. It checks grammar only
internal/schedule/shorthand.go:40
↓ 7 callersFunctionNote
Note is the sentence that explains an unset zone, or "" when one is set.
internal/usertz/usertz.go:51
↓ 7 callersFunctionOwnerLiveness
OwnerLiveness is the shared verdict. EVERY recorded signal must agree: the socket (when recorded) must still exist with the identity captured at regis
internal/cli/session_owner.go:211
↓ 7 callersFunctionParameterRefused
ParameterRefused reports whether a value bound as a SQL parameter violates the invariant, and is the store layer's single entry point. isJSON is the
internal/textguard/textguard.go:179
↓ 7 callersFunctionParse
Parse decodes and validates manifest bytes. The first failure is returned as an *Error naming its path.
internal/appmanifest/manifest.go:152
↓ 7 callersFunctionParse
Parse validates a namespace and returns the Keys for it. An UNSET namespace — the empty string — is valid and yields Default. A value that is present
internal/redisns/redisns.go:123
↓ 7 callersFunctionPositiveTerminalValuesForDoneField
PositiveTerminalValuesForDoneField is TerminalValuesForDoneField minus the values that close WITHOUT delivering — the values that count as completed *
internal/models/terminal.go:141
↓ 7 callersMethodPreviewScheduleCarry
PreviewScheduleCarry is what the copy preflight reports: the same plan the copy runs, read without a lock and written nowhere. assignee is the assign
internal/store/schedule_carry_copy.go:325
↓ 7 callersMethodPruneItemOpLogTx
PruneItemOpLogTx deletes an item's ENTIRE op-log inside the caller's transaction. Used by version-restore (BUG-2264): the restore's canonical items.co
internal/store/yjs_updates.go:715
↓ 7 callersFunctionPruneSessions
PruneSessions removes DEAD records, and — only when olderThan > 0 — UNKNOWN records whose timestamp is older than now-olderThan, each with its chat-se
internal/cli/session_registry.go:525
↓ 7 callersMethodPruneSweep
PruneSweep finds every item whose ENTIRE op-log is older than `minAge` and prunes the whole op-log for those items under the per-item lock. Returns a
internal/collab/manager.go:743
↓ 7 callersMethodPublish
Publish fans an event out to every subscriber whose itemID matches. Non-blocking: a slow subscriber whose buffer is full has new events dropped (logg
internal/collab/memory_bus.go:133
↓ 7 callersMethodRecordItemWorkspaceMoveTx
RecordItemWorkspaceMoveTx inserts one provenance row inside an existing transaction. It is tx-taking by design: the row must be written in the same tr
internal/store/item_workspace_moves.go:55
↓ 7 callersFunctionRegister
Register installs pad's MCP tools on srv: the built-in pad_set_workspace plus every v0.2 catalog tool. Returns the count of registered tools (includin
internal/mcp/registry.go:78
↓ 7 callersMethodRemoveMilestoneChild
RemoveMilestoneChild soft-removes a selection: the row stays as history. Removing a child that is not selected writes nothing.
internal/store/milestone.go:233
↓ 7 callersFunctionRenderAttachmentImage
RenderAttachmentImage builds an inline `<img>` element for an image attachment. Width/height attributes are emitted when both are known and positive s
internal/server/render/attachments.go:215
↓ 7 callersMethodResendInvitationAdmin
ResendInvitationAdmin replaces a pending invitation with a fresh one (new code, proof and expiry; same workspace, address and role), invited by invite
internal/store/workspace_members.go:1206
↓ 7 callersMethodResolveChatTarget
(target string, ensure bool)
internal/cli/client.go:3755
↓ 7 callersFunctionReversePatch
ReversePatch is CreateReversePatch for text that may not be valid UTF-8 (BUG-3839). go-diff works on runes and slices the input at byte offsets it der
internal/diff/diff.go:130
↓ 7 callersFunctionRewriteBracketAt
RewriteBracketAt rewrites the wiki-link bracket starting at byte position `position` in `content`, replacing the bracket's title segment with `newTitl
internal/links/links.go:261
↓ 7 callersMethodRotateAPIToken
RotateAPIToken generates a new secret for an existing token, preserving all metadata (name, scopes, workspace, user, expiry). The old token is invalid
internal/store/api_tokens.go:133
↓ 7 callersMethodRotateUserSessions
RotateUserSessions is a credential change's session rotation (password change, 2FA disable, provider unlink) as ONE transaction: it mints the replacem
internal/store/sessions.go:198
↓ 7 callersFunctionScheduleErrorCode
ScheduleErrorCode names an error from compiling or advancing a rule as the stable code item_schedules.error_code stores. The full set is the ten sched
internal/store/schedules.go:94
↓ 7 callersFunctionSchemaForMigratedFields
SchemaForMigratedFields returns schema with any reserved-key FieldDef removed, for validating the OUTPUT of MigrateFields. Only migration and copy ne
internal/items/migrate.go:280
↓ 7 callersMethodSearchUsers
SearchUsers returns a filtered, paginated list of users for admin management. Each row carries the User model plus two cheap aggregations the admin t
internal/store/users.go:507
↓ 7 callersMethodSend
Send sends an email using the default from address/name.
internal/email/sender.go:128
↓ 7 callersFunctionSessionsDir
SessionsDir returns ~/.pad/sessions, creating it if it doesn't exist.
internal/cli/session_registry.go:130
↓ 7 callersMethodSetCORSOrigins
SetCORSOrigins configures allowed CORS origins (comma-separated).
internal/server/server.go:1322
↓ 7 callersMethodSetCollabRoomManager
SetCollabRoomManager attaches a Yjs collab RoomManager (PLAN-1248). When set, the /api/v1/collab/{itemID} WebSocket endpoint hands new connections to
internal/server/server.go:1276
↓ 7 callersMethodSetImportBundleMaxBytes
SetImportBundleMaxBytes overrides the default 2 GiB cap on a single workspace import bundle. Set to 0 to fall back to the default. Wired from PAD_IMPO
internal/server/server.go:1375
↓ 7 callersMethodSetOpLogCompactor
SetOpLogCompactor turns dormancy compaction on (nil turns it off). Call before StartOpLogGC.
internal/server/oplog_compaction.go:58
↓ 7 callersMethodSetWebUI
SetWebUI sets the embedded web UI filesystem for serving the SPA.
internal/server/server.go:2742
↓ 7 callersFunctionStopServer
StopServer stops the server this CLI's config points at — or explains why it will not, which is the harder half. The PID file is a HANDLE, not eviden
internal/cli/server.go:163
↓ 7 callersMethodString
()
internal/events/bus.go:193
↓ 7 callersMethodSurfacedDecisions
SurfacedDecisions is the item's latest answers that its set would surface (TASK-3618, for the item brief): the question is current and the answer reac
internal/decision/runner.go:834
↓ 7 callersFunctionT
(children, props = {})
plugin/hooks/register.js:531
↓ 7 callersFunctionTables
Tables returns the distinct tables in ws, sorted.
internal/store/storetest/writecapture.go:53
↓ 7 callersFunctionTokenAllowedWorkspacesFromContext
TokenAllowedWorkspacesFromContext returns the token's workspace allow-list, or nil if none was attached. Three return shapes matter to callers: - nil
internal/server/context.go:213
↓ 7 callersMethodUninstallAppTx
UninstallAppTx is the uninstall's phase 2 (DOC-3371 §8 step 3): ONE transaction, child-first, uninstalling -> uninstalled. 1. the install client: its
internal/store/app_lifecycle.go:304
↓ 7 callersMethodUploadAttachment
UploadAttachment stores an app upload bound to itemID, in the sequence above: StageUpload, then Insert. Refusals of the request itself are InputError
internal/appstore/attachments.go:143
↓ 7 callersMethodUsable
Usable reports whether MCP can be addressed at all: an origin and the two URLs derived from it all resolved.
internal/config/mcp.go:59
↓ 7 callersMethodUserHasGrantsInWorkspace
UserHasGrantsInWorkspace checks if a user has any active collection or item grants in a workspace (even though they are not a member). Used to detect
internal/store/grants.go:448
↓ 7 callersFunctionValidateDocumentTitle
ValidateDocumentTitle checks a document title at write time. Returns a message suitable for a 400 response, or "" when the title is acceptable. Cover
internal/models/document.go:184
↓ 7 callersMethodWorkspaceStorageInfo
WorkspaceStorageInfo returns the consolidated quota summary for a workspace (used + limit + plan + override flag) in a single call. Used by the storag
internal/store/attachments.go:1832
↓ 7 callersMethodWrite
(p []byte)
internal/appfetch/poster_test.go:265
↓ 7 callersFunctionWritePlanLimitError
WritePlanLimitError formats a plan-limit rejection to w in the canonical two-track shape (TASK-788): 1. A single `pad-structured-error/v1: {json}\n`
internal/cli/client.go:2868
↓ 7 callersMethodacceptAs
acceptAs creates an existing account for email, signs it in, and accepts inv through the authenticated door (A1).
internal/server/handlers_invitation_accept_limit_test.go:62
↓ 7 callersMethodaccessEpoch
accessEpoch fingerprints this snapshot's effective visible set, so two revalidation ticks can be compared without re-querying anything (IDEA-2898). I
internal/server/handlers_events.go:806
↓ 7 callersFunctionactionItemList
actionItemList handles pad_item.action=list. It forwards to `item list` but first applies a default limit (when the agent didn't ask for one) and clam
internal/mcp/catalog_item.go:896
↓ 7 callersFunctionaddSearchComment
(t *testing.T, s *Store, item *models.Item, body string)
internal/store/search_comments_test.go:13
↓ 7 callersFunctionadminBillingReq
adminBillingReq fires GET /api/v1/admin/billing-stats with the cookie from a logged-in user. Returns the recorder so callers can inspect status + body
internal/server/handlers_admin_billing_test.go:43
↓ 7 callersMethodadvance
(d time.Duration)
internal/events/redis_heartbeat_test.go:35
↓ 7 callersMethodagendaNow
agendaNow is the clock of the agenda reads. Tests move it.
internal/server/bootstrap_agenda.go:91
↓ 7 callersFunctionallowed
(user: string)
web/src/lib/chat/chatRecords.ts:25
↓ 7 callersFunctionarmStateOwnerVerdict
armStateOwnerVerdict is the tri-state verdict on st's recorded owner. SessionArmState needs all three: dead reaps, alive resolves the file, and unknow
internal/cli/session_arm_state.go:391
↓ 7 callersMethodasCookie
(key string)
internal/server/bug3331_search_scope_test.go:191
↓ 7 callersFunctionassertBlobDenied
assertBlobDenied pins the shared denial shape: 404, no-store, and the exact body every other denial writes.
internal/server/handlers_attachments_download_authz_test.go:203
↓ 7 callersFunctionassertBlobServed
assertBlobServed checks a 200 whose body is want (GET) or whose headers say so (HEAD — no body on the wire, so Content-Type + the positive cache direc
internal/server/handlers_attachments_download_authz_test.go:184
↓ 7 callersMethodasyncFunctions
* Top-level `async function` declarations in the script block, by name. * This is instrument A, and on its own it is NOT the population — see * `n
web/src/test/identityFenceSource.ts:115
↓ 7 callersMethodattach
(page: Page)
web/e2e/lib/attachment-viewer.ts:374
↓ 7 callersFunctionauditedMCPServer
MCP audit middleware tests (PLAN-943 TASK-960). What's covered: - A successful tool call writes one audit row with the right tool_name + args_hash +
internal/server/middleware_mcp_audit_test.go:34
↓ 7 callersMethodawaitExit
awaitExit waits for the child to be reaped. Kill is SIGKILL / TerminateProcess, so this is prompt; the bound covers a wedged kernel.
internal/materialize/supervisor.go:483
↓ 7 callersMethodblock
(stmts: Node[], s: State)
web/src/test/identityFenceAst.ts:1120
↓ 7 callersFunctionbody
(c: HTMLElement)
web/src/lib/components/chat/MessageBubble.svelte.test.ts:264
↓ 7 callersFunctionbug2103Conns
(mgr *RoomManager, itemID string)
internal/collab/prune_evict_bug2103_test.go:46
↓ 7 callersFunctionbug3678Fixture
(t *testing.T)
internal/store/bug3678_refresh_after_revoke_test.go:28
↓ 7 callersFunctionbuildDoneContextMap
buildDoneContextMap builds a map of collection ID → (schema, settings) for quick lookups during dashboard / lineage traversals.
internal/server/handlers_dashboard.go:304
↓ 7 callersMethodbulkFieldUpdate
bulkFieldUpdate merges field changes into the item's existing fields, validates against the collection schema, runs the open-children guard (unless fo
internal/server/handlers_items_bulk.go:557
↓ 7 callersMethodcanEditInCollection
canEditInCollection is requireEditPermission's decision without the response, for callers that report per row (bulk) rather than per request. An edit
internal/server/server.go:4105
↓ 7 callersFunctioncanOpenInViewer
(mime: string | null | undefined)
web/src/lib/attachments/display.ts:378
↓ 7 callersFunctioncancelInit
cancelInit is the canonical exit path for both Ctrl+C and explicit "Cancel" actions during pad init / pad workspace init. It prints a brief message to
cmd/pad/cancel.go:25
← previousnext →2,101–2,200 of 28,840, ranked by callers