MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions31,685 in github.com/PerpetualSoftware/pad

↓ 3 callersMethodCompleteIdempotencyKey
CompleteIdempotencyKey is CompleteIdempotencyKeyTx for a write that has no transaction of its own (push, TASK-3585), in a transaction of its own.
internal/store/idempotency.go:124
↓ 3 callersFunctionConfigFromEnv
ConfigFromEnv reads EnvTimeout, EnvMemLimit and EnvIdleTimeout through getenv (os.Getenv in production). An unset variable takes the default; an unpar
internal/materialize/supervisor_config.go:143
↓ 3 callersMethodConfigure
Configure updates the sender's settings at runtime (e.g. when an admin changes platform settings). Thread-safe.
internal/email/sender.go:53
↓ 3 callersMethodConsumeInvitationProof
ConsumeInvitationProof spends an invitation's mailbox-only proof (TASK-3352): if proof is the one minted with invitationID, it is cleared and userID's
internal/store/workspace_members.go:1456
↓ 3 callersFunctionConventionPriorityRank
ConventionPriorityRank ranks convention priority strings (must > should > nice-to-have). Lower rank = higher priority. Unknown values rank last so unt
internal/models/priority_rank.go:30
↓ 3 callersFunctionConventionsSet
ConventionsSet returns the `conventions` question set.
internal/decision/conventions.go:63
↓ 3 callersMethodCountNotificationsSentSince
CountNotificationsSentSince is how many of userID's rows were pushed at or after since: the rate cap's input. sent_at is stored at whole seconds, so a
internal/store/push_dispatch.go:340
↓ 3 callersMethodCountProtectingAttachmentsForHashContext
CountProtectingAttachmentsForHashContext is CountProtectingAttachmentsForHash bounded by ctx, for the callers that run it while holding the process-wi
internal/store/attachments.go:1415
↓ 3 callersMethodCountYjsSetAsideTx
CountYjsSetAsideTx counts the item's set-aside rows inside tx.
internal/store/yjs_set_aside.go:174
↓ 3 callersMethodCreateAccessTokenSession
===================================================================== AccessTokenStorage =============================================================
internal/oauth/storage.go:277
↓ 3 callersMethodCreateAttachmentTx
CreateAttachmentTx inserts an attachment row inside an existing transaction. It exists for the cross-workspace copy (PLAN-2357 / DR-9 / DR-11), which
internal/store/attachments.go:174
↓ 3 callersMethodCreateAttachmentVariantIfParentLive
CreateAttachmentVariantIfParentLive inserts a derived-variant row ONLY while its parent original is still live — the liveness check is part of the INS
internal/store/attachments.go:1695
↓ 3 callersMethodCreateCommentWithActivity
CreateCommentWithActivity writes the activity row a comment links to AND the comment in ONE transaction, so both commit or neither does (BUG-2716). T
internal/store/comments.go:64
↓ 3 callersMethodCreateItem
CreateItem accepts WithPlanLimit(): the workspace's items_per_workspace cap is then counted inside the insert's transaction, under the workspace lock
internal/store/items.go:208
↓ 3 callersMethodCreateWebViewSession
CreateWebViewSession mints a WebView session from the web session parentID (TASK-4454), in one transaction: the account must be active, and the parent
internal/store/sessions.go:73
↓ 3 callersFunctionCriterionHash
CriterionHash is the sha256 hex of a criterion's text with runs of whitespace collapsed, so re-wrapping a criterion does not stale its evidence and re
internal/verification/verification.go:28
↓ 3 callersMethodDBRuntimeLimits
DBRuntimeLimits parses the three PAD_DB_* bounds. Unset takes the default; `0` or `off` means no limit; anything else must be a positive Go duration o
internal/config/config.go:1297
↓ 3 callersMethodDateBucket
DateBucket returns a SQL expression that truncates an RFC3339 UTC timestamp TEXT column to the start of its bucket, as a sortable TEXT label, for GROU
internal/store/dialect.go:166
↓ 3 callersMethodDead
Dead is closed on the stream's first write or flush failure.
internal/server/sse_stream.go:82
↓ 3 callersFunctionDecodeWorkspaceExport
DecodeWorkspaceExport decodes a workspace export from r, streaming known top-level slice fields element by element so the whole raw JSON body does not
internal/models/export_decode.go:60
↓ 3 callersMethodDelete
(ctx context.Context, key string)
internal/attachments/registry.go:94
↓ 3 callersMethodDeleteCollectionGrant
DeleteCollectionGrant revokes a collection grant by ID, scoped to a workspace. When it was the grantee's last access to the workspace, their workspac
internal/store/grants.go:96
↓ 3 callersMethodDeleteComment
DeleteComment deletes (or tombstones) a comment this install wrote as this actor, addressed through its item, in one FencedTx.
internal/appstore/comments.go:128
↓ 3 callersMethodDeleteInstallClientTx
DeleteInstallClientTx removes the install's client and everything hanging off it, children first (DOC-3371 §8): the request ids are captured from the
internal/store/install_clients.go:305
↓ 3 callersMethodDeleteInvitationAdmin
DeleteInvitationAdmin removes a pending invitation by ID (no workspace scoping).
internal/store/workspace_members.go:1811
↓ 3 callersMethodDeletePendingInstall
DeletePendingInstall removes a reservation and every staged blob: a failed or cancelled fetch, or an owner discarding a preview. A missing record is n
internal/store/app_pending.go:221
↓ 3 callersMethodDeleteWatch
DeleteWatch removes a user's watch on an item. Returns sql.ErrNoRows if no such watch exists — mirrors UnstarItem's contract.
internal/store/watches.go:112
↓ 3 callersFunctionDeliver
Deliver maps a target to the people it reaches, or ok=false when it reaches nobody (the item is dropped: never "everyone"). A role target reaches no h
internal/needs/needs.go:207
↓ 3 callersMethodDeliveryStatus
DeliveryStatus returns the recorded status of eventID for webhookID, "" when nothing is recorded.
internal/store/webhook_deliveries.go:39
↓ 3 callersFunctionDescribe
Describe reports the configured provider for operator-facing output such as `pad server info`. It returns ("none", "") when nothing is configured, and
internal/decision/config.go:169
↓ 3 callersMethodDismissUI
DismissUI adds key to userID's dismissed set (idempotent) and returns the set as this write left it. The read-modify-write holds the users row, the sa
internal/store/ui_dismissals.go:50
↓ 3 callersMethodDropDecisionJob
DropDecisionJob abandons a claimed job: the item is gone, the set no longer applies, or the job has exhausted its attempts. Generation-matched, exact
internal/store/decisions.go:384
↓ 3 callersFunctionDroppedFilenameRune
BUG-2818: one filename, three readers. A stored attachment name is read by the extension blocklist (ValidateUpload), by the Content-Disposition heade
internal/attachments/filename.go:42
↓ 3 callersMethodETag
ETag is the concurrency token an app sees for an item.
internal/appstore/appstore.go:93
↓ 3 callersFunctionEarliestInstant
EarliestInstant is the earliest instant a reading at or after w (within a day of it) can resolve to in loc: w less the larger of the two offsets Resol
internal/schedule/wall.go:90
↓ 3 callersMethodEligible
(userID, collectionID, itemID string)
internal/needs/needs.go:101
↓ 3 callersFunctionEmailVerificationBlocks
EmailVerificationBlocks is the verified-email predicate, shared with the remote MCP hook (cmd/pad/cmd_server_mcp.go) so the two cannot drift. An uncla
internal/server/middleware_verified_email.go:50
↓ 3 callersFunctionErrManagerClosed
ErrManagerClosed exposes the manager's internal closed-flag error to callers via a public sentinel they can wrap. The internal errManagerClosed (in ma
internal/collab/applier.go:880
↓ 3 callersMethodError
()
internal/logging/redaction_followups_test.go:191
↓ 3 callersMethodError
()
internal/store/items_cross_workspace_copy.go:125
↓ 3 callersMethodError
()
internal/store/items.go:2363
↓ 3 callersMethodError
()
internal/server/handlers_import_bundle.go:1547
↓ 3 callersFunctionEscapeWikiTitle
EscapeWikiTitle is title in the form a wiki-link body stores it: `\`, `]` and `|` escaped with a backslash. A caller that searches or counts link lite
internal/links/links.go:152
↓ 3 callersMethodExhausted
Exhausted reports whether an iterator of r stopped on its budget. TASK-4100.
internal/schedule/internal/rrule/rrule.go:145
↓ 3 callersMethodExpireStaleNotifications
ExpireStaleNotifications turns pending rows created before createdCutoff into 'expired': a push that late is noise. A row under a live claim (claimed
internal/store/push_dispatch.go:249
↓ 3 callersMethodExportItemArtifact
ExportItemArtifact GETs the single-item artifact export endpoint (GET /workspaces/{ws}/items/{ref}/export) and returns the artifact bytes (Markdown +
internal/cli/client.go:2074
↓ 3 callersMethodExportWorkspaceQ
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:326
↓ 3 callersFunctionExtractAttachmentRefs
ExtractAttachmentRefs returns the unique attachment UUIDs referenced in `markdown` via `pad-attachment:UUID` image/link syntax, in first-seen order. R
internal/server/render/attachments.go:433
↓ 3 callersMethodFTSSnippet
FTSSnippet returns highlighted snippet SQL and its arguments. PostgreSQL uses the same tsquery as FTSMatch; SQLite uses the MATCH context.
internal/store/dialect.go:118
↓ 3 callersMethodFetch
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:63
↓ 3 callersMethodFetch
Fetch runs `<Binary> <args...>` and returns stdout on success.
internal/mcp/resources.go:69
↓ 3 callersMethodForUpdate
ForUpdate returns the row-lock clause for SELECT queries: SQLite: "" (single-writer transactions; FOR UPDATE is a syntax error) PostgreSQL: " FOR UPDA
internal/store/dialect.go:185
↓ 3 callersMethodForecastSummaries
ForecastSummaries decorates already admitted schedules without loading history.
internal/store/milestone.go:923
↓ 3 callersFunctionFormatChangesForDisplay
FormatChangesForDisplay is the Go twin of formatChangesForDisplay in web/src/lib/utils/activityChanges.ts (BUG-2789). It sanitises an activity row's `
internal/cli/activity_changes.go:34
↓ 3 callersFunctionFormatDayStart
FormatDayStart writes a minute of the day as "HH:MM".
internal/usertz/daystart.go:30
↓ 3 callersFunctionFormatFieldValue
FormatFieldValue renders one field value for a human: a string as itself, a structured value (a json field's object or array) as compact JSON, anythin
internal/cli/format.go:424
↓ 3 callersFunctionFormatLineDiff
FormatLineDiff renders old -> new as lines prefixed "-", "+" or " ", keeping at most context unchanged lines around each change and eliding the rest w
internal/cli/builtin_format.go:16
↓ 3 callersMethodGet
Get / Stat / Delete are convenience helpers that resolve the key first.
internal/attachments/registry.go:78
↓ 3 callersMethodGetAccessTokenSession
GetAccessTokenSession hydrates an access token. Inactive rows surface as fosite.ErrInactiveToken so the introspection / authorization-bearer middlewar
internal/oauth/storage.go:304
↓ 3 callersMethodGetAgentRole
GetAgentRole gets a single agent role by ID or slug.
internal/cli/client.go:1961
↓ 3 callersMethodGetBacklinksPage
GetBacklinksPage fetches one page of items that contain a `[[<itemRef>]]` reference to the queried item, plus the response's paging headers (X-Pad-Has
internal/cli/client.go:1175
↓ 3 callersMethodGetBillingMetrics
GetBillingMetrics asks pad-cloud for an aggregated Stripe-derived snapshot (active subs, MRR, ARR, churn, cancellations). Auth is the same shared Clou
internal/billing/cloud_client.go:146
↓ 3 callersMethodGetCollectionGrant
GetCollectionGrant retrieves a collection grant by ID.
internal/store/grants.go:36
↓ 3 callersMethodGetCurrentUserContext
GetCurrentUserContext allows callers to bound identity resolution.
internal/cli/client.go:2508
↓ 3 callersMethodGetItemGrant
GetItemGrant retrieves an item grant by ID.
internal/store/grants.go:148
↓ 3 callersMethodGetItemLineageByIDs
GetItemLineageByIDs fetches skinny parent-lineage projections for the given item IDs in a single `WHERE id IN (...)` query. Soft-deleted items are exc
internal/store/items.go:5138
↓ 3 callersMethodGetItemsByIDsIncludeDeleted
GetItemsByIDsIncludeDeleted fetches items (soft-deleted included) for the given IDs in ONE `WHERE id IN (...)` query, keyed by item ID. It replaces th
internal/store/items.go:1166
↓ 3 callersFunctionGetLibraryPlaybook
GetLibraryPlaybook finds a playbook in the library by its title. Returns nil if no playbook with the given title exists.
internal/collections/playbook_library.go:67
↓ 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 callersMethodGetPendingCLIAuthSessionByUserCode
GetPendingCLIAuthSessionByUserCode never returns a consumed or expired request.
internal/store/cli_auth_sessions.go:455
↓ 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:239
↓ 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 callersMethodGetUserAPIToken
GetUserAPIToken gives foreign, revoked and unknown ids the same result. Expiry is deliberately ignored, as it is for token rotation.
internal/store/api_tokens.go:468
↓ 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:838
↓ 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:1158
↓ 3 callersMethodGetUserWorkspaceMemberships
GetUserWorkspaceMemberships returns workspace memberships for admin user detail.
internal/store/workspace_members.go:1999
↓ 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:876
↓ 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:57
↓ 3 callersMethodHeadAttachment
HeadAttachment issues a HEAD request and returns the headers as structured metadata. Variant is forwarded the same way as DownloadAttachment — empty s
internal/cli/client.go:3392
↓ 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:2111
↓ 3 callersMethodIncludes
Includes reports whether the user is among the routed people.
internal/needs/needs.go:150
↓ 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:201
↓ 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:1012
↓ 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:781
↓ 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:139
↓ 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:3822
↓ 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
← previousnext →4,901–5,000 of 31,685, ranked by callers