Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
31,685 in github.com/PerpetualSoftware/pad
⨍
Functions
31,685
◇
Types & classes
3,533
↓ 6 callers
Function
newTestOAuthServer
newTestOAuthServer builds an internal/oauth.Server matched to the test harness's canonical audience (testCanonicalAudience). Used by mcpAndOAuthEnable
internal/server/handlers_mcp_test.go:1885
↓ 6 callers
Function
newTestWorkspace
newTestWorkspace creates a workspace bound to the test store with the given slug. Helper for store-level tests that don't already use the larger setup
internal/store/agent_roles_test.go:51
↓ 6 callers
Function
newU2Fixture
(t *testing.T)
internal/store/plan2348_u2_versions_test.go:23
↓ 6 callers
Function
norm
* Normalize a select value for lookup: lowercase, hyphens → underscores. * * Takes `unknown`, and answers '' for anything that is not a string (BUG-
web/src/lib/utils/fieldColors.ts:88
↓ 6 callers
Function
normalizeAgentName
normalizeAgentName delegates to models.NormalizeAgentName, the single source of the stored form of a self-declared agent name (TASK-4186 PR C moved it
internal/server/agent_name.go:18
↓ 6 callers
Function
noteCmd
()
cmd/pad/notes.go:19
↓ 6 callers
Function
noticeFixture
(t *testing.T, native bool)
internal/store/commitment_notifications_test.go:19
↓ 6 callers
Method
now
now reads the bus's clock. The seam is nil in every real construction; tests set it so an idle threshold can be crossed without sleeping through one.
internal/events/redis_heartbeat.go:163
↓ 6 callers
Function
num
(n int)
internal/cli/format_markdown_test.go:22
↓ 6 callers
Method
observe
observe records a frame a connection sent. A frame that does not decode is not tracked (it is still relayed by the caller).
internal/collab/awareness.go:171
↓ 6 callers
Method
observer
()
internal/watchevents/observer.go:163
↓ 6 callers
Method
occs
occs reads a schedule's history, with the comment id replaced by the comment's body so ids that were re-minted compare equal.
internal/store/schedule_carry_test.go:74
↓ 6 callers
Method
occurrenceOverrides
(q Queryer, scheduleID, key string)
internal/store/commitment.go:120
↓ 6 callers
Method
onError
Surface an upload failure to the user.
web/src/lib/utils/commentAttachments.ts:101
↓ 6 callers
Method
onlyLinkID
(t *testing.T)
internal/store/commitment_links_deleted_end_test.go:22
↓ 6 callers
Function
openRaw
openRaw opens the file with the store's DSN pragmas, below the store.
internal/store/bug3664_legacy_numbering_test.go:25
↓ 6 callers
Method
outstandingKeyOf
(t *testing.T, i int)
internal/store/commitment_gates_rekey_test.go:24
↓ 6 callers
Function
pagerServer
BUG-4024: ListAllItems and ListAllCollectionItems share one pager (listAllPages) that takes a start offset, keeps the first page's undeclared-filter k
internal/cli/bug4024_list_all_pager_test.go:20
↓ 6 callers
Function
parseMCPRequestBody
(body []byte)
internal/server/middleware_mcp_audit.go:492
↓ 6 callers
Function
parseMutableItemFields
(fieldsJSON string)
internal/models/item.go:1236
↓ 6 callers
Function
parseSessionIdentity
parseSessionIdentity reads the self-declared session identity off a stream request. It never fails: malformed fields are sanitized or dropped individu
internal/server/session_identity.go:79
↓ 6 callers
Function
partialRolesFixture
(t *testing.T, deadline bool)
internal/store/commitment_partial_test.go:22
↓ 6 callers
Function
patchItemFields
BUG-2783: a structured entry's id can equal the id of a comment, activity or version on the SAME item, and then two entries in one timeline payload sh
internal/server/handlers_timeline_id_collision_test.go:44
↓ 6 callers
Function
patchRoles
Decode the wire-shaped partial so absent, null and zero remain distinct.
internal/store/commitment_partial_test.go:13
↓ 6 callers
Method
path
(it *models.Item)
internal/server/handlers_commitments_http_test.go:70
↓ 6 callers
Function
pendingOutboxCount
(t *testing.T, srv *Server)
internal/server/outbox_drain_test.go:91
↓ 6 callers
Function
pendingOwner
TASK-3397 (U8a): pending app-install reservations and their caps.
internal/store/app_pending_test.go:14
↓ 6 callers
Function
persistReplace
( userId: string | null, ws: string, rows: ItemIndexRow[], cursor: string, includesUnparentedMetadata: bo
web/src/lib/stores/localIndexPersistence.ts:841
↓ 6 callers
Function
pgErrCode
(err error)
internal/store/runtime_pool_test.go:72
↓ 6 callers
Function
pl4745OAuthBody
(provider, addr, subject string, pending bool)
internal/server/task4745_pending_link_test.go:63
↓ 6 callers
Function
planLimitMessage
planLimitMessage returns a human-readable statement-of-fact sentence for a plan limit violation. Each surface (web toast, CLI, MCP hint) appends its o
internal/server/handlers_cloud.go:1907
↓ 6 callers
Method
planLinkedTx
planLinkedTx plans the cascade of a change to one date of itemID's outstanding occurrence over the component c that pinCommitmentTx read (the caller m
internal/store/commitment_cascade.go:446
↓ 6 callers
Function
postgresFTSQuery
PG FTS uses an OR-combined plainto_tsquery to handle hyphenated user queries correctly. For an indexed title `task-five-distinctive`, the english pars
internal/store/dialect.go:354
↓ 6 callers
Function
preflightNULForMigration
--- audit-log --- preflightNULForMigration refuses a SQLite-to-PostgreSQL migration whose source carries values PostgreSQL will not accept, listing th
cmd/pad/cmd_db.go:1112
↓ 6 callers
Function
projectChatGPTResult
projectChatGPTResult minimizes one ChatGPT tool result. The structured content is projected through the tool's shape and the text fallback is REWRITTE
internal/mcp/chatgpt_project.go:236
↓ 6 callers
Function
ptrFloat
(f float64)
internal/server/handlers_playbook_match_test.go:54
↓ 6 callers
Function
publishTyped
publishTyped is publishN for tests that care which event types land, and is the reason neither helper recomputes an ID: since BUG-2736 the IDs a bus i
internal/events/idspace_test.go:39
↓ 6 callers
Method
queryValues
(t *testing.T)
cmd/pad/bug4026_history_backlinks_json_test.go:232
↓ 6 callers
Function
raised
raised reports whether a gap signal is pending, without blocking. Reading it CONSUMES the signal, which is what a real consumer's select does.
internal/events/gap_signal_test.go:12
↓ 6 callers
Function
rawPeerAddr
rawPeerAddr returns the untampered TCP peer address captured by CapturePeerAddr, falling back to the current r.RemoteAddr if the middleware wasn't ins
internal/server/middleware_realip.go:33
↓ 6 callers
Function
readAllThen
(after func(w http.ResponseWriter, r *http.Request))
cmd/pad/bug3476_import_watch_test.go:95
↓ 6 callers
Function
readConfig
(t *testing.T, path string)
internal/mcp/install_test.go:877
↓ 6 callers
Method
readItem
readItem handles pad://workspace/{ws}/items/{ref}. Why JSON-then-format instead of `--format markdown`: pad's CLI `--format markdown` for `item show`
internal/mcp/resources.go:294
↓ 6 callers
Function
readRawSSEFramesAuthed
(t *testing.T, ctx context.Context, url, lastEventID, token string)
internal/server/handlers_events_resume_test.go:25
↓ 6 callers
Function
readRegistration
(t *testing.T, path string)
internal/cli/session_registry_test.go:66
↓ 6 callers
Function
readSyncRow
Read the `sync` meta row, or undefined when this cache has never synced.
web/src/lib/stores/localIndexPersistence.ts:309
↓ 6 callers
Function
recordHomeHints
(t *testing.T, srv *Server)
internal/server/home_hint_hub_test.go:30
↓ 6 callers
Method
recordMCPCallMetrics
recordMCPCallMetrics fans the audit-row data out to Prometheus. No-op when metrics aren't wired (selfhost / tests). Kept separate from MCPAuditLog so
internal/server/middleware_mcp_audit.go:362
↓ 6 callers
Method
recordOAuthFlow
recordOAuthFlow bumps the pad_oauth_flows_total counter with the supplied stage label. No-op when metrics aren't wired (selfhost / tests). Stage vocab
internal/server/handlers_oauth.go:129
↓ 6 callers
Method
reenter
(name string)
internal/watchevents/observer_test.go:512
↓ 6 callers
Function
ref
(id string)
internal/appstore/comments_test.go:107
↓ 6 callers
Method
refuseCrossSiteSignIn
handleLogin validates email/password and creates a session. refuseCrossSiteSignIn guards the sign-in doors CSRF exempts (BUG-3350). Without it, a cros
internal/server/handlers_auth.go:1216
↓ 6 callers
Method
registerPendingAck
registerPendingAck creates an entry in the room's pending-acks map keyed on requestID, expecting acks/brackets from `applier`. It seeds the bracket ba
internal/collab/applier.go:992
↓ 6 callers
Function
relationArrayElements
THREE READERS OF ONE SHAPE, and they are three because they answer three different questions. Picking the wrong one has been a defect twice over, so t
internal/store/relation_referents.go:348
↓ 6 callers
Function
release
()
web/e2e/bug-3204-cursor-snapback.spec.ts:120
↓ 6 callers
Method
release
release gives up the claim; a no-op once the write recorded its answer.
internal/server/idempotency_keys.go:42
↓ 6 callers
Function
reloadGraphAccess
reloadGraphAccess checks both ends after the pin. Direct store callers may keep their supplied snapshot; HTTP always supplies a transaction loader.
internal/store/commitment_access.go:86
↓ 6 callers
Function
remoteMCPCaller
remoteMCPCaller reports the remote MCP caller a request carries, if any.
internal/server/context.go:310
↓ 6 callers
Method
replaceWikiLinks
replaceWikiLinks deletes prior wiki-link rows for `sourceItemID` and inserts fresh ones extracted from `content`. Resolution against the workspace's i
internal/store/wiki_links.go:34
↓ 6 callers
Function
repoRoot
(t *testing.T)
internal/models/reserved_field_decode_guard_test.go:99
↓ 6 callers
Function
report
(name, rows, thresholds=(0.5, 0.7, 0.9))
scripts/decision-eval/eval2.py:55
↓ 6 callers
Function
requesterToOAuthRequest
===================================================================== Translation helpers ============================================================
internal/oauth/storage.go:516
↓ 6 callers
Method
requireAppsOwner
requireAppsOwner gates every install route: apps available here, and the caller an owner of the workspace.
internal/server/handlers_apps_install.go:184
↓ 6 callers
Method
requireCompanionCollection
requireCompanionCollection refuses a write to a collection outside the install's companions. Every fenced write method calls it, or requireCompanionIt
internal/store/fenced_tx.go:202
↓ 6 callers
Function
reservedPatchErrorBody
BUG-2627 part 2 — `fields_patch` is the door every user field-setter lowers into (`pad item update --field`, the MCP `field` param on both transports)
internal/server/handlers_items_reserved_fieldpatch_test.go:22
↓ 6 callers
Method
resolveChatConversation
(w http.ResponseWriter, r *http.Request, actor models.ConversationActor)
internal/server/handlers_chat.go:65
↓ 6 callers
Function
resolveOne
Exact-title resolution and read-side hydration for `relation` values (PLAN-2857 U6). U1 accepted a UUID or a ref. U6 adds a THIRD spelling — an exact
internal/store/relation_titles_test.go:25
↓ 6 callers
Method
resolvePath
(it *models.Item)
internal/server/handlers_commitments_resolve_test.go:22
↓ 6 callers
Function
respText
(t *testing.T, resp any)
internal/mcp/bug3217_fields_number_literals_test.go:27
↓ 6 callers
Function
restoreEdits
(d: { markdown: string; baseBody: string; baseStale?: true })
web/src/lib/items/draftPatch.ts:137
↓ 6 callers
Function
restrictedTitleFixture
--- title resolution is scoped to what the caller can SEE ---------------- PLAN-2857 U6 rule, one step past "collapse ambiguous when nothing is visib
internal/server/relation_titles_doors_test.go:255
↓ 6 callers
Method
resync
(w io.Writer)
cmd/pad/cmd_watch_chat.go:338
↓ 6 callers
Method
retry
Re-read on demand (Retry) — the same invalidate-then-fetch path a restore uses.
web/src/lib/attachments/surfaceMetadata.svelte.ts:106
↓ 6 callers
Function
rl3310Request
BUG-3310: the general API bucket is charged from two arms of the rate limit middleware: the auth-default arm (/api/v1/auth/* paths with no bucket of t
internal/server/middleware_ratelimit_bug3310_test.go:16
↓ 6 callers
Function
rnd
()
web/src/lib/collab/materializer/atBlank.test.ts:22
↓ 6 callers
Function
roleDay
(value: string, zone: string)
web/src/lib/calendar/presentation.ts:278
↓ 6 callers
Function
rolesFromInput
(in models.CommitmentRolesInput)
internal/store/commitment.go:324
↓ 6 callers
Function
routingTestItems
()
cmd/pad/format_markdown_routing_test.go:70
↓ 6 callers
Function
row
(ws: string, ref: string, extra: Record<string, unknown> = {})
web/src/routes/(console)/needs/needsPage.svelte.test.ts:62
↓ 6 callers
Function
rtLimits
()
internal/store/runtime_pool_test.go:26
↓ 6 callers
Method
run
* Issue a run. ALWAYS issues; never joins an existing one. * * `work` receives a handle whose `isLatest()` says whether this run may * still com
web/src/lib/stores/singleFlight.ts:96
↓ 6 callers
Function
runAgentSignup
runAgentSignup runs `pad auth signup` with args and the given --format, returning stdout, stderr and the command's error.
cmd/pad/cmd_auth_agent_signup_test.go:90
↓ 6 callers
Function
runApplierEcho
runApplierEcho spawns a goroutine that reads all incoming TextMessage frames on conn, looks for applier_request, and immediately responds with applier
internal/collab/applier_test.go:17
↓ 6 callers
Function
runAttachmentList
(t *testing.T, stub *deletedListStub, args ...string)
cmd/pad/attachment_list_deleted_test.go:35
↓ 6 callers
Function
runCatchUp
(t *testing.T, rec *catchUpRecorder, format string)
cmd/pad/task4035_catch_up_test.go:61
↓ 6 callers
Function
runMonitor
runMonitor runs the real pad-monitor.sh against a fake pad on PATH. armAfter < 0 means consent never appears; 0 means armed before start.
internal/buildtools/bug4511_monitor_await_consent_test.go:52
↓ 6 callers
Function
runPatch
(t *testing.T, args ...string)
cmd/pad/task3585_patch_retry_test.go:53
↓ 6 callers
Function
runWorkspaceExport
(t *testing.T, handler http.Handler, args ...string)
cmd/pad/bug4833_export_atomic_test.go:12
↓ 6 callers
Method
runWorkspaceRace
(t *testing.T, r workspaceRace, compete bool)
internal/server/handlers_plan_limit_race_test.go:454
↓ 6 callers
Function
scanItems
(rows *sql.Rows)
internal/store/items.go:7112
↓ 6 callers
Function
scanSchedule
(row interface{ Scan(...any) error })
internal/store/schedules.go:394
↓ 6 callers
Function
scanUser
scanUser scans a user row into a User struct. The TOTP secret column is read and discarded: the User struct does not carry it, so no ordinary read can
internal/store/users.go:78
↓ 6 callers
Function
scheduleWithAudience
(audience string)
internal/server/agenda_audience_test.go:56
↓ 6 callers
Function
scopeTestServer
scopeTestServer is an OAuth-capable server whose /mcp transport records what reaches it, with a classifier calling pad_item.create a write.
internal/server/task2308_mcp_scope_test.go:42
↓ 6 callers
Function
searchCmd
--- search ---
cmd/pad/cmd_item.go:4034
↓ 6 callers
Function
searchOne
TASK-4514: matched_in and the snippet choice come from per-column match flags computed in SQL, not from "<mark>" appearing in the snippet text, so sto
internal/store/search_matched_in_test.go:15
↓ 6 callers
Function
seedBackfillWorkspace
(t *testing.T, s *Store, name, ownerID string)
internal/store/oauth_connections_backfill_test.go:52
↓ 6 callers
Function
seedOrphanImage
seedOrphanImage creates an UNATTACHED image original uploaded by uploader, plus its thumb-md variant (unattached too, as upload leaves them), and retu
internal/server/handlers_attachments_attach_test.go:53
↓ 6 callers
Function
seedParentAndChild
(t *testing.T, srv *Server, slug string)
internal/server/handlers_items_parent_ambiguity_test.go:21
↓ 6 callers
Function
seedSnapshotFile
seedSnapshotFile writes content at path and stamps its mtime, so the prune order (newest first by mtime) is fixed by the test rather than by how fast
internal/store/migration_guard_test.go:326
← previous
next →
3,001–3,100 of 31,685, ranked by callers