MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 2 callersMethodSetCommentInsertFailureHookForTesting
SetCommentInsertFailureHookForTesting makes the comment INSERT inside CreateComment / CreateCommentWithActivity return hook's error, for the lifetime
internal/store/testing_helpers.go:222
↓ 2 callersMethodSetConnWritable
(itemID string, conn *websocket.Conn, canWrite bool)
internal/collab/manager.go:1501
↓ 2 callersMethodSetDeadlockRetryObserver
SetDeadlockRetryObserver records a function called once per retry with the site's name; the server counts them in pad_db_deadlock_retries_total.
internal/store/deadlock_retry.go:39
↓ 2 callersMethodSetHeader
SetHeader reports the count on a successful import, and says nothing when there is nothing to say — so a clean import's response is unchanged.
internal/server/import_stale_bodies.go:50
↓ 2 callersMethodSetHeader
SetHeader reports the count on a successful import.
internal/server/import_nul_repair.go:88
↓ 2 callersMethodSetIdleHook
SetIdleHook installs fn as the room-reclaimed callback (see idleHook). Nil removes it.
internal/collab/manager.go:168
↓ 2 callersMethodSetItemBuiltinSeed
SetItemBuiltinSeed records that an item has been given a built-in's text at this version (TASK-3462). The built-in update does this inside its write (
internal/store/builtin_origin.go:150
↓ 2 callersMethodSetMaterializer
SetMaterializer installs the op-log recovery worker's Materializer. Nil (the default, and what PAD_MATERIALIZE=off leaves) disables recovery entirely:
internal/server/materialize_recovery.go:152
↓ 2 callersMethodSetMetricsToken
SetMetricsToken configures the static bearer token required to scrape metrics. When empty (the default), /metrics is exposed only to loopback callers
internal/server/server.go:1484
↓ 2 callersMethodSetRedisHealth
SetRedisHealth attaches the Redis reachability prober (BUG-2727). Nil on a deployment with no Redis, in which case /api/v1/health/ready reports no red
internal/server/server.go:1266
↓ 2 callersMethodSetReminderTickChannel
SetReminderTickChannel replaces the interval ticker with a caller-driven channel. Test affordance only.
internal/server/reminder_tick.go:69
↓ 2 callersMethodSetReminderTickConfig
SetReminderTickConfig overrides the tick's timings. Zero values keep the defaults, so a caller can set one knob without restating the rest. Must be ca
internal/server/reminder_tick.go:56
↓ 2 callersMethodSetRetryBackoff
SetRetryBackoff sets the base retry backoff (tests set 0 to not wait).
internal/webhooks/dispatcher.go:243
↓ 2 callersMethodSetRotateFaultHookForTesting
SetRotateFaultHookForTesting makes RotateUserSessions fail its transaction with hook's error, after the writes and before the commit, for the lifetime
internal/store/testing_helpers.go:347
↓ 2 callersMethodSetScopeFlagsGuarded
SetScopeFlagsGuarded is SetScopeFlags with the empty-list rule checked under the connection's lock: turning the wildcard off is refused with ErrLastCo
internal/store/oauth_connections.go:466
↓ 2 callersMethodSetSecretPlatformSetting
SetSecretPlatformSetting stores a secret platform setting encrypted with the store's key (the PAD_ENCRYPTION_KEY path). An empty value deletes the row
internal/store/platform_settings.go:73
↓ 2 callersMethodSetUsageObserver
SetUsageObserver installs fn, called after every provider call with the set's name and the call's usage. nil removes it. Not safe to call while jobs r
internal/decision/runner.go:399
↓ 2 callersMethodSetUserStripeCustomerIDIfUnset
SetUserStripeCustomerIDIfUnset stores customerID only when the user has no Stripe customer yet, or already has this one (TASK-3549). It never replaces
internal/store/limits.go:787
↓ 2 callersMethodSetsFor
SetsFor names the sets that apply to a collection, sorted. It is the store's DecisionSetResolver, so it must stay pure (no database access): the store
internal/decision/runner.go:192
↓ 2 callersFunctionSignAppPayload
SignAppPayload returns the signature v2 header value.
internal/webhooks/app_delivery.go:108
↓ 2 callersFunctionSoftwareStarterConventions
SoftwareStarterConventions returns the curated convention seed pack for software workspaces. Titles are pulled from ConventionLibrary so the text stay
internal/collections/templates.go:413
↓ 2 callersFunctionSoftwareStarterPlaybooks
SoftwareStarterPlaybooks returns the curated playbook seed pack for software workspaces.
internal/collections/templates.go:425
↓ 2 callersFunctionSplitCommentKey
SplitCommentKey returns the question key and the comment id of a PerComment row's key. ok is false for a key that names no comment.
internal/decision/per_comment.go:35
↓ 2 callersMethodStampContentWatermarkIfCaughtUp
StampContentWatermarkIfCaughtUp advances items.content_flushed_op_log_id to cursor WITHOUT writing content, when a browser tab proves that the stored
internal/store/content_watermark_stamp.go:53
↓ 2 callersMethodStartAppPendingSweep
StartAppPendingSweep starts the sweep. Idempotent.
internal/server/app_pending_sweep.go:27
↓ 2 callersMethodStartOrphanGC
StartOrphanGC kicks off the periodic sweep loop. Idempotent — calling twice is a no-op (existing loop continues, second call returns silently). Must b
internal/server/orphan_gc.go:574
↓ 2 callersMethodStatus
Status checks each tracked installation and returns its current state, decided the way an update would decide it (DecideSkillWrite). embedded is the r
internal/cli/registry.go:142
↓ 2 callersMethodStatus
Status walks every global (per-user) agent and reports installation state. CWDBased agents (Claude Code) are omitted — their config is project-local,
internal/mcp/install.go:708
↓ 2 callersMethodStorage
Storage returns the storage adapter. Exposed for sub-PR C's oauth/register handler (which calls Storage.store directly to CreateOAuthClient) and for t
internal/oauth/server.go:319
↓ 2 callersMethodStoredFieldKeys
StoredFieldKeys reports which of keys some item within scope stores in its fields (BUG-3480: a list filter on a key no schema declares is honoured, wi
internal/store/items.go:2686
↓ 2 callersFunctionStrToDatesInLoc
StrToDatesInLoc same as StrToDates but it consideres default location to parse dates in in case no location specified with TZID parameter
internal/schedule/internal/rrule/str.go:391
↓ 2 callersFunctionStrToDtStart
StrToDtStart accepts string with format: "(TZID={timezone}:)?{time}" and parses it to a date may be used to parse DTSTART rules, without the DTSTART;
internal/schedule/internal/rrule/str.go:443
↓ 2 callersFunctionStrToROptionInLocation
StrToROptionInLocation is same as StrToROption but in case local time is supplied as date-time/date field (ex. UNTIL), it is parsed as a time in a giv
internal/schedule/internal/rrule/str.go:176
↓ 2 callersMethodString
()
internal/events/redis_subscribe_rejected_test.go:78
↓ 2 callersFunctionSubjectKind
SubjectKind returns the subject kind for a canonical event name, and false if the name is not canonical.
internal/kernelevents/taxonomy.go:361
↓ 2 callersMethodSubscribeWithOverflow
SubscribeWithOverflow is Subscribe plus the overflow signal (TASK-1273): onOverflow runs once, asynchronously, when an event the subscriber needs (any
internal/collab/bus.go:116
↓ 2 callersMethodSupportsProtocolVersion
(string)
internal/mcp/transport_test.go:277
↓ 2 callersFunctionSurfaceSSE
SurfaceSSE returns the SSE wire name a canonical event publishes under, and false when it has none — either because the name is not canonical, or beca
internal/kernelevents/taxonomy.go:392
↓ 2 callersMethodSweepIdempotencyKeys
SweepIdempotencyKeys deletes keys older than the TTL.
internal/store/idempotency.go:161
↓ 2 callersMethodSweepMCPAuditOlderThan
SweepMCPAuditOlderThan deletes audit rows older than cutoff and returns the number of rows removed. Called from a periodic goroutine in Server.Start (
internal/store/mcp_audit.go:290
↓ 2 callersFunctionTerminalStatusesFromSchema
── Back-compat wrappers ──────────────────────────────────────────────── The original API (status-only) stays in place so callers that don't yet have
internal/models/terminal.go:352
↓ 2 callersFunctionTokenScopeAllows
TokenScopeAllows is the exported wrapper around the package-private tokenScopeAllows: returns true iff the scopes JSON permits the given HTTP method a
internal/server/context.go:132
↓ 2 callersFunctionTraitedFromCollections
TraitedFromCollections adapts stored collection models into the trait view. Lets callers that already hold []models.Collection (CLI, in-process HTTP d
internal/collections/traits.go:105
↓ 2 callersMethodUnclaimNotifications
UnclaimNotifications hands claimed rows back WITHOUT counting an attempt: for rows that were never tried (a shutdown, a deadline, a gate that could no
internal/store/push_dispatch_settle.go:59
↓ 2 callersMethodUnderItemLock
UnderItemLock runs fn while the per-item setup lock for itemID is held — the SAME lock Join's addConn+replayTo acquires and the SAME lock PruneAndAppl
internal/collab/manager.go:1029
↓ 2 callersMethodUnderItemLockIfNoRoom
UnderItemLockIfNoRoom runs fn under the per-item setup lock, and only when no room exists for the item; otherwise it returns ErrRoomOpen without calli
internal/collab/manager.go:187
↓ 2 callersMethodUnstarItem
UnstarItem removes a star from an item for a user. Returns sql.ErrNoRows if not starred.
internal/store/item_stars.go:27
↓ 2 callersFunctionUnsubscribeURL
UnsubscribeURL generates an HMAC-signed unsubscribe link for the given email. The secret should be a stable server-side key (e.g. derived from the API
internal/email/unsubscribe.go:13
↓ 2 callersMethodUnwrap
Unwrap returns the driver's own connection. The write-capture test harness (storetest.CaptureWrites, TASK-3388) needs it to reach modernc's pre-update
internal/store/nulguard.go:398
↓ 2 callersMethodUpdateCollection
(wsSlug, collSlug string, input models.CollectionUpdate)
internal/cli/client.go:307
↓ 2 callersMethodUpdateComment
UpdateComment replaces a comment's body through the item-scoped route (TASK-2695), which refuses a comment that is not on itemRef. The server's not_fo
internal/cli/client.go:1202
↓ 2 callersMethodUpdateCommentWrite
UpdateCommentWrite is UpdateComment with the item and actor display.
internal/appstore/comments.go:98
↓ 2 callersMethodUpdateItemWithPreCheck
UpdateItemWithPreCheck is UpdateItem with an optional pre-mutation hook that runs inside the same transaction (and, on Postgres, holds the same worksp
internal/store/items.go:2818
↓ 2 callersMethodUpdateItemWrite
UpdateItemWrite is UpdateItem with the response view.
internal/appstore/items.go:171
↓ 2 callersMethodUpdateUserAPIToken
UpdateUserAPIToken compares scopes in the write so a concurrent edit cannot make the widening decision stale. Read-back shares the update transaction.
internal/store/api_tokens.go:470
↓ 2 callersMethodUpdateWebhookFailure
(id string, failed bool)
internal/webhooks/dispatcher.go:75
↓ 2 callersMethodUpdateWorkspace
(slug string, input models.WorkspaceUpdate)
internal/store/workspaces.go:360
↓ 2 callersMethodUpdateWorkspaceSortOrder
UpdateWorkspaceSortOrder sets the sort_order for a workspace in a user's membership.
internal/store/workspace_members.go:955
↓ 2 callersMethodUserHasGrantsInWorkspaceQ
UserHasGrantsInWorkspaceQ is UserHasGrantsInWorkspace on q.
internal/store/grants.go:453
↓ 2 callersFunctionValidMode
(mode string)
internal/config/config.go:747
↓ 2 callersFunctionValidPlanSource
ValidPlanSource reports whether src is a plan source SetUserPlan accepts.
internal/store/limits.go:564
↓ 2 callersFunctionValidVerdict
ValidVerdict reports whether v is one of the three verdicts.
internal/models/verification.go:16
↓ 2 callersMethodValidate
Validate refuses an origin whose key is not a lowercase path, whose hash is not a sha256 hex digest, whose seed text is oversized or whose seed fields
internal/models/builtin_origin.go:39
↓ 2 callersMethodValidateCloudSecureCookies
ValidateCloudSecureCookies returns an error if this server process is opted into cloud-tenant mode (see IsCloudServer) without secure cookies enabled.
internal/config/config.go:794
↓ 2 callersFunctionValidateFormBody
ValidateFormBody is the form-encoded-body half of the transport text rule ValidatePath (BUG-2782) and ValidateQuery (BUG-2784) apply: a request whose
internal/server/middleware_form_body.go:63
↓ 2 callersMethodValidateShareLink
ValidateShareLink checks if a share link is valid (not expired). Max views enforcement is handled atomically by RecordShareLinkView. Returns nil error
internal/store/share_links.go:367
↓ 2 callersMethodValidateTokenForLiveness
ValidateTokenForLiveness answers "is this token still valid" WITHOUT touching `last_used_at` (BUG-3007). Two reasons it is a separate door rather tha
internal/store/api_tokens.go:329
↓ 2 callersFunctionValidateWebhookURL
ValidateWebhookURL checks that a webhook URL is safe to call. It rejects non-HTTP(S) schemes, URLs with credentials, private/reserved IPs (loopback, l
internal/webhooks/validate.go:41
↓ 2 callersFunctionVerify
Verify checks a plain Ed25519 proof, refusing every invalid input length.
internal/serveridentity/identity.go:39
↓ 2 callersMethodVisibleAttachment
VisibleAttachment is the app read rule: a live attachment in the install's workspace, bound to a live item whose CURRENT collection is a companion. A
internal/store/fenced_attachments.go:151
↓ 2 callersFunctionVisibleWorkspaceTabs
VisibleWorkspaceTabs intersects stored rows with the caller's visible workspace set, in row order. visible must be exactly what the caller may list (G
internal/store/workspace_tabs.go:113
↓ 2 callersFunctionWindowsPathComponent
WindowsPathComponent returns name made safe to use as ONE path component on Windows (BUG-3186): each reserved character and each C0 control becomes "_
internal/attachments/filename.go:212
↓ 2 callersFunctionWithMCPResource
WithMCPResource returns middleware stamping the mount's canonical resource on the request, for MCPBearerAuth's audience check. Install it BEFORE MCPBe
internal/server/middleware_mcp_auth.go:666
↓ 2 callersFunctionWithRemoteMCPCaller
WithRemoteMCPCaller marks ctx as a remote MCP call. Every such write is an AGENT write (an app acting for the user), named by X-Pad-Agent when the cli
internal/server/context.go:305
↓ 2 callersFunctionWithStructuredEntryAuthor
WithStructuredEntryAuthor sets the created_by the item PATCH stamps on an appended entry, in place of actorFromRequest's user/agent. It exists for th
internal/server/context.go:272
↓ 2 callersMethodWorkspaceAttachmentBlobs
WorkspaceAttachmentBlobs returns every attachment row for a workspace — originals AND thumbnail variants, live AND soft-deleted — so the purge sweeper
internal/store/workspace_purge.go:93
↓ 2 callersMethodWorkspaceFlagsForItems
WorkspaceFlagsForItems is [Runner.WorkspaceFlags] restricted to the given items: the decision rows of any other item are dropped BEFORE its state is r
internal/decision/attention.go:197
↓ 2 callersMethodWorkspaceHasUserCreatedItems
WorkspaceHasUserCreatedItems reports whether ANY non-deleted item in the workspace was created by something other than template seeding. Used by the a
internal/store/items.go:7303
↓ 2 callersMethodWorkspaceLive
WorkspaceLive reports whether the workspace exists and is not soft-deleted. ListWebhooks already returns nothing for a deleted workspace; this is re-c
internal/webhooks/dispatcher.go:81
↓ 2 callersMethodWorkspaceOwnerIDs
WorkspaceOwnerIDs lists the workspace's human owners, ordered by id. Disabled accounts are included: eligibility belongs to the router.
internal/store/needs_read.go:96
↓ 2 callersMethodWorkspaceStorageLimit
WorkspaceStorageLimit returns the effective storage limit (bytes) for the workspace owner's plan, or -1 if the plan is unlimited. Thin wrapper around
internal/store/attachments.go:1812
↓ 2 callersFunctionWrite
Write emits RFC 5545 content lines, folded at 75 octets including the continuation space. Only title, reference, link and dates are published.
internal/ics/ics.go:39
↓ 2 callersMethodWrite
(p []byte)
internal/appfetch/appfetch.go:445
↓ 2 callersMethodWrite
(p []byte)
cmd/pad/bug3476_import_watch_test.go:37
↓ 2 callersFunctionWriteCommentDeletedError
WriteCommentDeletedError writes the structured marker line for the tombstone refusal, so the stdio MCP transport reports comment_deleted instead of in
internal/cli/client.go:2679
↓ 2 callersFunctionWriteCommentHasRepliesError
WriteCommentHasRepliesError writes the structured marker line for BUG-3252's refusal, so the stdio MCP transport reports comment_has_replies with its
internal/cli/client.go:2697
↓ 2 callersMethodWriteHeader
(int)
internal/server/bug3821_write_deadline_test.go:643
↓ 2 callersFunctionWriteLeaseHeldError
WriteLeaseHeldError writes the structured marker line for the lease refusal, so the stdio MCP transport reports lease_held with its holder and expiry
internal/cli/client.go:2643
↓ 2 callersFunctionWriteRateLimitedError
WriteRateLimitedError writes the structured marker line for a 429 (BUG-3147), so the stdio MCP transport reports rate_limited — with the server's wait
internal/cli/client.go:3447
↓ 2 callersFunctionWriteSkill
WriteSkill is the one door that writes a tool's skill file (BUG-3466). It decides with DecideSkillWrite and writes the stamped text only to install or
internal/cli/skillstamp.go:306
↓ 2 callersFunction__resetServerClockForTests
()
web/src/lib/api/serverClock.ts:66
↓ 2 callersMethodabandonIfRejected
abandonIfRejected takes down a subscription Redis rejected, before anyone is admitted into it, and reports whether it did. Its callers then find no su
internal/events/redis_bus.go:1959
↓ 2 callersMethodabandonSpaceLocked
abandonSpaceLocked records that the id space whose high-water mark is oldPeak has been abandoned, so replaySince refuses cursors inside it. See ambigu
internal/watchevents/redis_bus.go:1078
↓ 2 callersFunctionabsentArmLeavesNoRestorableHusk
(t *testing.T, driver store.DriverType)
internal/server/handlers_cloud_autocreate_husk_test.go:198
↓ 2 callersFunctionabsorb
(st: Node)
web/src/test/identityFenceGate.ts:424
↓ 2 callersMethodaccept
(l linkRow)
internal/store/schedule_link_import.go:392
↓ 2 callersFunctionacceptFixture
BUG-3281: AcceptWorkspaceInvitation shares addWorkspaceMemberTx with AddWorkspaceMember. An existing membership is an idempotent success that keeps it
internal/store/workspace_invitation_accept_test.go:12
↓ 2 callersFunctionacceptedAt
(t *testing.T, s *Store, invID string)
internal/store/workspace_invitation_accept_test.go:37
↓ 2 callersFunctionaccessPayloadsUntil
--- delivery, through the real stream handler --- accessPayloads drains ch until a status-change notification for sentinelRef arrives, returning every
internal/server/workspace_access_notify_test.go:401
↓ 2 callersFunctionaccessRank
(a string)
internal/server/app_upgrade_diff.go:78
← previousnext →6,301–6,400 of 28,840, ranked by callers