Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
28,840 in github.com/PerpetualSoftware/pad
⨍
Functions
28,840
◇
Types & classes
3,245
↓ 7 callers
Method
GetAuthorizationCode
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 callers
Method
GetCurrentUser
GetCurrentUser returns the authenticated user's profile.
internal/cli/client.go:2316
↓ 7 callers
Method
GetItemBuiltinOrigin
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 callers
Method
GetOAuthProviders
GetOAuthProviders parses the JSON oauth_providers field into a string slice.
internal/models/user.go:114
↓ 7 callers
Method
GetRefreshToken
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 callers
Method
GetWorkspaceMemberQ
GetWorkspaceMemberQ is GetWorkspaceMember parameterized over its executor (see Queryer).
internal/store/workspace_members.go:452
↓ 7 callers
Method
Handler
Handler returns the configured HTTP handler (router). Useful for testing with httptest.NewServer.
internal/server/server.go:2918
↓ 7 callers
Method
HasEncryptionKey
HasEncryptionKey reports whether an encryption key is configured.
internal/store/encryption.go:27
↓ 7 callers
Method
Hijack
()
internal/server/flush_error_writer.go:94
↓ 7 callers
Function
Index
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 callers
Method
IsCompactedLog
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 callers
Method
IsEdited
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 callers
Function
IsReservedAppEmail
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 callers
Method
ListCommentsBeforeTime
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 callers
Method
ListForUser
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 callers
Method
ListForUser
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 callers
Method
ListPendingOutboxEvents
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 callers
Function
ListTemplates
ListTemplates returns all workspace templates that should be shown in pickers. Templates flagged Hidden are excluded.
internal/collections/templates.go:1130
↓ 7 callers
Method
ListWebhooks
(workspaceID string)
internal/webhooks/dispatcher.go:74
↓ 7 callers
Function
MCPTokenIdentityFromContext
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 callers
Method
MarkMigratedTx
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 callers
Method
MarkNotificationsSkipped
MarkNotificationsSkipped records ids as deliberately not pushed, with the reason. Same guard as MarkNotificationsSent.
internal/store/push_dispatch.go:304
↓ 7 callers
Method
Model
Model is the pinned model identifier this provider will use.
internal/decision/decision.go:299
↓ 7 callers
Method
MoveItemWithPreCheck
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 callers
Function
NewCursor
NewCursor mints the cursor after row r.
internal/needs/cursor.go:144
↓ 7 callers
Function
NewGraph
NewGraph validates and copies edges without depending on their order.
internal/schedule/links.go:166
↓ 7 callers
Function
NewRemoteTransport
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 callers
Function
NewSender
NewSender creates a new email sender.
internal/email/sender.go:36
↓ 7 callers
Method
NewWatchEventsStreamRequest
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 callers
Function
NormalizeRule
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 callers
Function
Note
Note is the sentence that explains an unset zone, or "" when one is set.
internal/usertz/usertz.go:51
↓ 7 callers
Function
OwnerLiveness
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 callers
Function
ParameterRefused
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 callers
Function
Parse
Parse decodes and validates manifest bytes. The first failure is returned as an *Error naming its path.
internal/appmanifest/manifest.go:152
↓ 7 callers
Function
Parse
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 callers
Function
PositiveTerminalValuesForDoneField
PositiveTerminalValuesForDoneField is TerminalValuesForDoneField minus the values that close WITHOUT delivering — the values that count as completed *
internal/models/terminal.go:141
↓ 7 callers
Method
PreviewScheduleCarry
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 callers
Method
PruneItemOpLogTx
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 callers
Function
PruneSessions
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 callers
Method
PruneSweep
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 callers
Method
Publish
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 callers
Method
RecordItemWorkspaceMoveTx
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 callers
Function
Register
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 callers
Method
RemoveMilestoneChild
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 callers
Function
RenderAttachmentImage
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 callers
Method
ResendInvitationAdmin
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 callers
Method
ResolveChatTarget
(target string, ensure bool)
internal/cli/client.go:3755
↓ 7 callers
Function
ReversePatch
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 callers
Function
RewriteBracketAt
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 callers
Method
RotateAPIToken
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 callers
Method
RotateUserSessions
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 callers
Function
ScheduleErrorCode
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 callers
Function
SchemaForMigratedFields
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 callers
Method
SearchUsers
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 callers
Method
Send
Send sends an email using the default from address/name.
internal/email/sender.go:128
↓ 7 callers
Function
SessionsDir
SessionsDir returns ~/.pad/sessions, creating it if it doesn't exist.
internal/cli/session_registry.go:130
↓ 7 callers
Method
SetCORSOrigins
SetCORSOrigins configures allowed CORS origins (comma-separated).
internal/server/server.go:1322
↓ 7 callers
Method
SetCollabRoomManager
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 callers
Method
SetImportBundleMaxBytes
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 callers
Method
SetOpLogCompactor
SetOpLogCompactor turns dormancy compaction on (nil turns it off). Call before StartOpLogGC.
internal/server/oplog_compaction.go:58
↓ 7 callers
Method
SetWebUI
SetWebUI sets the embedded web UI filesystem for serving the SPA.
internal/server/server.go:2742
↓ 7 callers
Function
StopServer
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 callers
Method
String
()
internal/events/bus.go:193
↓ 7 callers
Method
SurfacedDecisions
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 callers
Function
T
(children, props = {})
plugin/hooks/register.js:531
↓ 7 callers
Function
Tables
Tables returns the distinct tables in ws, sorted.
internal/store/storetest/writecapture.go:53
↓ 7 callers
Function
TokenAllowedWorkspacesFromContext
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 callers
Method
UninstallAppTx
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 callers
Method
UploadAttachment
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 callers
Method
Usable
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 callers
Method
UserHasGrantsInWorkspace
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 callers
Function
ValidateDocumentTitle
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 callers
Method
WorkspaceStorageInfo
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 callers
Method
Write
(p []byte)
internal/appfetch/poster_test.go:265
↓ 7 callers
Function
WritePlanLimitError
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 callers
Method
acceptAs
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 callers
Method
accessEpoch
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 callers
Function
actionItemList
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 callers
Function
addSearchComment
(t *testing.T, s *Store, item *models.Item, body string)
internal/store/search_comments_test.go:13
↓ 7 callers
Function
adminBillingReq
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 callers
Method
advance
(d time.Duration)
internal/events/redis_heartbeat_test.go:35
↓ 7 callers
Method
agendaNow
agendaNow is the clock of the agenda reads. Tests move it.
internal/server/bootstrap_agenda.go:91
↓ 7 callers
Function
allowed
(user: string)
web/src/lib/chat/chatRecords.ts:25
↓ 7 callers
Function
armStateOwnerVerdict
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 callers
Method
asCookie
(key string)
internal/server/bug3331_search_scope_test.go:191
↓ 7 callers
Function
assertBlobDenied
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 callers
Function
assertBlobServed
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 callers
Method
asyncFunctions
* 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 callers
Method
attach
(page: Page)
web/e2e/lib/attachment-viewer.ts:374
↓ 7 callers
Function
auditedMCPServer
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 callers
Method
awaitExit
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 callers
Method
block
(stmts: Node[], s: State)
web/src/test/identityFenceAst.ts:1120
↓ 7 callers
Function
body
(c: HTMLElement)
web/src/lib/components/chat/MessageBubble.svelte.test.ts:264
↓ 7 callers
Function
bug2103Conns
(mgr *RoomManager, itemID string)
internal/collab/prune_evict_bug2103_test.go:46
↓ 7 callers
Function
bug3678Fixture
(t *testing.T)
internal/store/bug3678_refresh_after_revoke_test.go:28
↓ 7 callers
Function
buildDoneContextMap
buildDoneContextMap builds a map of collection ID → (schema, settings) for quick lookups during dashboard / lineage traversals.
internal/server/handlers_dashboard.go:304
↓ 7 callers
Method
bulkFieldUpdate
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 callers
Method
canEditInCollection
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 callers
Function
canOpenInViewer
(mime: string | null | undefined)
web/src/lib/attachments/display.ts:378
↓ 7 callers
Function
cancelInit
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
← previous
next →
2,101–2,200 of 28,840, ranked by callers