MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 4 callersFunctionCleanup
Cleanup removes the process-wide template databases, if any were built. Call it from TestMain after m.Run() so a lazily-built template doesn't linger
internal/store/storetest/storetest.go:119
↓ 4 callersFunctionCollectionTracksWork
PLAN-3535: a collection either tracks WORK (its items have a lifecycle and finish) or holds REFERENCE material (its items just exist: docs, convention
internal/models/tracks_work.go:23
↓ 4 callersMethodCompletedInstants
CompletedInstants returns, for each of itemIDs inside collectionID that is currently in a positive terminal status, the instant (RFC3339 UTC) of its l
internal/store/items.go:2642
↓ 4 callersFunctionCopyCommitted
CopyCommitted reports whether err is a post-commit reporting failure — the copy happened, only its result was lost. Callers must not present these as
internal/cli/client_items_copy.go:377
↓ 4 callersFunctionCountAttachmentRefs
CountAttachmentRefs counts the distinct IDs the planner enumerates, including unresolved references. It uses the same JSON field encoding and needs no
internal/store/attachments_copy_plan.go:631
↓ 4 callersMethodCountRelationBacklinks
CountRelationBacklinks is GetRelationBacklinks' count, under the SAME visibility and the SAME filters. It exists as its own query rather than len() o
internal/store/relation_links.go:398
↓ 4 callersMethodCreateStepUpCode
CreateStepUpCode replaces unused codes across the account and enforces three sends per rolling hour under the account lock. The code is returned once
internal/store/step_up.go:28
↓ 4 callersMethodCurrentQuestionHashes
CurrentQuestionHashes returns, per question key, the fingerprint of the question as the set asks it in the workspace now. A matching question_hash say
internal/decision/effort_read.go:56
↓ 4 callersFunctionDefaultAbandonedStatuses
DefaultAbandonedStatuses is AbandonedValuesForDoneField for the fallback case with no usable schema: the default terminal list minus its shipping valu
internal/models/terminal.go:181
↓ 4 callersMethodDeleteAPITokenScoped
DeleteAPITokenScoped removes a workspace-scoped API token by ID, verifying it belongs to the given workspace. Prevents cross-workspace revocation (TAS
internal/store/api_tokens.go:267
↓ 4 callersMethodDeleteAccountAtomicReport
DeleteAccountAtomicReport is DeleteAccountAtomic that also reports the workspaces whose grants the user had ISSUED, read from the rows the transaction
internal/store/users.go:1427
↓ 4 callersMethodDropInvisibleRelationDefaultsQ
DropInvisibleRelationDefaultsQ removes destination-schema defaults whose target the requester cannot see, and reports each as a `not_found` drop. The
internal/store/relation_referents.go:1941
↓ 4 callersMethodEffortBackfillCandidates
EffortBackfillCandidates returns the items the backfill would owe a job for, grouped by workspace in workspace order: live, answered for needs_human_d
internal/decision/effort_backfill.go:44
↓ 4 callersMethodEnabled
Enabled reports whether this config selects a real provider.
internal/decision/config.go:50
↓ 4 callersMethodEnsureAppWebhook
EnsureAppWebhook creates the hook an already-installed manifest declares (the backfill). Under the install row lock it re-checks the state, that there
internal/store/app_webhooks.go:246
↓ 4 callersMethodEnsureUniqueUsername
EnsureUniqueUsername takes a candidate username and returns a unique variant by appending -2, -3, etc. if the candidate is reserved or already exists.
internal/store/users.go:1865
↓ 4 callersFunctionEnvToken
EnvToken returns the value of the PAD_TOKEN environment variable, trimmed of surrounding whitespace. When non-empty, it overrides any credential store
internal/cli/env_token.go:34
↓ 4 callersMethodError
()
internal/server/handlers_items_copy.go:371
↓ 4 callersMethodEventsSince
EventsSince returns buffered events for a workspace with IDs greater than sinceID. Returns nil when this instance cannot vouch for the requested span
internal/events/redis_bus.go:1559
↓ 4 callersMethodExpandAgendaCut
ExpandAgendaCut uses the existing bounded seed expansion for each role's inverse window, then resolves and deduplicates by immutable occurrence key. E
internal/store/agenda_roles.go:140
↓ 4 callersFunctionExtensionForMIME
ExtensionForMIME returns the canonical file extension for a MIME type, or "" when there is no mapping. Exported so a client need not keep its OWN tab
internal/attachments/mime.go:513
↓ 4 callersFunctionExtractMentions
ExtractMentions returns the usernames a comment body @-mentions: lowercased, deduplicated and sorted. Mentions inside fenced or inline code and the do
internal/links/mentions.go:173
↓ 4 callersFunctionExtractWorkspaceContext
(raw string)
internal/models/workspace_settings.go:118
↓ 4 callersMethodFTSRank
FTSRank returns relevance SQL and its arguments. PostgreSQL uses the same tsquery as FTSMatch; SQLite uses the MATCH context.
internal/store/dialect.go:132
↓ 4 callersFunctionFieldKeysForKind
FieldKeysForKind returns the frontmatter field keys for the given kind, or ErrUnknownKind if the kind is not recognized. A later phase's server code c
internal/artifact/artifact.go:101
↓ 4 callersFunctionFindAgent
FindAgent returns the matching Agent for a name or alias. Names are case-insensitive (Claude / claude / CLAUDE all resolve).
internal/mcp/install.go:118
↓ 4 callersMethodFinishDisable
FinishDisable is disable's phase 2: disabling -> inactive. The webhook needs nothing here: admission refuses every attempt while the install is not a
internal/store/app_lifecycle.go:183
↓ 4 callersMethodFinishPendingInstall
FinishPendingInstall ends the fetch: under the instance lock, the charge is reduced to the bytes actually staged, the record is marked staged with its
internal/store/app_pending.go:192
↓ 4 callersFunctionFormatFieldSummary
FormatFieldSummary returns a formatted summary of item fields. Example output: "status: open | priority: high | category: platform"
internal/cli/format.go:463
↓ 4 callersMethodGetAccountSecurity
GetAccountSecurity reads whether 2FA is on and whether the account has a password (TASK-403).
internal/cli/client.go:2169
↓ 4 callersMethodGetCollectionAnyState
GetCollectionAnyState is GetCollection without the `deleted_at IS NULL` filter — used by the open-children guard (IDEA-1494 R3 P3) so a child still at
internal/store/collections.go:315
↓ 4 callersMethodGetCollectionQ
getCollectionQ is GetCollection against a caller-supplied executor, so an in-transaction caller reads through its own transaction instead of asking th
internal/store/collections.go:292
↓ 4 callersMethodGetConversation
GetConversation returns a conversation the actor is a member of.
internal/store/conversations.go:184
↓ 4 callersMethodGetDeletedWorkspaceBySlug
GetDeletedWorkspaceBySlug returns a SOFT-DELETED workspace by slug (deleted_at IS NOT NULL), including its owner_id, or nil when no such row exists (l
internal/store/workspaces.go:479
↓ 4 callersMethodGetItem
(wsSlug, itemSlug string)
internal/cli/client.go:648
↓ 4 callersMethodGetItemCommitment
GetItemCommitment returns an item's schedule view.
internal/cli/client_schedule.go:38
↓ 4 callersMethodGetItemPatch
GetItemPatch reads a stored patch (PLAN-3578 step 3) for the undo path, the table's only reader. Nil when there is none, or when it belongs to another
internal/store/item_patches.go:13
↓ 4 callersMethodGetItemVersionDiff
GetItemVersionDiff returns the change a version row records (PLAN-2348 U2), or nil if the item has no such version. A create row holds the body AS CRE
internal/store/items.go:6821
↓ 4 callersFunctionGetLibraryConvention
GetLibraryConvention finds a convention in the library by its title. Returns nil if no convention with the given title exists.
internal/collections/convention_library.go:232
↓ 4 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:83
↓ 4 callersMethodGetPlatformSettings
GetPlatformSettings returns all platform settings as a map.
internal/store/platform_settings.go:35
↓ 4 callersMethodGetSecretPlatformSetting
GetSecretPlatformSetting returns a secret platform setting decrypted, or "" when unset. A row WITHOUT the encrypted prefix is refused rather than ret
internal/store/platform_settings.go:98
↓ 4 callersMethodGetUserWorkspacesDetailed
GetUserWorkspacesDetailed returns each workspace this user is a member of with the per-workspace aggregations the admin modal's Workspaces tab renders
internal/store/workspace_members.go:1806
↓ 4 callersMethodGetView
GetView returns a single view by ID.
internal/store/views.go:47
↓ 4 callersFunctionGroupTemplatesByCategory
GroupTemplatesByCategory returns the visible workspace templates grouped by category in the canonical CategoryOrder. Categories with no visible templa
internal/collections/templates.go:67
↓ 4 callersMethodGuestVisibleResources
GuestVisibleResources returns the two-level visibility for a guest: - fullCollectionIDs: collections where the user has a direct collection grant (ful
internal/store/grants.go:655
↓ 4 callersMethodHasElectablePatchApplier
HasElectablePatchApplier is HasElectableApplier for a patch (PLAN-3578 step 2): is a patch-capable conn electable right now. A point-in-time hint, lik
internal/collab/applier.go:616
↓ 4 callersMethodHasItemDecisionsAtState
HasItemDecisionsAtState reports whether every asked question already has an answer for this item, set and state hash — the runner's idempotency check.
internal/store/decisions.go:725
↓ 4 callersMethodHasRoom
HasRoom reports whether a room exists for the item right now. Racy by nature; a caller that acts on the answer re-checks under the lock (UnderItemLock
internal/collab/manager.go:212
↓ 4 callersMethodInsert
Insert runs step 5: the row, in ONE fenced transaction.
internal/appstore/attachments.go:246
↓ 4 callersMethodIntrospectToken
IntrospectToken validates an opaque OAuth access token without going through the public RFC 7662 HTTP endpoint. Used by sub-PR E's MCPBearerAuth middl
internal/oauth/server.go:390
↓ 4 callersFunctionInvert
Invert turns applied edits into the patch that undoes them: each anchored on its context around what it wrote, replaced by its context around what it
internal/bodypatch/bodypatch.go:218
↓ 4 callersFunctionIsReservedUsername
IsReservedUsername checks if a username is in the reserved list, ignoring case.
internal/store/reserved_usernames.go:44
↓ 4 callersFunctionIsReservedUsername
IsReservedUsername checks if a username is in the reserved list.
internal/server/username.go:57
↓ 4 callersMethodIsValid
()
internal/store/nulguard.go:413
↓ 4 callersFunctionIsValidPrefix
IsValidPrefix reports whether s is a well-formed collection prefix: an uppercase ASCII letter followed by uppercase letters or digits. ONE DEFINITION
internal/collections/prefix.go:128
↓ 4 callersMethodIssueInstallCode
IssueInstallCode mints a new install code for an ACTIVE install in workspaceID: the owner's recovery when the app lost its redeem response (U8b Q2). E
internal/store/app_provision.go:431
↓ 4 callersMethodItemStateHash
ItemStateHash hashes an item's body and its values for this entry's update fields, the way Hash hashes the entry, so it equals Hash exactly when the i
internal/collections/builtin.go:104
↓ 4 callersMethodItemsMissingDecisionKey
ItemsMissingDecisionKey lists the live items that have a stored answer for withKey in the set (in any state or hash) and NONE for missingKey: the item
internal/store/decisions.go:263
↓ 4 callersMethodJSONExtractText
(column, key string)
internal/store/dialect.go:179
↓ 4 callersMethodJSONFieldEquals
(column, key, arg string)
internal/store/dialect.go:46
↓ 4 callersMethodLatestDecisionsForItems
LatestDecisionsForItems returns, per item, the newest answer for each question key of one set: LatestWorkspaceDecisions restricted to the given items,
internal/store/needs_scoring.go:76
↓ 4 callersFunctionLibraryConventionFields
LibraryConventionFields is the stored fields blob for an active item made from a library convention, the `convention` metadata key included. Every doo
internal/collections/templates.go:358
↓ 4 callersMethodListAgendaWork
ListAgendaWork applies visibility and recipient admission before the scan cap. listNoDate admits unscheduled work collections for a personal listing.
internal/store/agenda_roles.go:365
↓ 4 callersMethodListAgentRoles
--- Agent Roles --- ListAgentRoles returns all agent roles for a workspace.
internal/cli/client.go:1869
↓ 4 callersMethodListAllMCPAudit
ListAllMCPAudit is the admin-only full-table view used by the settings/admin/mcp-audit page. limit + offset paginate; caller must restrict access at t
internal/store/mcp_audit.go:178
↓ 4 callersMethodListCollectionItemsReport
ListCollectionItemsReport is ListCollectionItems plus the ItemListPage (see ListItemsReport).
internal/cli/client.go:507
↓ 4 callersMethodListComments
--- Comments ---
internal/cli/client.go:1178
↓ 4 callersMethodListConnectionWorkspaceSlugs
ListConnectionWorkspaceSlugs returns the join table's slug list for requestID, regardless of the parent connection's wildcard flag. Companion to Conne
internal/store/oauth_connections.go:660
↓ 4 callersMethodListDeletedWorkspaces
ListDeletedWorkspaces returns the soft-deleted workspaces the given user OWNS that are still inside the restore window — deleted_at set, newer than cu
internal/store/workspaces.go:520
↓ 4 callersMethodListForecastsForAgenda
ListForecastsForAgenda reads visible open schedules whose forecasts fall in the window. The lexical prefilter is padded for every viewer zone; only ro
internal/store/schedule_agenda.go:543
↓ 4 callersMethodListForeignItemLeaseIDs
ListForeignItemLeaseIDs returns the ids of the items in a workspace whose LIVE lease a claim by (holder, workerID, userID) would be refused, i.e. ever
internal/store/item_lease.go:202
↓ 4 callersMethodListItemsChangesSince
ListItemsChangesSince returns the skinny-projection of items that have mutated (create / update / soft-delete / restore) since the given seq cursor, i
internal/store/items.go:1739
↓ 4 callersMethodListItemsIndex
ListItemsIndex returns the skinny-projection of items in a workspace — every column EXCEPT i.content. Used by the local-first read model (PLAN-1343) s
internal/store/items.go:1595
↓ 4 callersMethodListItemsPendingContentFlush
ListItemsPendingContentFlush returns the workspace's items whose op-log holds content-bearing updates above items.content_flushed_op_log_id (BUG-3124:
internal/store/export.go:2176
↓ 4 callersMethodListMaterializeCandidates
ListMaterializeCandidates returns up to limit live items whose op-log holds content-bearing rows above the flush watermark, whose NEWEST op-log row is
internal/store/materialize_flush.go:184
↓ 4 callersMethodListSchedulesForCalendar
ListSchedulesForCalendar is ListSchedulesForAgenda for the calendar, which also shows what happened on a finished item. An open item qualifies exactly
internal/store/schedule_agenda.go:62
↓ 4 callersMethodListVersionsResolved
ListVersionsResolved returns versions with full content (diffs resolved). Requires the current document content to reconstruct diff-based versions.
internal/store/versions.go:129
↓ 4 callersMethodListWorkspaceGroups
(ctx context.Context, userID string)
internal/store/workspace_groups.go:71
↓ 4 callersMethodListWorkspaceMembers
--- Workspace Members --- ListWorkspaceMembers returns all members of a workspace.
internal/cli/client.go:1856
↓ 4 callersMethodListWorkspaceTags
ListWorkspaceTags returns the distinct tags used across a workspace's items with the number of (non-archived) items carrying each, ordered by count de
internal/store/items.go:1493
↓ 4 callersMethodLiveCollectionIDs
ListTraitedCollections returns every live collection in the workspace paired with its parsed kernel traits (SPEC-5). This is the lookup that replaced
internal/store/collections.go:416
↓ 4 callersFunctionLoadRegistry
LoadRegistry reads the installation registry from disk. Returns an empty registry if the file doesn't exist.
internal/cli/registry.go:44
↓ 4 callersMethodMarkCaughtUp
MarkCaughtUp moves userID's cursor in workspaceID to at, creating it on the first call. The cursor never moves backwards: an older at (a request that
internal/store/read_cursors.go:35
↓ 4 callersMethodMarkConversationDelivered
MarkConversationDelivered advances the delivery marker with the same cap (TASK-4038).
internal/store/conversations.go:664
↓ 4 callersMethodMarkNotificationsSent
MarkNotificationsSent records ids as pushed. token is Claim.Token. A row not (or no longer) pending under it is left alone. The dispatcher does not us
internal/store/push_dispatch.go:298
↓ 4 callersFunctionMigratedTables
MigratedTables names the tables `pad db migrate-to-pg` actually copies. The migration is application-level: it walks workspaces and runs ExportWorksp
internal/store/nulmigrated.go:28
↓ 4 callersMethodName
Name is the backend's configuration name, e.g. "typesafe".
internal/decision/decision.go:296
↓ 4 callersMethodNeedsScoringItems
NeedsScoringItems returns the scoring facts of the live items among ids in the workspace. length() counts characters on SQLite and Postgres alike; a N
internal/store/needs_scoring.go:40
↓ 4 callersFunctionNew
New returns the ID base for a bus incarnation, STRICTLY GREATER than any base this process has already issued. The clock supplies cross-restart separ
internal/idspace/idspace.go:119
↓ 4 callersFunctionNewClientRegistry
NewClientRegistry returns an empty registry.
internal/mcp/client_identity.go:72
↓ 4 callersFunctionNewHTTPResourceFetcher
NewHTTPResourceFetcher builds a fetcher backed by an already-configured tool dispatcher (its Handler + UserResolver + auth perimeter are reused).
internal/mcp/resources_http.go:57
↓ 4 callersFunctionNewPostgresBounded
NewPostgresBounded is NewPostgres followed by BoundRuntimePool(limits): the store a server runs on after boot (TASK-4278), with the startup pool alrea
internal/store/storetest/postgres.go:79
↓ 4 callersFunctionNewRedisSessionPresenceWithKeys
NewRedisSessionPresenceWithKeys is NewRedisSessionPresence with an explicit key namespace (BUG-2724). cmd/pad/cmd_server.go uses this one, passing the
internal/server/session_presence_redis.go:434
↓ 4 callersFunctionNewRefSlugFixture
NewRefSlugFixture pairs item #2 with a different item owning release-2. There is deliberately no RELEASE collection.
internal/store/storetest/ref_prefix.go:94
↓ 4 callersFunctionNewScanner
NewScanner scans doc. doc must not change while the Scanner is in use.
internal/jsonscan/jsonscan.go:68
↓ 4 callersFunctionNewSharedWorkspaceState
NewSharedWorkspaceState returns a state for a multi-user process (the cloud /mcp transport). It records Set/Get like any other state, but ResolveDefau
internal/mcp/workspace.go:66
↓ 4 callersFunctionNewWatchEventsObserver
NewWatchEventsObserver returns an observer writing into m.
internal/metrics/watchevents_observer.go:19
↓ 4 callersFunctionNormalizeAgentName
NormalizeAgentName is the one stored form of a self-declared agent name, shared by write attribution, presence (TASK-4040), chat key validation (TASK-
internal/models/agent_name.go:13
↓ 4 callersFunctionNormalizeFilename
NormalizeFilename is the stored form of a caller-supplied attachment name. Every door that writes a CALLER-SUPPLIED name calls it (upload, bundle impo
internal/attachments/filename.go:76
← previousnext →3,501–3,600 of 28,840, ranked by callers