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
↓ 2 callers
Function
CallNeedsWriteScope
CallNeedsWriteScope reports whether a remote /mcp tools/call of (toolName, action) is a WRITE: an action the catalog declares that is not in readOnlyA
internal/mcp/tool_surface.go:240
↓ 2 callers
Function
CanonicalTraitsIfDuplicated
CanonicalTraitsIfDuplicated returns raw unchanged unless some object in it repeats a member name, in which case it returns the parsed declaration's ow
internal/models/collection.go:160
↓ 2 callers
Function
CapturePeerAddr
CapturePeerAddr must be installed BEFORE TrustedProxyRealIP in the chain. It snapshots the real TCP peer RemoteAddr into the request context so authen
internal/server/middleware_realip.go:22
↓ 2 callers
Function
CarryAwaitsHuman
CarryAwaitsHuman returns newSettingsJSON with the stored `awaits_human` value carried over when the new settings do not mention the key. Settings are
internal/models/awaits_human.go:36
↓ 2 callers
Function
CarryTracksWork
CarryTracksWork returns newSettingsJSON with the stored `tracks_work` value carried over when the new settings do not mention the key (PLAN-3535). Set
internal/models/tracks_work.go:109
↓ 2 callers
Method
CatchUpItemLines
CatchUpItemLines renders the given items as section lines, limited to scope, in the order given. Ids that are deleted, invisible or unknown are droppe
internal/store/catch_up.go:463
↓ 2 callers
Method
ChatConversationContext
ChatConversationContext allows the monitor's floor GET to share its deadline with identity resolution, including reading the response body.
internal/cli/client.go:3675
↓ 2 callers
Method
ChatMessagesContext
ChatMessagesContext bounds gap fills, including reading the response body.
internal/cli/client.go:3712
↓ 2 callers
Method
ChatUnreadContext
ChatUnreadContext shares the summary deadline with identity resolution.
internal/cli/client.go:3697
↓ 2 callers
Method
CheckAdditiveFieldsQ
CheckAdditiveFieldsQ refuses an additive field that is not safe for the collection's EXISTING items, decided against the current data: a key the schem
internal/store/app_upgrade.go:387
↓ 2 callers
Function
CheckGateAdd
CheckGateAdd refuses self-gates and cycles.
internal/schedule/links.go:515
↓ 2 callers
Function
CheckSettingsObject
CheckSettingsObject refuses a settings value that is not a JSON object, wrapping ErrSettingsNotObject. "" is the empty sentinel the store writes as "{
internal/models/awaits_human.go:121
↓ 2 callers
Method
CheckStorageLimit
CheckStorageLimit refuses adding bytes that would take the workspace owner past their storage_bytes limit (BUG-3653), under the lock BeginFenced took
internal/store/fenced_attachments.go:206
↓ 2 callers
Function
ChoiceValue
ChoiceValue reads a stored Choice answer: the option it picked and the probability of that option (0 when the answer carries no distribution).
internal/decision/effort_read.go:39
↓ 2 callers
Method
CleanExpiredEmailVerifications
CleanExpiredEmailVerifications removes expired or already-used verification tokens. Mirrors CleanExpiredPasswordResets; run by the periodic token reap
internal/store/email_verification.go:185
↓ 2 callers
Method
CleanExpiredStepUpCodes
CleanExpiredStepUpCodes preserves the full send-limit window, including used codes, before removing old rows.
internal/store/step_up.go:126
↓ 2 callers
Function
CleanupStaleBootstrapToken
CleanupStaleBootstrapToken removes a token file left behind by a previous run that completed bootstrap but failed to delete the file. Called at startu
internal/server/bootstrap.go:132
↓ 2 callers
Method
ClearParentLink
ClearParentLink removes the parent link for an item. Runs in a tx and acquires `pad:parent-children:<old>` before the DELETE so a concurrent UpdateIt
internal/store/items.go:4835
↓ 2 callers
Method
Close
()
internal/store/store.go:656
↓ 2 callers
Method
Close
Close stops the receive loop, closes the Redis subscription, and closes every subscriber channel. The `closed` flag exists because this bus, unlike M
internal/watchevents/redis_bus.go:1161
↓ 2 callers
Function
CollapseReorderBatches
CollapseReorderBatches folds each run of consecutive "reordered" rows that share a reorder_batch into its first row, counting the run (TASK-3517). A r
internal/cli/activity_reorder.go:23
↓ 2 callers
Method
CollectionFieldUsage
CollectionFieldUsage scans the live (not soft-deleted) items of one collection. Every key present in a blob is counted, declared or not, so a field re
internal/store/field_usage.go:37
↓ 2 callers
Method
CollectionNotFoundIsAuthoritative
CollectionNotFoundIsAuthoritative reports whether a collection-not-found from this server should be TRUSTED — i.e. the alias retry in WithCollectionAl
internal/cli/client.go:559
↓ 2 callers
Method
CollectionSlugOwnersQ
CollectionSlugOwnersQ is CollectionSlugOwners on a caller-supplied executor.
internal/store/app_pending.go:313
↓ 2 callers
Function
CommentBodyForDisplay
PrintCommentTable prints comments in a formatted table. PrintCommentTable deliberately does NOT render Comment.AgentName (TASK-2760). The name is self
internal/cli/format.go:684
↓ 2 callers
Method
CompleteStripeEvent
CompleteStripeEvent marks a claimed event done after its handler succeeded (BUG-3561). It acts only on the row still carrying the claim's token, so a
internal/store/stripe_events.go:120
↓ 2 callers
Method
Configure
Configure updates the sender's settings at runtime (e.g. when an admin changes platform settings). Thread-safe.
internal/email/sender.go:49
↓ 2 callers
Method
ConsumeRecoveryCode
ConsumeRecoveryCode validates and removes a single recovery code. Recovery codes are stored as SHA-256 hashes. The provided plaintext code is hashed b
internal/store/users.go:2098
↓ 2 callers
Method
ContentSetAsideRows
ContentSetAsideRows reads details.set_aside_rows from a content_pending_flush refusal: how many set-aside edit rows caused it. Zero when the refusal w
internal/cli/client.go:2734
↓ 2 callers
Function
ConventionsCommentsSet
ConventionsCommentsSet returns the `conventions_comments` question set: ConventionsSet's questions, asked about each of the item's recent comments wit
internal/decision/conventions.go:88
↓ 2 callers
Function
ConventionsSet
ConventionsSet returns the `conventions` question set.
internal/decision/conventions.go:63
↓ 2 callers
Method
CountAttachmentsForStorageKeyOutsideWorkspaceContext
CountAttachmentsForStorageKeyOutsideWorkspaceContext is the same count bounded by ctx, for the caller that runs it under the in-flight lock (TASK-4279
internal/store/workspace_purge.go:142
↓ 2 callers
Method
CountClaimableDecisionJobs
CountClaimableDecisionJobs counts the set's jobs for itemIDs that ClaimDecisionJobs could take RIGHT NOW at `now`: the very decisionJobClaimable predi
internal/store/decisions.go:448
↓ 2 callers
Method
CountMCPUsablePATs
CountMCPUsablePATs counts personal access tokens that /mcp would accept. It applies the same three rules the request path does, in the same way: MCPBe
internal/store/mcp_resume.go:46
↓ 2 callers
Method
CountWorkspaceContents
CountWorkspaceContents counts a workspace's contents for the post-import check. Each count is its own statement: an import has finished writing by the
internal/store/workspace_counts.go:27
↓ 2 callers
Method
CountYjsSetAsideTx
CountYjsSetAsideTx counts the item's set-aside rows inside tx.
internal/store/yjs_set_aside.go:174
↓ 2 callers
Method
CreateAuthorizeCodeSession
===================================================================== AuthorizeCodeStorage ===========================================================
internal/oauth/storage.go:185
↓ 2 callers
Method
CreateCLIAuthSession
CreateCLIAuthSession creates a new pending CLI auth session.
internal/cli/client.go:2297
↓ 2 callers
Method
CreateCommentWrite
CreateCommentWrite is CreateComment with the item and actor display. An empty Author is filled with the actor's display name, read in the transaction.
internal/appstore/comments.go:53
↓ 2 callers
Method
CreateItemReminder
CreateItemReminder arms a reminder. remindAt must be an RFC3339 instant — the server refuses a bare date rather than assuming a time of day, and the C
internal/cli/client.go:3584
↓ 2 callers
Method
CreateItemWrite
CreateItemWrite is CreateItem with the response view.
internal/appstore/items.go:66
↓ 2 callers
Method
CreateRefreshTokenSession
===================================================================== RefreshTokenStorage ============================================================
internal/oauth/storage.go:335
↓ 2 callers
Method
CreateReminderWithReuse
CreateReminderWithReuse also reports whether the write rearmed an existing ended commitment, as determined under the same locks as the write.
internal/store/reminders.go:152
↓ 2 callers
Function
CredentialsPath
CredentialsPath returns ~/.pad/credentials.json.
internal/cli/credentials.go:80
↓ 2 callers
Method
DTStart
DTStart sets dtstart property for set. It will be truncated to second precision.
internal/schedule/internal/rrule/rruleset.go:44
↓ 2 callers
Function
DecodeCursor
DecodeCursor parses a token and checks it was minted for this sort, view and workspace filter. Anything else is ErrInvalidCursor.
internal/needs/cursor.go:174
↓ 2 callers
Function
DefaultLifespans
DefaultLifespans is Lifespans with every default applied.
internal/oauth/server.go:84
↓ 2 callers
Function
DefaultTracksWork
DefaultTracksWork is the value a NEW collection gets when its creator did not say: a system collection (Conventions, Playbooks) is reference; any othe
internal/models/tracks_work.go:48
↓ 2 callers
Method
DeleteAccessToken
DeleteAccessToken removes a row entirely (fosite uses Delete after successful exchange to prevent reuse). Distinct from RevokeAccessToken which preser
internal/store/oauth.go:353
↓ 2 callers
Method
DeleteCollection
DeleteCollection soft-deletes a collection by setting collections.deleted_at. Items in the collection are NOT cascaded; they remain in the database wi
internal/cli/client.go:319
↓ 2 callers
Method
DeleteComment
DeleteComment removes a comment through the item-scoped route (TASK-2695).
internal/cli/client.go:1212
↓ 2 callers
Method
DeleteOAuthClient
DeleteOAuthClient removes a client AND every dependent row (auth codes, access tokens, refresh tokens, PKCE sessions) atomically. Why explicit cascad
internal/store/oauth.go:225
↓ 2 callers
Method
DeletePKCERequest
DeletePKCERequest removes the row after a successful /token exchange (fosite's lifecycle for PKCE is delete-on-use, unlike auth codes which are flagge
internal/store/oauth.go:662
↓ 2 callers
Method
DeletePlatformSetting
DeletePlatformSetting removes a platform setting.
internal/store/platform_settings.go:54
↓ 2 callers
Method
DeletePushDevice
DeletePushDevice removes the device bound to this session under this connection id. Absent is not an error: the call is idempotent.
internal/store/push_devices.go:168
↓ 2 callers
Method
DeleteSessionIfExists
DeleteSessionIfExists destroys a session by plaintext token and reports whether a row was actually deleted. Used by the IP-change strict-mode path as
internal/store/sessions.go:456
↓ 2 callers
Method
DeleteShareLink
DeleteShareLink deletes a share link by ID, scoped to a workspace.
internal/store/share_links.go:237
↓ 2 callers
Method
DeleteWorkspaceGroup
(ctx context.Context, userID, id string)
internal/store/workspace_groups.go:288
↓ 2 callers
Function
DeliveryTerminal
DeliveryTerminal reports whether a status ends the endpoint's part.
internal/store/webhook_deliveries.go:29
↓ 2 callers
Method
DenyCLIAuthSession
DenyCLIAuthSession refuses a pending session (TASK-2253): the person shown the approval page did not ask for it. Only pending -> denied; the row stays
internal/store/cli_auth_sessions.go:213
↓ 2 callers
Method
DeriveServerKey
DeriveServerKey derives a 32-byte server-only key for one purpose from the deployment encryption key (HKDF-SHA256, the label as info). Every supported
internal/store/encryption.go:304
↓ 2 callers
Method
Details
Details is the structured half of the refusal: the field to set and the values it takes, so a client builds its retry from data rather than from the s
internal/models/close_state.go:118
↓ 2 callers
Function
DiagnoseVersionTies
DiagnoseVersionTies reads every item that has same-second versions and classifies each tie group (see VersionTieReport). It only reads, in one read-on
internal/store/version_tie_diagnostic.go:122
↓ 2 callers
Function
DiagnoseVersionTiesAt
DiagnoseVersionTiesAt opens the database at dsn WITHOUT running migrations, runs DiagnoseVersionTies and closes it, so an operator can measure a produ
internal/store/version_tie_diagnostic.go:465
↓ 2 callers
Method
DiscardYjsSetAside
DiscardYjsSetAside is DeleteYjsSetAsideTx in its own transaction, for the explicit discard door, which writes nothing else.
internal/store/yjs_set_aside.go:206
↓ 2 callers
Method
Dispatch
Dispatch is the helper most fan-out actions use. Looks up cmdInfo in env.Doc, builds CLI args, attaches the dispatch input to ctx, forwards to env.Dis
internal/mcp/catalog.go:157
↓ 2 callers
Function
DispatchInputFromContext
DispatchInputFromContext returns the original MCP tool-call JSON input attached by WithDispatchInput, or nil if none. Safe to call on any context.
internal/mcp/dispatch.go:65
↓ 2 callers
Method
DownloadAttachment
DownloadAttachment streams the bytes of an attachment into w. Returns the Content-Type the server set and the number of bytes copied so callers can ve
internal/cli/client.go:2984
↓ 2 callers
Function
EffortLevel
EffortLevel reads a stored effort answer: the level it picked, 0-3, by the argmax of its probabilities (Answer.TopLevel), never by truncating the mean
internal/decision/effort_read.go:22
↓ 2 callers
Method
Eligible
(userID, collectionID, itemID string)
internal/needs/needs.go:66
↓ 2 callers
Function
EmitMarkdown
EmitMarkdown walks the command tree below `target`, builds a cmdhelp v0.1 Document, and writes it to w as a markdown document with the predictable sec
internal/cmdhelp/md.go:21
↓ 2 callers
Method
Ended
Ended reports whether the schedule has no outstanding occurrence.
internal/store/schedule_resolve.go:61
↓ 2 callers
Method
EnqueueLinkedDeadlineApprovalNotice
EnqueueLinkedDeadlineApprovalNotice re-plans a refused move after its caller has rolled back. Fresh permissions and the graph decide whether the same
internal/store/commitment_notices.go:121
↓ 2 callers
Method
EnqueueRenegotiationRefusedNotification
EnqueueRenegotiationRefusedNotification tells the current assignee about a refused attempt on an item with a live native deadline, once per item, acti
internal/store/notifications.go:157
↓ 2 callers
Method
EnsureAppItemActions
EnsureAppItemActions writes the action rows an already-installed manifest declares (the backfill). Under the install row lock it re-checks the state,
internal/store/app_item_actions.go:518
↓ 2 callers
Method
EnsureAppWebhooks
EnsureAppWebhooks backfills the hook of every active or inactive install provisioned before U10 whose manifest declares one. Each is created HELD: the
internal/server/app_webhooks.go:135
↓ 2 callers
Method
Error
()
internal/store/schedules.go:77
↓ 2 callers
Method
Error
()
internal/store/attachments_remap.go:78
↓ 2 callers
Method
Error
()
internal/server/handlers_apps_install.go:167
↓ 2 callers
Method
Error
()
internal/models/repeated_member.go:27
↓ 2 callers
Method
EvaluateCommitmentGates
EvaluateCommitmentGates advances a deterministic cursor across pending gates. Pending gates keep their place behind the cursor until the next complete
internal/store/commitment_gates.go:689
↓ 2 callers
Function
EvaluateGates
EvaluateGates requires every blocker to succeed; unknown outcomes remain pending.
internal/schedule/links.go:496
↓ 2 callers
Method
ExDate
ExDate include the given datetime instance in the recurrence set exclusion list. Dates included that way will not be generated, even if some inclusive
internal/schedule/internal/rrule/rruleset.go:97
↓ 2 callers
Method
Expand
Expand pairs equal keys, applying per-occurrence offsets and reporting unmatched keys.
internal/schedule/links.go:418
↓ 2 callers
Method
ExportWorkspaceQ
ExportWorkspaceQ is ExportWorkspace against a caller-supplied executor, so every section of a bundle can be read inside one transaction (BUG-3072). W
internal/store/export.go:270
↓ 2 callers
Function
F
()
web/e2e/permission-walk-move.spec.ts:80
↓ 2 callers
Method
Fetch
Fetch translates the fixed CLI-shaped arg vectors that resources.go emits into an in-process HTTP read and returns the response text as the resource h
internal/mcp/resources_http.go:64
↓ 2 callers
Method
FetchBytes
FetchBytes runs the same pad subprocess as Fetch but preserves stdout as bytes for binary MCP resources. It caps how much output it retains so a missi
internal/mcp/resources.go:80
↓ 2 callers
Function
FindAndCompileSchema
FindAndCompileSchema locates and compiles the cmdhelp v0.1 JSON Schema by walking up from `startDir` until it finds a directory containing `schema/cmd
internal/cmdhelp/schema.go:24
↓ 2 callers
Function
FindByInvocationField
FindByInvocationField returns the collections that route by invocation slug — those declaring the invocation_field trait, in the supplied order.
internal/collections/traits.go:68
↓ 2 callers
Function
FindGateCycle
FindGateCycle returns a closed cycle, or nil, using iterative traversal.
internal/schedule/links.go:531
↓ 2 callers
Function
Fingerprint
Fingerprint formats the first 16 bytes of SHA-256 of the raw public key.
internal/serveridentity/identity.go:28
↓ 2 callers
Function
FoldBulkHeader
FoldBulkHeader returns the wire payload for a folded batch: the stored header enriched with the member snapshots the drain claimed alongside it. The
internal/store/event_outbox.go:2425
↓ 2 callers
Function
FormatAttachmentSize
FormatAttachmentSize returns a human-readable byte count ("832 B", "1.2 MB", "5 GB"). Negative sizes return "" — that's a corrupt-row signal, not some
internal/server/render/attachments.go:184
↓ 2 callers
Method
GetAgentRole
GetAgentRole gets a single agent role by ID or slug.
internal/cli/client.go:1881
↓ 2 callers
Method
GetAppTokenState
GetAppTokenState reads a token family's binding with its install and client, or nil when the family has no binding.
internal/store/install_clients.go:605
↓ 2 callers
Method
GetAuthorizeCodeSession
GetAuthorizeCodeSession hydrates the session for an auth code. The caller supplies an empty fosite.Session (typically &Session{}); we JSON-unmarshal t
internal/oauth/storage.go:241
↓ 2 callers
Method
GetBacklinks
GetBacklinks fetches the items that contain a `[[<itemRef>]]` reference to the queried item. Phase 1 returns ref-form backlinks only — title and cross
internal/cli/client.go:1159
↓ 2 callers
Method
GetBillingConfig
(ctx context.Context)
internal/billing/offer.go:124
↓ 2 callers
Method
GetChildItemsTx
GetChildItemsTx is the in-transaction variant of GetChildItems. The underlying query is the same as GetChildItems; using a *sql.Tx ties the read to th
internal/store/items.go:5571
← previous
next →
6,001–6,100 of 28,840, ranked by callers