Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
31,685 in github.com/PerpetualSoftware/pad
⨍
Functions
31,685
◇
Types & classes
3,533
↓ 7 callers
Method
AsPlanLimit
AsPlanLimit returns the parsed plan-limit details when this APIError carries them, or nil otherwise. Returns nil for any error other than "plan_limit_
internal/cli/client.go:3206
↓ 7 callers
Function
AttentionSet
AttentionSet returns the `attention` question set.
internal/decision/attention.go:53
↓ 7 callers
Function
BuildMetaPayload
BuildMetaPayload returns the meta payload for the given pad runtime version. An empty version falls back to FallbackVersion, as serverInfo.version doe
internal/mcp/meta.go:53
↓ 7 callers
Function
BuiltinStateOf
BuiltinStateOf compares an item with the built-in it was made from. It returns the state, the item's hash over the LIBRARY's update fields, and the en
internal/collections/builtin.go:302
↓ 7 callers
Method
CheckSession
CheckSession returns the current auth status.
internal/cli/client.go:2627
↓ 7 callers
Function
CommitmentBody
CommitmentBody translates flags to native roles using the former create mapping: hard has a zero deadline offset, soft/check only a target, window an
internal/schedule/commitment_flags.go:24
↓ 7 callers
Method
CompactedResumeCovers
CompactedResumeCovers reports whether a resume cursor is inside the item's compaction snapshot, which still exists (TASK-3531): such a tab is admitted
internal/collab/room.go:344
↓ 7 callers
Function
CompressResponses
CompressResponses gzips (or deflates) what the client accepts, except what compressSkips names.
internal/server/middleware_compress.go:91
↓ 7 callers
Method
ConfigureDecisions
ConfigureDecisions resolves the provider from every source, swaps the runner, and starts the tick if a provider is now configured. The returned error
internal/server/decision_settings.go:66
↓ 7 callers
Method
ConsumeTOTPStep
ConsumeTOTPStep atomically records a TOTP time-step as consumed, enforcing single-use semantics for login codes (BUG-2054). It succeeds only if step i
internal/store/users.go:2237
↓ 7 callers
Function
ConvertOpenAPI
ConvertOpenAPI converts an OpenAPI 3.x specification into a human-readable markdown document. The output is organized as: - H1 with the API title - I
internal/urlimport/openapi.go:30
↓ 7 callers
Method
CopyItemPreflight
CopyItemPreflight runs the DRY RUN. It mutates nothing in the copy's own domain, so it is safe to call repeatedly and safe to retry. Returns the deco
internal/cli/client_items_copy.go:320
↓ 7 callers
Method
CountLocked
CountLocked is the number of uploads holding hash. The caller holds Lock.
internal/attachments/inflight.go:61
↓ 7 callers
Method
CreateSessionFenced
CreateSessionFenced is CreateSessionIssuedAt for a sign-in: it mints only if the account's credential_epoch still equals epoch, the value read when th
internal/store/sessions.go:218
↓ 7 callers
Method
CreateView
CreateView adds a new saved view.
internal/store/views.go:11
↓ 7 callers
Method
CreateWorkspaceGroup
(ctx context.Context, userID, name string, ids []string)
internal/store/workspace_groups.go:200
↓ 7 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:333
↓ 7 callers
Method
DeleteItemGrant
DeleteItemGrant revokes an item grant by ID, scoped to a workspace. When it was the grantee's last access to the workspace, their workspace tab goes
internal/store/grants.go:208
↓ 7 callers
Method
DeleteUserAPIToken
DeleteUserAPIToken removes an API token by ID, verifying it belongs to the user.
internal/store/api_tokens.go:288
↓ 7 callers
Function
DerivePrefix
DerivePrefix generates a short uppercase prefix from a collection name. Single word: first 3-5 letters, removing trailing "s" for plurals Multi-word:
internal/collections/prefix.go:63
↓ 7 callers
Function
DisplayLocation
DisplayLocation returns the viewer's zone, never the machine's local zone.
internal/cli/zone.go:14
↓ 7 callers
Function
DropBlankRelations
DropBlankRelations deletes the blank scalar relation keys for which keep is false (every one when keep is nil) and returns the keys it deleted.
internal/items/relation_blanks.go:47
↓ 7 callers
Method
EnableUser
EnableUser re-enables a disabled user account by clearing disabled_at.
internal/store/users.go:1422
↓ 7 callers
Function
EnsureBootstrapToken
EnsureBootstrapToken generates a fresh first-run bootstrap token (or loads the existing one if a valid file is already present). Returns the token str
internal/server/bootstrap.go:67
↓ 7 callers
Function
EnsureStructuredEntryIDs
EnsureStructuredEntryIDs gives every implementation note and decision-log entry a PERSISTED id that nothing else in the blob claims (BUG-2788). An en
internal/models/structured_entry_ids.go:105
↓ 7 callers
Method
Get
Get returns the current session workspace, or empty string when none has been set.
internal/mcp/workspace.go:72
↓ 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
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:3011
↓ 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
Install
Install wires the runner's registry into the store's write doors. With a nil runner it removes any resolver, so the doors enqueue nothing.
internal/decision/runner.go:440
↓ 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
Method
ListAgentRoles
(workspaceID string)
internal/store/agent_roles.go:72
↓ 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
Method
ListScheduleLinks
ListScheduleLinks returns the links touching itemID whose BOTH ends the caller can read. A link with an unreadable other end is absent: the item shows
internal/store/commitment_links.go:913
↓ 7 callers
Method
ListUserAPITokens
ListUserAPITokens returns all API tokens owned by a user (without secrets).
internal/store/api_tokens.go:248
↓ 7 callers
Method
ListUserActivity
ListUserActivity returns activities originated by the given user, in reverse-chronological order. Powers the Activity tab of the admin user modal (T15
internal/store/activities.go:789
↓ 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:422
↓ 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
Marker
()
internal/store/redact_match.go:62
↓ 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:6263
↓ 7 callers
Method
NeedsCandidateItems
NeedsCandidateItems returns the live items in scope that are router candidates: in a live, non-system collection, and an ask (an awaits_human collecti
internal/store/needs_read.go:170
↓ 7 callers
Function
New
New loads the bundle into a fresh goja runtime and builds the headless editor once, so the cost of that lands here and not in the first job.
internal/materialize/materialize.go:108
↓ 7 callers
Function
NewClientRegistry
NewClientRegistry returns an empty registry.
internal/mcp/client_identity.go:74
↓ 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
NewRateLimiters
NewRateLimiters creates rate limiters with sensible defaults.
internal/server/middleware_ratelimit.go:476
↓ 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:997
↓ 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
PositiveTerminalValuesForDoneField
PositiveTerminalValuesForDoneField is TerminalValuesForDoneField minus the values that close WITHOUT delivering — the values that count as completed *
internal/models/terminal.go:153
↓ 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
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
Query
(query string, args ...any)
internal/store/activities.go:343
↓ 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
RenewSessionIfStale
RenewSessionIfStale implements sliding-window expiration. When a session is past its renewal threshold (less than half its renewal window remaining) i
internal/store/sessions.go:479
↓ 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:1292
↓ 7 callers
Method
ResolveChatTarget
(target string, ensure bool)
internal/cli/client.go:4170
↓ 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:141
↓ 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:296
↓ 7 callers
Function
SessionsDir
SessionsDir returns ~/.pad/sessions, creating it if it doesn't exist.
internal/cli/session_registry.go:130
↓ 7 callers
Method
SetExportMetadataMaxBytes
100 MiB SetExportMetadataMaxBytes overrides the shared metadata cap on workspace exports and imports. Values <= 0 fall back to defaultExportMetadataMa
internal/server/export_metadata_limit.go:13
↓ 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:1425
↓ 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:2835
↓ 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:187
↓ 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
ToItemSummaries
ToItemSummaries projects a slice of items into summary shape, preserving order. A nil input yields a non-nil empty slice so the JSON encodes as `[]`.
internal/cli/item_summary.go:243
↓ 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
UniqueFieldConflictsQ
UniqueFieldConflictsQ returns the keys of fields declaring `unique_scope: workspace_collection` whose value in fields is already held by another live
internal/store/unique_fields.go:35
↓ 7 callers
Method
UpdateWorkspaceTab
UpdateWorkspaceTab applies u to the user's tab for workspaceID. It returns sql.ErrNoRows when that workspace is not open.
internal/store/workspace_tabs.go:355
↓ 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
Function
ValidateFieldsWithDrops
ValidateFieldsWithDrops is ValidateFields plus the discarded-default list (BUG-3079). For a door that has a `warnings.dropped_fields` channel; a door
internal/items/validate.go:90
↓ 7 callers
Function
WaitingOn
WaitingOn applies the rules in strict, exclusive order and returns what the item is waiting on. It reads no store; elig is the only question it asks.
internal/needs/needs.go:170
↓ 7 callers
Function
WithMCPTokenIdentity
WithMCPTokenIdentity stashes the bearer-token identity so the MCP audit middleware can record which connection drove the call. kind is the discrimina
internal/server/context.go:183
↓ 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:1961
↓ 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:3227
↓ 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
← previous
next →
2,301–2,400 of 31,685, ranked by callers