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
↓ 9 callers
Function
waitForAccessSettled
(page: Page)
web/e2e/lib/permission-walk.ts:304
↓ 9 callers
Function
waitKick
(t *testing.T, ch <-chan struct{}, what string)
internal/server/task3365_access_kick_test.go:106
↓ 9 callers
Function
workspaceCount
(t *testing.T, srv *Server)
internal/server/workspace_owner_compensation_test.go:73
↓ 9 callers
Function
writeAppStoreError
writeAppStoreError maps an appstore refusal to its response.
internal/server/app_api_write.go:111
↓ 9 callers
Method
writeScheduleItemGone
writeScheduleItemGone answers a write whose item went away under it (a move archived it while the write waited): the answer the door's own pre-check g
internal/server/handlers_schedules.go:205
↓ 8 callers
Method
#publish
(beyond: number | null)
web/src/lib/stores/chatThread.svelte.ts:192
↓ 8 callers
Method
AddReaction
AddReaction adds an emoji reaction to a comment. Returns the created reaction, or the existing one if the same user+emoji already exists.
internal/store/reactions.go:11
↓ 8 callers
Method
AllowedWorkspaces
AllowedWorkspaces returns the workspace allow-list stored in session.Extra at consent time (TASK-952). Three return shapes matter to callers: - nil —
internal/oauth/session.go:101
↓ 8 callers
Method
BackfillWikiLinks
BackfillWikiLinks scans every item with non-empty content and re-parses its body to populate `item_wiki_links`. Designed to be called from server star
internal/store/wiki_links_backfill.go:76
↓ 8 callers
Method
BeginSnapshot
BeginSnapshot opens a transaction that is both the write lock and a single read snapshot for everything run on it (BUG-3072). The DSN carries `_txloc
internal/store/store.go:421
↓ 8 callers
Function
CanonicalJSONNumbers
CanonicalJSONNumbers returns v with every number replaced by one canonical spelling of its exact value, for code that COMPARES decoded field values (B
internal/models/fields_json.go:146
↓ 8 callers
Function
ChatSeenPath
ChatSeenPath is the log for one harness pid.
internal/cli/chat_seen.go:55
↓ 8 callers
Function
CheckLink
CheckLink checks an insertion and every structural footprint it can enlarge. A nil graph is empty. Use the same limits here and in Plan for admission
internal/schedule/links.go:272
↓ 8 callers
Method
CloudMode
CloudMode reports whether the marketing footer is currently enabled. Templates read it through getCloudMode() so they pick up the same snapshot for th
internal/email/sender.go:93
↓ 8 callers
Method
ConsumePasswordReset
ConsumePasswordReset atomically validates and marks a reset token as used. Returns the user if the token is valid, unused, and not expired. Returns ni
internal/store/password_resets.go:84
↓ 8 callers
Method
CreateAppUserTx
CreateAppUserTx creates the bot principal an installed app acts as when it acts as itself (SPEC-6 §3, TASK-3392). It is the only path that writes kind
internal/store/users.go:2166
↓ 8 callers
Function
CreatePatch
CreatePatch computes a compact patch that transforms oldText into newText. The patch can be applied with ApplyPatch to recover newText from oldText. B
internal/diff/diff.go:19
↓ 8 callers
Function
DecodeFieldsJSON
DecodeFieldsJSON decodes an item's fields blob with every number kept as the literal it was written as (a json.Number), for code that decodes a blob i
internal/models/fields_json.go:32
↓ 8 callers
Method
DeleteScheduleChecked
DeleteScheduleChecked is DeleteSchedule for a caller that has decided whether the actor may take a deadline away. A native schedule that has a deadlin
internal/store/schedules.go:1160
↓ 8 callers
Method
EncryptionKeyFile
EncryptionKeyFile returns the on-disk path where an auto-generated encryption key is persisted. Operator-provided keys (PAD_ENCRYPTION_KEY env, encryp
internal/config/config.go:883
↓ 8 callers
Method
Error
()
internal/appstore/items.go:36
↓ 8 callers
Method
Exec
(query string, args ...any)
internal/store/workspace_tabs.go:391
↓ 8 callers
Method
FailDecisionJob
FailDecisionJob records a failed attempt and holds the job until retryAfter has passed. The lease doubles as the backoff: the row stays claimed by thi
internal/store/decisions.go:524
↓ 8 callers
Method
FetchBytes
(ctx context.Context, args []string)
internal/mcp/resources.go:58
↓ 8 callers
Method
GetBlocksEdges
GetBlocksEdges returns every `blocks` link in the workspace whose source and target items are both live (non-deleted), newest link first. The created_
internal/store/items.go:6025
↓ 8 callers
Method
GetChildItems
GetChildItems returns all non-deleted child items linked to the given parent via item_links. Returns children from any collection. A child in a soft-
internal/store/items.go:5545
↓ 8 callers
Method
GetChildItemsForParents
GetChildItemsForParents returns the live child items for each of the given parent item IDs, grouped by parent ID, in ONE query — collapsing the per-pa
internal/store/items.go:5932
↓ 8 callers
Method
GetItemByRef
GetItemByRef looks up a live item by PREFIX-NUMBER. A prefix miss resolves only when the item's durable move log names a former collection whose curre
internal/store/items.go:951
↓ 8 callers
Method
GetItemProgress
--- Child Item Progress --- GetItemProgress counts total and done child items linked to a parent via item_links. "Done" means the child item's done fi
internal/store/items.go:5129
↓ 8 callers
Method
HTTPS
HTTPS reports whether the auth-server URL is https, which is what makes OAuth available (PLAN-2310 DR-4: http deployments are PAT-only).
internal/config/mcp.go:66
↓ 8 callers
Method
HasOAuthProvider
HasOAuthProvider returns true if the user has linked the given provider.
internal/models/user.go:126
↓ 8 callers
Method
HydrateRelationTargetsQ
HydrateRelationTargetsQ resolves the stored `relation` values on a batch of items into {id, ref, title} entries (PLAN-2857 U6). BATCHED ON PURPOSE. A
internal/store/relation_referents.go:2070
↓ 8 callers
Method
InstallState
InstallState returns an install's state, for the HTTP layer's answers.
internal/store/app_lifecycle.go:404
↓ 8 callers
Function
IsContentStateStale
IsContentStateStale reports whether an Item.ContentState value says the stored body is behind edits that exist elsewhere, for any reason. It is the on
internal/models/item.go:315
↓ 8 callers
Method
IsExpired
IsExpired reports whether an invitation is past its expiration window. Invitations created before the expires_at migration (nil ExpiresAt) are treated
internal/models/user.go:210
↓ 8 callers
Method
IsInstallClient
IsInstallClient reports whether the client belongs to an installed app.
internal/models/oauth.go:45
↓ 8 callers
Method
Key
Key is the position the cursor names.
internal/needs/cursor.go:161
↓ 8 callers
Method
LinkOAuthProvider
LinkOAuthProvider links provider to userID and, when subject is given, binds that provider account, in one transaction: a subject bound elsewhere link
internal/store/oauth_identities.go:138
↓ 8 callers
Method
ListCollections
--- Collections ---
internal/cli/client.go:292
↓ 8 callers
Method
ListConversations
ListConversations returns the member's inbox, with one batched read of the last messages; deleted previews remain tombstones (TASK-4038).
internal/store/conversations.go:737
↓ 8 callers
Method
ListDocumentActivityBeforeTime
ListDocumentActivityBeforeTime returns activities for a document created before the given time, ordered newest-first, limited to `limit` results. Used
internal/store/activities.go:994
↓ 8 callers
Method
ListPushDevices
ListPushDevices returns userID's devices, oldest first by updated_at.
internal/store/push_devices.go:177
↓ 8 callers
Method
ListWorkspaceInvitations
ListWorkspaceInvitations returns all invitations for a workspace.
internal/store/workspace_members.go:1536
↓ 8 callers
Method
ListWorkspaceMembers
ListWorkspaceMembers returns all members of a workspace, enriched with user name and email from a join.
internal/store/workspace_members.go:476
↓ 8 callers
Method
LookupEmailVerification
LookupEmailVerification performs a read-only validation of a verification token and returns the associated user WITHOUT consuming the token. Mirrors L
internal/store/email_verification.go:68
↓ 8 callers
Method
MaterializeFlush
MaterializeFlush writes a recovered body to items.content (TASK-2198 U4). CALLER CONTRACT: hold the collab per-item setup lock with no room open for
internal/store/materialize_flush.go:277
↓ 8 callers
Function
NewCloudClient
NewCloudClient constructs a client pointed at the given pad-cloud base URL (e.g. "http://pad-cloud:7778") authenticated with cloudSecret. Both values
internal/billing/cloud_client.go:76
↓ 8 callers
Function
NewGateway
NewGateway returns a Gateway with a client that does not follow redirects: the secret rides in a header, and a redirect would carry it to wherever the
internal/notify/gateway.go:74
↓ 8 callers
Function
NewInstrumentedBus
NewInstrumentedBus wraps an EventBus with Prometheus instrumentation.
internal/metrics/instrumented_bus.go:25
↓ 8 callers
Function
NewOfferCache
NewOfferCache returns a cache that reports unavailable until its first successful Refresh.
internal/billing/offer.go:147
↓ 8 callers
Function
NewPostgres
NewPostgres creates a Store backed by PostgreSQL. The connStr should be a PostgreSQL connection string (e.g. "postgres://user:pass@host/db").
internal/store/store.go:630
↓ 8 callers
Function
NewRedisBusWithReplaySize
NewRedisBusWithReplaySize is NewRedisBus with a custom replay capacity (tests use a small one, exactly like NewWithReplaySize).
internal/watchevents/redis_bus.go:447
↓ 8 callers
Function
ParseChatTarget
ParseChatTarget accepts an owner-scoped conversation number (C12 or 12) or a DM agent key (@name). Chat never resolves against a workspace.
internal/cli/chat.go:13
↓ 8 callers
Method
Query
(string, ...any)
internal/models/schedule_links.go:8
↓ 8 callers
Method
Read
(p []byte)
internal/appfetch/poster_test.go:127
↓ 8 callers
Method
RecordDelivery
RecordDelivery stores status for (eventID, webhookID), adding attempts requests actually sent (a refusal or a rate-limited deferral sends none). A ter
internal/store/webhook_deliveries.go:58
↓ 8 callers
Method
Refresh
Refresh fetches once and returns how long to wait before the next fetch.
internal/billing/offer.go:165
↓ 8 callers
Function
RefreshMarkerPath
RefreshMarkerPath is where the marker lives for this config: the DataDir the PID file is in. The script resolves the same directory by the same rule (
internal/cli/refresh_marker.go:45
↓ 8 callers
Function
RelationKeysPresent
RelationKeysPresent snapshots which relation keys a field map holds, for callers that must tell "this value was here before validation" from "this val
internal/store/relation_referents.go:1625
↓ 8 callers
Function
RequiredRelationIssues
RequiredRelationIssues returns the subset of issues whose field the schema declares REQUIRED. A dropped value in a required relation field cannot be
internal/store/relation_referents.go:710
↓ 8 callers
Method
ReservePendingInstall
ReservePendingInstall takes a reservation for an install the owner is about to fetch, or refuses with ErrPendingLimit. No fetch may begin without one.
internal/store/app_pending.go:94
↓ 8 callers
Function
ResolveAttachmentReferences
ResolveAttachmentReferences scans `markdown` for `pad-attachment:UUID` references in standard markdown image/link syntax and replaces each with render
internal/server/render/attachments.go:394
↓ 8 callers
Method
RevokeUserOAuthConnection
RevokeUserOAuthConnection invalidates every token in the OAuth grant chain identified by requestID, after verifying the chain belongs to userID. Impl
internal/store/connected_apps.go:294
↓ 8 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
internal/mcp/dispatch_http_advanced_test.go:909
↓ 8 callers
Method
SetHTTPClient
SetHTTPClient sets the HTTP client used for API requests. Configure it before use.
internal/cli/client.go:143
↓ 8 callers
Function
Shorthand
Shorthand returns the rule for a cadence name such as "weekdays". The name is trimmed and case-insensitive.
internal/schedule/shorthand.go:21
↓ 8 callers
Method
Status
Status returns the cached probe result.
internal/server/redis_health.go:251
↓ 8 callers
Method
SubscriberCount
SubscriberCount returns the number of active subscribers for the given item. Useful for room-manager TTL accounting (TASK-1255 — when the count hits 0
internal/collab/bus.go:132
↓ 8 callers
Method
UpdateItemWithPreCheck
(string, models.ItemUpdate, C, ...store.MutationOption)
internal/appstore/testdata/genericnested/x.go:13
↓ 8 callers
Method
UpdateWorkspaceMemberRole
UpdateWorkspaceMemberRole changes a member's role in a workspace.
internal/store/workspace_members.go:984
↓ 8 callers
Function
ValidateItemTitle
ValidateItemTitle checks an ALREADY-NORMALIZED item title at write time. Returns a message suitable for a 400 response, or "" when acceptable. Caller
internal/models/item.go:2180
↓ 8 callers
Function
ackHTTPFixture
(t *testing.T)
internal/server/schedule_ack_test.go:17
↓ 8 callers
Function
actAs
(context: BrowserContext, account: WalkAccount)
web/e2e/lib/permission-walk.ts:267
↓ 8 callers
Method
add
add inserts an attachment row of size bytes through the limited door. bound=false leaves it unattached (the `upload -` shape).
internal/store/task3619_storage_limit_test.go:64
↓ 8 callers
Function
addPadEntryTOML
--- TOML config path -------------------------------------------- Codex nests its MCP servers in a TOML `[mcp_servers.pad]` table, so the JSON reader
internal/mcp/install.go:409
↓ 8 callers
Method
advance
(d time.Duration)
internal/watchevents/heartbeat_test.go:31
↓ 8 callers
Function
agentNameFixture
TASK-2760. A comment's agent name lives on the `commented` activity its activity_id points at, and nowhere else; the list queries LEFT JOIN it on so e
internal/store/comments_agent_name_test.go:16
↓ 8 callers
Function
agentNameFromRequest
agentNameFromRequest is the X-Pad-Agent header as stored for the caller's writes and presence. This is a self-description, never a verified identity.
internal/server/agent_name.go:11
↓ 8 callers
Method
appendAgendaWork
(run *agendaRead, workspaceID string, scope store.PendingReminderScope)
internal/server/agenda_work.go:49
↓ 8 callers
Method
archived
archived creates n items and archives them, unlimited, through the store.
internal/server/handlers_restore_plan_limit_test.go:40
↓ 8 callers
Function
armStatePath
armStatePath returns the on-disk path for this session's arm-state file, creating ~/.pad/sessions if needed.
internal/cli/session_arm_state.go:174
↓ 8 callers
Function
assertBlocked
assertBlocked asserts the response is a 403 email_not_verified.
internal/server/middleware_verified_email_test.go:154
↓ 8 callers
Function
assertMoveArm
(t *testing.T, f *schedFixture, sc *models.ItemSchedule, want string)
internal/store/commitment_move_test.go:34
↓ 8 callers
Function
assertNoWatchEventForRef
assertNoWatchEvent drains ch for `d` and fails if a "notification" event with the given item_ref shows up — used to assert an unwatched item's mutatio
internal/server/handlers_watch_events_test.go:130
↓ 8 callers
Function
assertRestoreSQLiteTuple
(t *testing.T, path string, want map[string][]byte)
cmd/pad/cmd_db_restore_test.go:131
↓ 8 callers
Function
audit
(files map[string]string, parity, allow map[string]string, pgPackages map[string]bool, pgAllow map[string]stri
scripts/ci-web-census/main.go:154
↓ 8 callers
Function
auditUser
auditUser creates a user that subsequent audit rows can FK-reference. The schema requires user_id REFERENCES users(id), so we can't insert audit rows
internal/store/mcp_audit_test.go:39
↓ 8 callers
Method
before
(other *sessionActivityTimestamp)
internal/server/session_activity.go:43
↓ 8 callers
Function
boardJSON
(t *testing.T, r *CallToolResult)
internal/mcp/board_test.go:72
↓ 8 callers
Function
boundItemID
(t *testing.T, srv *Server, id string)
internal/server/handlers_attachments_attach_test.go:67
↓ 8 callers
Function
bracketOffsets
bracketOffsets returns the byte offset of every `[[` that has a matching `]]` after it, scanning the way the parser does.
internal/links/rewrite_brackets_diff_test.go:470
↓ 8 callers
Function
bug3331Setup
(t *testing.T)
internal/server/bug3331_search_scope_test.go:37
↓ 8 callers
Function
bug3825Export
BUG-3825: ImportWorkspace inserted each archive item's fields as they were, and nothing checked unique_scope: workspace_collection. A duplicate can on
internal/store/bug3825_import_unique_values_test.go:18
↓ 8 callers
Function
buildFositeRequest
buildFositeRequest produces a fully-populated *fosite.Request so adapter tests can drive Create*Session methods without depending on fosite's HTTP ent
internal/oauth/server_test.go:942
↓ 8 callers
Function
buildToolFromDef
buildToolFromDef compiles a ToolDef into the mcp.Tool shape mcp-go expects. The schema is flat: `action` is required, every other parameter is optiona
internal/mcp/catalog.go:355
↓ 8 callers
Function
canPromptForConfig
()
cmd/pad/configure.go:358
↓ 8 callers
Function
canSee
(id: string, collection: string)
web/src/lib/stores/localIndexMovedOutFloor.svelte.test.ts:68
↓ 8 callers
Method
challengeFor
challengeFor runs oauth-login from remote and returns the 2FA challenge.
internal/server/task4137_pkce_twofactor_test.go:74
↓ 8 callers
Function
chatCount
(t *testing.T, s *Store, convID string)
internal/store/conversations_test.go:40
↓ 8 callers
Function
childState
(child: Item, collection: Collection | undefined)
web/src/lib/collections/childProgress.ts:46
← previous
next →
1,801–1,900 of 28,840, ranked by callers