MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions31,685 in github.com/PerpetualSoftware/pad

↓ 16 callersFunctionLookupMIME
LookupMIME returns the entry for a MIME type if it is on the allowlist, or (zero, false) if rejected.
internal/attachments/mime.go:147
↓ 16 callersFunctionNewProcessor
NewProcessor returns the Processor compiled into this binary. Pure-Go build → pureGoProcessor. libvips build → vipsProcessor (Phase 2). Constructed o
internal/attachments/processor_purego.go:43
↓ 16 callersFunctionNewRegistry
NewRegistry returns an empty registry.
internal/decision/runner.go:150
↓ 16 callersFunctionRedactPath
RedactPath removes credential-bearing path tails, including malformed and unmatched requests for which a router has no route template yet. URL.Path is
internal/logging/redaction.go:159
↓ 16 callersFunctionResolve
Resolve returns the zone for a stored users.timezone value. Nil, empty or a value that no longer loads is UTC with Set=false.
internal/usertz/usertz.go:41
↓ 16 callersMethodSendConversationMessage
SendConversationMessage appends a message and returns it. The seq comes from conversations.last_seq under that row's lock, in the same statement that
internal/store/conversations.go:223
↓ 16 callersMethodSetHTTPClient
SetHTTPClient sets the HTTP client used for API requests. Configure it before use.
internal/cli/client.go:152
↓ 16 callersMethodSetRolePark
SetRolePark places or moves the park line for a role lane. Lock order: workspace seq lock -> agent_roles row (FOR UPDATE on Postgres) -> items.
internal/store/role_park.go:892
↓ 16 callersMethodStarItem
StarItem stars an item for a user. Idempotent — re-starring is a no-op.
internal/store/item_stars.go:13
↓ 16 callersMethodSubscribeAndReplaySince
SubscribeAndReplaySince atomically checks the per-workspace limit, registers the subscriber, and captures the buffered events above sinceID — all in O
internal/events/bus.go:277
↓ 16 callersFunctionTerminalValuesForDoneField
TerminalValuesForDoneField returns the resolved done-field key and the list of terminal values for that field. If the resolved field has no terminal_o
internal/models/terminal.go:83
↓ 16 callersMethodacquire
acquire reserves one stream slot for a PRINCIPAL. The returned release MUST be called when the connection ends; it is idempotent so a handler can defe
internal/server/stream_admission.go:107
↓ 16 callersFunctionadd
(names: Set<string>)
web/src/test/identityFenceAst.ts:815
↓ 16 callersFunctionappOAuthServer
appOAuthServer is an OAuth server that also knows the app API resource. cloud=true makes both MCP and apps available; cloud=false is a self-host with
internal/server/task3394_install_tokens_test.go:27
↓ 16 callersMethodarchiveSource
()
internal/server/item_moved_to_test.go:108
↓ 16 callersFunctionbuild
(uuid: string, variant?: string)
web/src/lib/utils/markdown.shareAttachments.test.ts:173
↓ 16 callersFunctionbundleScheduleIDs
bundleScheduleIDs maps item title to source schedule id in a bundle.
internal/store/schedule_link_carry_test.go:84
↓ 16 callersFunctionconnectWatchStreamWithHeadersAndQuery
connectWatchStreamWithHeadersAndQuery is the common seam beneath every connect helper above — added for PLAN-2613 S1's `armed` query param, which (unl
internal/server/handlers_watch_events_test.go:65
↓ 16 callersFunctioncontentFrame
contentFrame is a content-bearing Update frame, distinct per n.
internal/server/materialize_recovery_test.go:176
↓ 16 callersFunctioncountItemsIn
(t *testing.T, s *Store, workspaceID string)
internal/store/items_cross_workspace_copy_test.go:106
↓ 16 callersFunctioncountsFixture
(t *testing.T)
internal/store/agenda_counts_test.go:31
↓ 16 callersFunctioncreate
(c creator)
internal/appstore/testdata/ifacecall/x.go:18
↓ 16 callersMethodcycledCount
()
internal/events/observer_test.go:95
↓ 16 callersFunctiondecisionTime
(t time.Time)
internal/store/decisions.go:150
↓ 16 callersFunctiondoRequestWithHeadersFromAddr
doRequestWithHeadersFromAddr lets us combine arbitrary headers with a non-loopback remote-addr. Existing helpers cover one or the other but not both.
internal/server/handlers_auth_bootstrap_token_test.go:56
↓ 16 callersFunctionfetch
()
web/src/lib/api/changesWalk.test.ts:77
↓ 16 callersFunctionfilterAttention
filterAttention returns attention items of a given type.
internal/server/handlers_dashboard_test.go:1278
↓ 16 callersMethodgoAsync
goAsync spawns fn in a goroutine that's tracked by s.bg, so Stop() can wait for in-flight background work to finish. Use this for any fire-and-forget
internal/server/server.go:774
↓ 16 callersFunctioni
(n int)
internal/store/commitment_c1_test.go:19
↓ 16 callersFunctionisolateHome
isolateHome redirects HOME to a temp dir and chdirs to a fresh temp project dir so credential writes and .pad.toml detection don't leak into the real
cmd/pad/setup_headless_test.go:89
↓ 16 callersFunctionitemRefOrSlug
itemRefOrSlug formats an item's issue ref (e.g. "TASK-5") when its collection prefix + item number are populated, falling back to its slug. Avoids pul
internal/server/handlers_items_open_children_guard.go:100
↓ 16 callersFunctionitemUrl
(fixture: SuiteFixture, slug: string)
web/e2e/lib/attachment-viewer.ts:421
↓ 16 callersFunctionlinkTime
(t *testing.T, s string)
internal/schedule/links_test.go:13
↓ 16 callersFunctionliveGen
--- reconciliation on the receive path --------------------------------- liveGen subscribes the workspace and returns the generation a real receive lo
internal/events/redis_idspace_test.go:263
↓ 16 callersMethodmatches
True when `key` names the live view. A null key never matches.
web/src/lib/attachments/viewFence.ts:92
↓ 16 callersFunctionmoveSchedule
(t *testing.T, f *schedFixture, kind string, lead int, rule string)
internal/store/commitment_move_test.go:16
↓ 16 callersFunctionmustSeedWorkspaceWithRole
mustSeedWorkspaceWithRole is a test helper that creates a workspace + adds the user as a member with the given role. Centralized here because TASK-952
internal/server/handlers_oauth_test.go:1901
↓ 16 callersFunctionnewTestRequest
newTestRequest builds an OAuthRequest with sensible defaults; tests override fields they care about. signature uniqueness is the caller's responsibili
internal/store/oauth_test.go:53
↓ 16 callersMethodoverdueSchedule
(t *testing.T, title, behavior string)
internal/store/schedule_deadline_eval_test.go:52
↓ 16 callersFunctionpidFileOwner
pidFileOwner reports whether a live pad server holds path. It probes with a SHARED lock, non-blockingly. Only a server holds the exclusive lock, and
internal/cli/pidfile_unix.go:168
↓ 16 callersFunctionreadMigrationNames
readMigrationNames returns sorted .sql filenames from an embedded FS directory.
internal/store/store.go:686
↓ 16 callersFunctionrender
(entries: TimelineEntry[])
web/src/lib/components/timeline/HistoryView.svelte.test.ts:71
↓ 16 callersFunctionrestoredBundle
(t *testing.T, f *schedFixture, b map[string]any)
internal/store/commitment_bundle_v2_test.go:65
↓ 16 callersMethodrunOrphanGCSweep
runOrphanGCSweep walks the orphaned-attachments query and reclaims rows past the grace period. Two reclamation paths: - DB row only. content_hash is
internal/server/orphan_gc.go:78
↓ 16 callersMethodscheduleFuture
scheduleFuture creates the source's schedule as of the copy instant, so its outstanding occurrence is still ahead (nothing due to catch up).
internal/store/schedule_copy_test.go:68
↓ 16 callersMethodsend
(body: unknown)
web/src/lib/api/importUpload.test.ts:23
↓ 16 callersFunctionsetupLeaseFixture
(t *testing.T)
internal/server/handlers_item_lease_test.go:28
↓ 16 callersFunctiontask3392Bot
task3392Bot creates a bot through the one real door, then makes it CREDENTIAL-ELIGIBLE by direct SQL: a VALID bcrypt hash of a known password and a ve
internal/store/task3392_bot_principal_test.go:29
↓ 16 callersFunctiontask3394Fixture
(t *testing.T, installID string)
internal/store/task3394_install_clients_test.go:34
↓ 16 callersFunctiontask3867Factor
(t *testing.T, e *tokenAuthEnv, want string)
internal/server/task3867_token_access_test.go:47
↓ 16 callersFunctiontask3867Patch
(e *tokenAuthEnv, body any)
internal/server/task3867_token_access_test.go:35
↓ 16 callersMethodts
(ago time.Duration)
internal/server/task3939b_push_fixture_test.go:145
↓ 16 callersFunctionuploadAttachment
( fixture: SuiteFixture, request: APIRequestContext, itemId: string, filename: string, mimeType = 'image/
web/e2e/lib/attachment-viewer.ts:470
↓ 16 callersFunctionveErrorCode
veErrorCode extracts the JSON error.code from a response, or "" if the body isn't an error envelope.
internal/server/middleware_verified_email_test.go:143
↓ 15 callersMethodAckReminder
(workspaceID, id string)
internal/store/reminder_commitment.go:185
↓ 15 callersFunctionAsAPIError
AsAPIError returns the *APIError in err's chain, or nil. Use it instead of a direct err.(*APIError) assertion: a write that sent an op_key comes back
internal/cli/client.go:3641
↓ 15 callersMethodBackfillOAuthConnections
BackfillOAuthConnections walks every distinct grant chain found in oauth_access_tokens and oauth_refresh_tokens, parses the newest chain row's session
internal/store/oauth_connections_backfill.go:93
↓ 15 callersMethodClaimPendingOutboxEvents
ClaimPendingOutboxEvents claims up to limit pending events for one drain pass and returns them, oldest first. WHY A CLAIM AT ALL. Pad Cloud runs N in
internal/store/event_outbox.go:2031
↓ 15 callersMethodCopyItem
CopyItem performs the MUTATING cross-workspace copy. NEVER RETRY THIS CALL (DR-13) outside the one keyed retry it makes itself. See the file header f
internal/cli/client_items_copy.go:341
↓ 15 callersMethodCreateAttachmentForLiveItem
CreateAttachmentForLiveItem inserts an attachment row, refusing when its item_id does not name a LIVE item of the same workspace — re-checked and pinn
internal/store/attachments.go:227
↓ 15 callersMethodDeleteComment
DeleteComment deletes a comment and emits the ref-only comment.deleted event in the same transaction (SPEC-3 v1.4 / TASK-2658). A comment with no rep
internal/store/comments.go:530
↓ 15 callersMethodDeleteConversationMessage
DeleteConversationMessage tombstones an authorized member's message while retaining its row and sequence, including on repeated deletes (TASK-4038).
internal/store/conversations.go:596
↓ 15 callersMethodDeleteScheduleGate
DeleteScheduleGate removes a gate. It needs edit on both ends, as a link does, and works whether or not either end is soft-deleted: an end absent from
internal/store/commitment_gates.go:372
↓ 15 callersMethodDeliverEvent
DeliverEvent puts one canonical event on the wire SYNCHRONOUSLY and reports what happened to each matching endpoint. This exists because acking is on
internal/webhooks/dispatcher.go:454
↓ 15 callersMethodFind
Find reports how id resolves and, when it is found, its text's hash.
internal/verification/verification.go:73
↓ 15 callersMethodGetAgentRole
(workspaceID, idOrSlug string)
internal/store/agent_roles.go:39
↓ 15 callersMethodGetComment
GetComment returns a single comment by ID.
internal/store/comments.go:322
↓ 15 callersMethodGetInvitationByCode
GetInvitationByCode retrieves a pending invitation by its join code. Looks up by SHA-256 hash first (new invitations), then falls back to plaintext lo
internal/store/workspace_members.go:1534
↓ 15 callersMethodGetParentForItem
GetParentForItem returns the parent link for an item, or nil if it has no parent. A parent link pointing to a soft-deleted item, or to an item in a so
internal/store/items.go:5027
↓ 15 callersMethodIs
Is lets errors.Is(err, ErrMaxTokensExceeded) match the budget refusal without the caller inspecting the status code or the body.
internal/decision/typesafe.go:130
↓ 15 callersMethodListConversationMessages
ListConversationMessages returns a window of messages in ascending seq order, tombstones included. With neither cursor it is the newest limit messages
internal/store/conversations.go:512
↓ 15 callersMethodListTraitedCollections
(workspaceID string)
internal/store/collections.go:434
↓ 15 callersFunctionNewClientFromURLWithAgentName
NewClientFromURLWithAgentName uses an already resolved agent name without consulting the session registry, workspace configuration or environment for
internal/cli/client.go:91
↓ 15 callersFunctionNewFetcher
NewFetcher returns a Fetcher with production defaults applied.
internal/urlimport/fetch.go:95
↓ 15 callersFunctionNewServer
NewServer constructs an OAuth 2.1 authorization server backed by fosite v0.49.0. Compliance posture (PLAN-943 TASK-951): - PKCE required (S256 only)
internal/oauth/server.go:154
↓ 15 callersFunctionNormalizeMIME
NormalizeMIME strips parameters and lowercases the type/subtype. We match strictly against the allowlist after normalization so callers can pass an ht
internal/attachments/mime.go:201
↓ 15 callersMethodPing
Ping verifies the database connection is alive.
internal/store/store.go:681
↓ 15 callersMethodQueryContext
(ctx context.Context, query string, args ...any)
internal/store/store.go:1024
↓ 15 callersMethodRearmReminder
RearmReminder retimes and rearms even an unchanged or already-passed target.
internal/store/reminder_commitment.go:129
↓ 15 callersMethodResolveMCPEndpoints
ResolveMCPEndpoints derives the MCP addressing from the configuration. It never fails: PAD_URL also tells the CLI where the server is, so an install t
internal/config/mcp.go:94
↓ 15 callersMethodSend
(ctx context.Context, msgs []notify.Message)
internal/server/push_dispatch.go:78
↓ 15 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
internal/mcp/dispatch_http_needs_test.go:103
↓ 15 callersMethodSetEmailSender
SetEmailSender attaches a transactional email sender. The apiKey is stored separately for deriving the unsubscribe HMAC secret. If the server is alre
internal/server/server.go:1357
↓ 15 callersMethodSetSSELimits
SetSSELimits configures the streaming connection limits. A value of 0 means unlimited for any of them. `global` and `perUser` bound BOTH stream endpo
internal/server/server.go:1605
↓ 15 callersMethodUpdateComment
UpdateComment edits a comment as its own author. Production does not use it: the edit handler calls UpdateCommentAs with the request's actor, so a men
internal/store/comments.go:199
↓ 15 callersMethodWorkspaceAttachments
WorkspaceAttachments lists original (non-derived) attachments in a workspace, with optional filtering + sorting + pagination. Returns the page rows an
internal/store/attachments.go:700
↓ 15 callersFunctionagentSignupReq
(srv *Server, method, addr string, body any, headers map[string]string)
internal/server/handlers_agent_signup_test.go:52
↓ 15 callersFunctionagentSignupServer
agentSignupServer is a self-hosted server with agent signup switched on: the operator's opt-in, the platform setting and the terms URL.
internal/server/handlers_agent_signup_test.go:27
↓ 15 callersFunctionappendTestNote
(t *testing.T, s *Store, itemID, summary, details string)
internal/store/item_entries_index_test.go:35
↓ 15 callersFunctionarmStateTestEnv
armStateTestEnv points HOME (and thus ~/.pad/sessions) at a temp dir and sets the messaging socket env to socket ("" for the headless case), then chdi
internal/cli/session_arm_state_test.go:17
↓ 15 callersMethodbearerHeaders
()
internal/server/handlers_grant_visibility_test.go:104
↓ 15 callersFunctionbindReactiveEpoch
(hook: { read: null | (() => number); write: null | ((n: number) => void); })
web/src/test/identityEpochMock.svelte.ts:63
↓ 15 callersFunctioncapture
capture routes the default logger through SetupWriter, the production handler, and returns the buffer it writes to.
internal/logging/redaction_followups_test.go:32
↓ 15 callersMethodconfirmUpgrade
(t *testing.T, p appPreview)
internal/server/handlers_apps_upgrade_test.go:46
↓ 15 callersMethodconnect
()
web/src/lib/collab/wsProvider.svelte.ts:836
↓ 15 callersFunctioncounterValue
counterValue is a tiny helper that pulls the float value out of a Prometheus counter.
internal/server/middleware_mcp_metrics_test.go:209
↓ 15 callersFunctioncountsItem
countsItem makes an item created at createdAt whose history is the given (instant, status) steps. Its own create row is replaced, so the history is ex
internal/store/agenda_counts_test.go:16
↓ 15 callersMethodcycleIfIdle
cycleIfIdle ends this instance's coverage and replaces its subscription when nothing has arrived for the idle timeout. DROP-AND-CYCLE, NOT DROP ALONE
internal/watchevents/heartbeat.go:299
↓ 15 callersMethoddeadlineOverride
(t *testing.T, sc *models.ItemSchedule, value string)
internal/store/schedule_deadline_eval_test.go:203
↓ 15 callersFunctiondecodePayload
decodePayload parses the "<epoch>|<id>|<json>" wire form publishScript emits, and ALSO accepts a bare JSON body with no prefix. THE BARE FORM IS NOT
internal/events/redis_bus.go:2599
← previousnext →1,001–1,100 of 31,685, ranked by callers