MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 3 callersMethodGetNotificationForUser
GetNotificationForUser reads one of userID's notifications. Another user's id and a missing id are the same ErrNotificationNotFound.
internal/store/push_dispatch.go:430
↓ 3 callersMethodGetNotificationSettings
GetNotificationSettings returns userID's push settings, or the defaults when they have never saved any (TASK-3937). A missing row is not an error.
internal/store/notification_settings.go:13
↓ 3 callersMethodGetPKCERequest
GetPKCERequest hydrates the PKCE session. Returns ErrOAuthNotFound if the row is missing.
internal/store/oauth.go:654
↓ 3 callersMethodGetPlatformSettingQ
GetPlatformSettingQ is GetPlatformSetting parameterized over its executor (see Queryer).
internal/store/platform_settings.go:16
↓ 3 callersMethodGetReportLayout
Per-user Insights/report layout preferences (PLAN-1628 / TASK-1634). GetReportLayout returns the user's saved layout for a workspace, or nil when they
internal/store/report_layouts.go:15
↓ 3 callersMethodGetRoleBreakdown
GetRoleBreakdown returns item counts and assigned users grouped by agent role. Includes an entry for unassigned items (role_id = nil).
internal/store/agent_roles.go:180
↓ 3 callersMethodGetShareLinkByToken
GetShareLinkByToken looks up a share link by its raw token (hashes it first). A link whose workspace is soft-deleted is not found (BUG-3339): deleting
internal/store/share_links.go:168
↓ 3 callersMethodGetUserByStripeCustomerID
GetUserByStripeCustomerID retrieves a user by their Stripe customer ID. Returns nil if no user is found with the given customer ID.
internal/store/limits.go:806
↓ 3 callersMethodGetUserMetrics
GetUserMetrics computes the AdminUserMetrics bundle. Cheap by design: - days_since_write reads users.last_write_at directly (one row) - writes_7d is a
internal/store/users.go:1014
↓ 3 callersMethodGetUserWorkspaceMemberships
GetUserWorkspaceMemberships returns workspace memberships for admin user detail.
internal/store/workspace_members.go:1913
↓ 3 callersMethodGetUserWorkspacesQ
GetUserWorkspacesQ is GetUserWorkspaces against a caller-supplied executor (BUG-3632: the account export binds it to its deadline with WithContext).
internal/store/workspace_members.go:790
↓ 3 callersMethodGrantSessionStepUp
GrantSessionStepUp keeps an existing live grant at its original deadline. A replacement session starts with no grant, even after credential rotation.
internal/store/step_up.go:109
↓ 3 callersMethodGuestVisibleResourcesQ
GuestVisibleResourcesQ is GuestVisibleResources parameterized over its executor (see Queryer).
internal/store/grants.go:661
↓ 3 callersMethodHashErr
HashErr is Hash for text that did not come from this binary.
internal/collections/builtin.go:55
↓ 3 callersMethodHeldNotifications
HeldNotifications returns the subset of ids still pending under token: the dispatcher's check just before a Send that a row was not reclaimed, settled
internal/store/push_dispatch_settle.go:66
↓ 3 callersMethodImportArtifact
ImportArtifact POSTs the raw artifact bytes to the workspace import endpoint (POST /workspaces/{ws}/import-artifact) and decodes the {ref, slug, warni
internal/cli/client.go:1950
↓ 3 callersMethodIncludes
Includes reports whether the user is among the routed people.
internal/needs/needs.go:113
↓ 3 callersFunctionIntersectCollectionIDs
IntersectCollectionIDs narrows visible (nil = every collection) to ceiling, never returning nil.
internal/store/app_ceiling.go:136
↓ 3 callersMethodInvalidateAuthorizationCode
InvalidateAuthorizationCode marks a code inactive (single-use). Idempotent: invalidating an already-invalid or missing row is a no-op (fosite's contra
internal/store/oauth.go:309
↓ 3 callersFunctionIsAbandonedItem
IsAbandonedItem reports whether an item's done-field value is one of its collection's abandoned values. The IsTerminalItem shape, over the abandoned s
internal/models/terminal.go:189
↓ 3 callersFunctionIsBlankRelationValue
BUG-3028: a scalar `relation` field had three stored spellings of "no target" — the key absent, `""`, and whitespace-only — and `required` was enforce
internal/items/relation_blanks.go:24
↓ 3 callersMethodIsCloudServer
IsCloudServer reports whether THIS server process should run in cloud-tenant mode (enabling cloud-specific endpoints, requiring PAD_CLOUD_SECRET, wiri
internal/config/config.go:780
↓ 3 callersFunctionIsCommitmentRoute
IsCommitmentRoute identifies commitment API paths for the CLI and MCP error contracts. The escaped path may include /api/v1, a mount prefix before it
internal/cli/client_schedule.go:21
↓ 3 callersFunctionIsFullCommitSHA
IsFullCommitSHA reports whether s is a full 40-hex lowercase commit SHA.
internal/models/item.go:770
↓ 3 callersFunctionIsJSONNumberLiteral
IsJSONNumberLiteral reports whether s is exactly one JSON number token, the form json.Number marshals verbatim. The field-value coercions (the server'
internal/models/fields_json.go:126
↓ 3 callersFunctionIsNegativeTerminal
IsNegativeTerminal reports whether value is a non-shipping terminal.
internal/models/terminal.go:127
↓ 3 callersFunctionIsOpenOccurrenceState
(state string)
internal/models/schedule.go:126
↓ 3 callersFunctionIsPermissionDenied
IsPermissionDenied reports whether err is a server 403 refusing the caller: code forbidden or permission_denied, or an unverified Cloud email (BUG-386
internal/cli/client.go:3407
↓ 3 callersFunctionIsSafeFieldKey
IsSafeFieldKey is the one rule for a field name the item store will put into a JSON path: non-empty, and only letters, digits, underscore and hyphen (
internal/models/collection_traits.go:151
↓ 3 callersFunctionIsUIDismissalKey
IsUIDismissalKey reports whether key is in UIDismissalKeys or is a well-formed tz-mismatch pair key.
internal/models/ui_dismissals.go:48
↓ 3 callersFunctionIsUniqueViolation
IsUniqueViolation is the exported form of isUniqueViolation, for HTTP handlers that have to turn a store error into a 409 without re-implementing the
internal/store/items.go:725
↓ 3 callersMethodItem
Item reads a live item of this workspace in this transaction: the collection, ref and title a write publishes are the ones it wrote under, not an earl
internal/store/fenced_items.go:163
↓ 3 callersMethodItemRestoreBoundaryOpID
ItemRestoreBoundaryOpID returns items.restore_boundary_op_id — the DURABLE op-log-id restore boundary (BUG-2264), or (0, false) when the item has neve
internal/store/yjs_updates.go:460
↓ 3 callersMethodItemSeqChain
ItemSeqChain walks the item's stamped activity entries from toSeq back to fromSeq and returns them newest first, at most max. Complete is true only wh
internal/store/activity_seq_chain.go:25
↓ 3 callersMethodItemsCreatedViaApp
ItemsCreatedViaApp returns, for the items an app CREATED, that app (items.created_via_app, set once). The item JSON's via_app is the creator, agreed w
internal/store/app_attribution.go:78
↓ 3 callersMethodItemsModifiedSince
ItemsModifiedSince returns one page of the items in a workspace that were updated at or after the given timestamp. Used for incremental sync on tab re
internal/store/items.go:7063
↓ 3 callersMethodJSONArrayContains
JSONArrayContains returns SQL + the arg to check if a JSON array column contains a given text value, compared exactly (case and all). SQLite: a json_e
internal/store/dialect.go:144
↓ 3 callersFunctionKeyFor
KeyFor is the row's key under a sort.
internal/needs/cursor.go:66
↓ 3 callersMethodLatestItemDecisions
LatestItemDecisions returns the newest answer per (question_set, question_key) for an item, ordered by set then key. Current is left false; only the c
internal/store/decisions.go:793
↓ 3 callersMethodLatestWorkspaceDecisions
LatestWorkspaceDecisions returns the newest answer per (item, question_key) in one question set across a workspace — the dashboard's batch form of Lat
internal/store/decisions.go:842
↓ 3 callersFunctionLeaseCountdown
RelativeTime returns a human-readable relative time string. LeaseCountdown renders a lease expiry as a short human countdown ("expires in 12m"). Sub-m
internal/cli/format.go:112
↓ 3 callersFunctionLibraryPlaybookFields
LibraryPlaybookFields is the stored fields blob for an active item made from a library playbook. Every door that brings one in (template seed, library
internal/collections/templates.go:386
↓ 3 callersMethodListAllCollectionItems
ListAllCollectionItems is ListAllItems for one collection: it follows the server's next-offset until has-more is false (BUG-3793).
internal/cli/client.go:459
↓ 3 callersMethodListAllCollectionItemsReport
ListAllCollectionItemsReport is ListAllCollectionItems from startOffset, also returning the first page's UndeclaredKeys (BUG-4024).
internal/cli/client.go:466
↓ 3 callersMethodListArchivedCollections
TASK-2189: archiving a collection (DeleteCollection) is a soft delete of the collection row; its items are untouched and only hidden by that row's del
internal/store/collections_archive.go:22
↓ 3 callersMethodListChildItems
ListChildItems is GetChildItems with the caller's visibility applied in the query and an optional window over it (BUG-3789). Visibility is in the quer
internal/store/items.go:5863
↓ 3 callersMethodListDormantOpLogItemsBefore
ListDormantOpLogItemsBefore + PruneItemOpLogIfDormantBefore power the periodic prune sweep (TASK-1309). Selects items whose ENTIRE op-log is older tha
internal/collab/room.go:334
↓ 3 callersMethodListItemsQ
ListItemsQ is ListItems on a caller-supplied executor, so it can read inside a snapshot transaction (BUG-3659). Only the plain listing: search, field
internal/store/items.go:1277
↓ 3 callersMethodListItemsReport
ListItemsReport is ListItems plus what the response says besides its rows (ItemListPage), for a caller that warns about undeclared keys or truncation.
internal/cli/client.go:474
↓ 3 callersMethodListMCPAuditByConnection
ListMCPAuditByConnection returns the audit rows for one OAuth connection (or one PAT). Used by the per-connection drilldown the connected-apps page ex
internal/store/mcp_audit.go:149
↓ 3 callersMethodListMovedOutSince
ListMovedOutSince finds items that the main /items-changes delta drops because they moved OUT of the caller's visible scope: their CURRENT collection
internal/store/items.go:1892
↓ 3 callersMethodListUIDismissals
ListUIDismissals returns the keys userID has dismissed, sorted. An unknown user answers sql.ErrNoRows.
internal/store/ui_dismissals.go:38
↓ 3 callersMethodListUserGrants
--- Cross-cutting queries --- ListUserGrants returns all collection and item grants for a user in a workspace.
internal/store/grants.go:240
↓ 3 callersMethodListVersionsResolvedSnapshot
ListVersionsResolvedSnapshot reads the document's body and its versions in one read snapshot, and resolves the versions from that body (BUG-3833, the
internal/store/versions.go:151
↓ 3 callersMethodListWorkspaceAppPrincipals
ListWorkspaceAppPrincipals returns the workspace's bots for the Apps section, or none when the policy hides them.
internal/store/app_principal.go:119
↓ 3 callersMethodListWorkspaceGraphLinks
ListWorkspaceGraphLinks returns every edge for the workspace graph view: all item_links rows (parent / blocks / implements / related) plus resolved sa
internal/store/graph.go:59
↓ 3 callersFunctionLoadPushConfigAutoArm
LoadPushConfigAutoArm reads ONLY the [push] auto_arm value from the user's config.toml with STRICT fail-closed semantics for the consent gate (PLAN-26
internal/config/config.go:420
↓ 3 callersMethodLogFile
()
internal/config/config.go:1003
↓ 3 callersMethodLookupCalendarFeed
LookupCalendarFeed gates live human ownership in the lookup itself. Invalid token shapes return without querying, and no error includes the credential
internal/store/calendar_feeds.go:143
↓ 3 callersMethodLookupPasswordReset
LookupPasswordReset performs a read-only validation of a reset token and returns the associated user WITHOUT consuming the token. Used by the reset ha
internal/store/password_resets.go:59
↓ 3 callersMethodMCPBlockedReason
MCPBlockedReason says why MCP cannot be served although it is turned on (TASK-1069), or "" when it is off or available. One rule for the admin panel's
internal/server/handlers_admin_mcp.go:231
↓ 3 callersMethodMCPConnectionStatsForUser
MCPConnectionStatsForUser returns last-used + 30-day-count keyed by (token_kind, token_ref) for every connection the user has any audit-log activity f
internal/store/mcp_audit.go:215
↓ 3 callersFunctionMCPConnectionStatsKey
MCPConnectionStatsKey is the exported wrapper for callers in other packages (notably internal/server/handlers_connected_apps.go in TASK-954) that need
internal/store/mcp_audit.go:276
↓ 3 callersFunctionMCPPropertyName
MCPPropertyName converts a CLI flag or argument name to the snake_case form used inside the dispatch input map. Hyphens become underscores; everything
internal/mcp/registry.go:130
↓ 3 callersMethodManagesLocalServer
ManagesLocalServer reports whether this client configuration should auto-manage a local Pad server process.
internal/config/config.go:743
↓ 3 callersFunctionManifestURL
ManifestURL is where a base URL's manifest is published.
internal/appmanifest/manifest.go:429
↓ 3 callersMethodMarkCloudOwned
MarkCloudOwned records that a cloud-mode server owns this database. Every cloud boot calls it before its own plan backfill. Idempotent.
internal/store/instance_mode.go:65
↓ 3 callersFunctionMarkFirstConnect
MarkFirstConnect reports whether this is THIS session's first connect, where /pad:connect offers the workspace's session-start playbook, and marks it
internal/cli/session_arm_state.go:591
↓ 3 callersMethodMarkOutboxAttemptFailed
MarkOutboxAttemptFailed records a failed dispatch attempt, leaving the event pending so the next drain retries it. The CLAIM IS RELEASED here, not le
internal/store/event_outbox.go:1833
↓ 3 callersMethodMarkOutboxDispatched
MarkOutboxDispatched stamps events as delivered, for the claim that holds them. Called AFTER the surfaces have been handed the event, never before. T
internal/store/event_outbox.go:1789
↓ 3 callersMethodMarkStripeEventProcessed
MarkStripeEventProcessed is ClaimStripeEvent with the pre-BUG-3561 answer: alreadyProcessed is false only for a claim, and true for a done event and f
internal/store/stripe_events.go:18
↓ 3 callersMethodMaxOpLogIDTx
MaxOpLogIDTx is the in-transaction variant of MaxOpLogID. Version-restore (BUG-2264) reads the pre-prune MAX inside the SAME tx as the op-log wipe + c
internal/store/yjs_updates.go:678
↓ 3 callersFunctionMessage
Message concatenates the context, a zero byte, the public key and challenge. A 32-byte public key and 32-byte challenge produce exactly 105 bytes.
internal/serveridentity/identity.go:19
↓ 3 callersMethodMinOpLogID
MinOpLogID powers the resume-cursor / force-refresh check (TASK-1319): when a reconnecting client announces `?since=<id>` and that id is below MIN, ro
internal/collab/room.go:340
↓ 3 callersMethodNamespace
Namespace returns the configured namespace, empty for Default. For log lines and health output — not for building names, which is Name's job.
internal/redisns/redisns.go:158
↓ 3 callersMethodNeedsSnoozesForItems
NeedsSnoozesForItems returns userID's snoozes on the given items of one workspace with Holds evaluated at now, keyed by item id. It is the batch of Ge
internal/store/needs_read.go:275
↓ 3 callersFunctionNewCollabObserver
NewCollabObserver returns an observer writing into m.
internal/metrics/collab_observer.go:11
↓ 3 callersFunctionNewRelationTargetList
NewRelationTargetList wraps an ordered list of targets.
internal/models/item.go:227
↓ 3 callersFunctionNewRelationTargetSet
NewRelationTargetSet wraps one scalar target.
internal/models/item.go:222
↓ 3 callersFunctionNewWithReplay
NewWithReplay creates a new in-memory EventBus with custom replay settings.
internal/events/bus.go:720
↓ 3 callersMethodNextSeq
NextSeq returns the workspace's next seq (nextWorkspaceSeqSubquery), read under LockWorkspaceSeq.
internal/store/fenced_tx.go:188
↓ 3 callersMethodOAuthIdentityOwner
OAuthIdentityOwner returns the pad account the provider account `subject` is bound to, or "" when it is bound to none.
internal/store/oauth_identities.go:166
↓ 3 callersFunctionOnboardPlaybook
OnboardPlaybook returns the library entry for the canonical `/pad onboard` playbook. PLAN-1496 / TASK-1499. Title is "Onboard a workspace" — verb-obj
internal/collections/playbook_library_onboard.go:338
↓ 3 callersMethodOpen
Open is Get with the concrete *os.File, for a caller that must not call through an interface (the app store, TASK-3396). The caller closes it.
internal/attachments/fs_store.go:199
↓ 3 callersMethodOpenMentionsForItems
OpenMentionsForItems returns the open mentions on the given items (see openMentionSQL), per item ordered by mention time then user id.
internal/store/needs_read.go:232
↓ 3 callersMethodOversizedPendingOutbox
OversizedPendingOutbox lists undispatched rows over MaxOutboxClaimableBytes. THE CLAIM'S CEILING, not the write cap, because the question this answer
internal/store/event_outbox.go:2223
↓ 3 callersFunctionParseAttachmentHref
ParseAttachmentHref returns the UUID portion of a `pad-attachment:UUID` reference, or "" if href is not a pad-attachment reference / has an empty UUID
internal/server/render/attachments.go:69
↓ 3 callersFunctionParseLineRange
ParseLineRange reads "A-B", "A-" (to the end) or "A". A range past the body's end is clipped by SliceBodyLines, not refused here.
internal/bodypatch/lines.go:30
↓ 3 callersFunctionParsePlaybookCLIArgs
ParsePlaybookCLIArgs splits a sequence of positional args + bareword flags + key=value pairs into a typed map matching the playbook's declared spec. E
internal/server/handlers_playbooks.go:816
↓ 3 callersMethodPlanExpired
IsDisabled returns true if the user account has been disabled. PlanExpired reports whether the user's plan carries an expiry at or before now (BUG-335
internal/models/user.go:80
↓ 3 callersMethodPopulateHasChildren
PopulateHasChildren sets HasChildren=true on items that have at least one child linked via parent link_type. Operates in-place on the slice.
internal/store/items.go:6054
↓ 3 callersMethodPostRaw
PostRaw sends raw bytes to the API and decodes the JSON response.
internal/cli/client.go:2047
↓ 3 callersFunctionPrintRawJSON
PrintRawJSON writes a server response verbatim except for indentation. json.Indent is a LEXICAL transform: it does not decode, so key order, numeric
internal/cli/client_items_copy.go:562
↓ 3 callersFunctionProjectReplaceTitle
ProjectReplaceTitle is len(ReplaceTitle(content, oldTitle, newTitle)) and the number of links it rewrites, computed WITHOUT allocating: the document c
internal/links/links.go:55
↓ 3 callersMethodPruneItemOpLogIfDormantBefore
(itemID string, before time.Time)
internal/collab/room.go:335
↓ 3 callersMethodPruneYjsUpdatesBefore
PruneYjsUpdatesBefore deletes op-log rows for an item with created_at strictly before the given cutoff and returns the row count removed. **Not safe
internal/store/yjs_updates.go:655
↓ 3 callersMethodPruneYjsUpdatesBefore
PruneYjsUpdatesBefore deletes every row for itemID whose CreatedAt is strictly less than the cutoff. Tests pass a far-future cutoff to wipe an op-log;
internal/collab/manager_test.go:200
↓ 3 callersMethodPushDispatchRunning
PushDispatchRunning reports whether the dispatch loop has been started and not stopped. Read-only; startup's wiring test reads it (TASK-3939 B2c).
internal/server/push_dispatch.go:273
↓ 3 callersMethodPushItem
PushItem publishes a self-addressed push notification (IDEA-2544 Phase 1) on an item, over the same watch-events bus/stream `pad watch --stream --for-
internal/cli/client.go:886
↓ 3 callersFunctionReadBootstrapToken
ReadBootstrapToken reads <DataDir>/.bootstrap-token. The file is created by EnsureBootstrapToken in internal/server/bootstrap.go with mode 0600 and co
internal/cli/bootstrap.go:197
← previousnext →4,501–4,600 of 28,840, ranked by callers