MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions31,685 in github.com/PerpetualSoftware/pad

↓ 14 callersFunctiondoJSONReq
doJSONReq drives a JSON request through srv and returns the recorder. Mirrors the local pattern in internal/server/server_test.go::doRequest, kept pac
internal/mcp/dispatch_http_routes_test.go:45
↓ 14 callersFunctiondoTransform
(srv *Server, slug, attachmentID string, body transformRequestBody)
internal/server/handlers_attachments_transform_test.go:29
↓ 14 callersFunctionenableTOTPForDeleteUser
enableTOTPForDeleteUser turns on 2FA for a bootstrapped delete-test user using a known secret, mirroring the real SetTOTPSecret → EnableTOTP flow, and
internal/server/handlers_account_test.go:488
↓ 14 callersMethodend
end stops any further keepalive. Called once the transport returns, before mcpBoundWrites joins the keepalive goroutine and itself returns. It is not
internal/server/mcp_stream_keepalive.go:136
↓ 14 callersMethodexec
(t *testing.T, q string, args ...any)
internal/store/schedule_copy_test.go:35
↓ 14 callersMethodfailSent
TASK-4032: a push the gateway accepted whose 'sent' record then fails must not be sent again every lease. The fault is a test-only DB trigger that abo
internal/server/task4032_push_record_failure_test.go:25
↓ 14 callersFunctionfullPreflight
── fixtures ───────────────────────────────────────────────────────────── fullPreflight is a preview where EVERY bucket and EVERY warning is non-trivi
cmd/pad/item_copy_test.go:22
↓ 14 callersMethodgateRows
(t *testing.T)
internal/store/commitment_gates_test.go:36
↓ 14 callersMethodgetSource
getSource performs GET on the source item exactly as the router would and requires a 200. Use rawGetSource when the status is what is under test.
internal/server/item_moved_to_test.go:124
↓ 14 callersMethodinvalidateScheduleReopenTx
(tx *sql.Tx, id string)
internal/store/schedule_reopen.go:148
↓ 14 callersFunctionloaded
(r: ReturnType<typeof mount>)
web/src/lib/components/items/itemDetailIdentityLoad.svelte.test.ts:267
↓ 14 callersFunctionmalformed
(code Code, part, value, detail string)
internal/schedule/errors.go:46
↓ 14 callersFunctionnewNeedsFixture
(t *testing.T)
internal/store/needs_snooze_test.go:23
↓ 14 callersFunctionnewPlanLimitEnv
(t *testing.T)
internal/server/handlers_plan_limit_race_test.go:36
↓ 14 callersFunctionnewVerifiedEmailFixture
(t *testing.T, cloud bool)
internal/server/middleware_verified_email_test.go:46
↓ 14 callersMethodnotifRow
(t *testing.T, id string)
internal/store/task3939_push_dispatch_test.go:29
↓ 14 callersFunctiononeOf
(v string, set []string)
internal/store/schedules.go:106
↓ 14 callersMethodoutstanding
(t *testing.T, item *models.Item)
internal/store/schedule_end_guard_test.go:31
↓ 14 callersFunctionpassThrough
passThrough returns an ActionFn that forwards the input verbatim to the given cmdPath via env.Dispatch. The vast majority of catalog actions use this
internal/mcp/catalog.go:189
↓ 14 callersFunctionrelationIndexFixture
relationIndexFixture returns a workspace with Cars (carrying a `color` relation) and Colors, plus one colour to point at.
internal/store/relation_links_test.go:33
↓ 14 callersFunctionrelease
()
web/src/lib/stores/workspaceRecovery.svelte.test.ts:158
↓ 14 callersFunctionreminderMigrationStore
(t *testing.T, pg bool)
internal/store/reminder_commitment_migration_test.go:12
↓ 14 callersMethodresolveForReopenTest
(t *testing.T, item *models.Item, in ResolveInput, now string)
internal/store/schedule_reopen_test.go:672
↓ 14 callersMethodresolvedRefs
resolvedRefs resolves a share link (optionally with a password header) and returns its attachment_refs map.
internal/server/handlers_share_attachments_test.go:193
↓ 14 callersFunctionresponseTooLargeResult
(cmdKey string, limit int64)
internal/mcp/response_cap.go:102
↓ 14 callersFunctionsend
( request: APIRequestContext, f: Fixture, n: number, body: string, agent?: string )
web/e2e/chat-thread-read.spec.ts:41
↓ 14 callersFunctionsettle
()
web/src/lib/components/items/itemDetailIdentityLoad.svelte.test.ts:195
↓ 14 callersFunctionslugify
slugify converts a string to a URL-friendly slug.
internal/store/store.go:1675
↓ 14 callersFunctionstartBlock
(t *testing.T, b map[string]any)
internal/server/bootstrap_start_test.go:81
↓ 14 callersMethodstartMCPSessionTracker
startMCPSessionTracker constructs both trackers and spawns their sweep goroutines. Called once at startup from SetMCPTransport (alongside startMCPAudi
internal/server/middleware_mcp_session.go:291
↓ 14 callersFunctiontokenPinFrom
tokenPinFrom returns the request's token pin, or nil when the credential is not a workspace-pinned user token (a cookie or CLI session, an OAuth token
internal/server/pinned_token.go:26
↓ 14 callersFunctiontokenScopeAllows
tokenScopeAllows checks if the token's scopes permit the given HTTP method and path. Scopes are stored as a JSON array of strings. Supported scopes (
internal/server/middleware_auth.go:1385
↓ 14 callersFunctionu3cRun
(t *testing.T, srv *httptest.Server, build func() interface { SetArgs([]string) Execute() error }, args ...s
cmd/pad/task3462_u3c_library_builtin_test.go:81
↓ 14 callersFunctionversionBodySHA256
versionBodySHA256 is the body_sha256 of a version standing for body (BUG-3820): hex sha256 of its UTF-8 bytes.
internal/store/items.go:6868
↓ 14 callersFunctionviewerZone
viewerZone is the zone the caller's days are computed in: their users.timezone, else UTC (TASK-4101). A request with no user (an unauthenticated insta
internal/server/viewer_zone.go:13
↓ 14 callersFunctionwaitFor
waitFor polls until cond holds or the deadline passes. Delivery crosses a goroutine and a socket, so a bare read after Publish is a race.
internal/watchevents/redis_bus_integration_test.go:40
↓ 14 callersFunctionwaitForApplierPath
waitForApplierPath blocks until a content PATCH would actually take the applier path, and returns once it would. It asks the routing predicate the ha
internal/server/handlers_collab_applier_refusal_test.go:98
↓ 14 callersFunctionwedge
wedge simulates the failure this whole unit exists to detect: the outbound probe keeps SUCCEEDING and nothing ever comes back. It has to be simulated
internal/events/redis_heartbeat_test.go:116
↓ 14 callersFunctionwriteAppJSON
(w http.ResponseWriter, status int, v any)
internal/server/app_api_read.go:130
↓ 14 callersFunctionwriteRateLimitResponse
writeRateLimitResponse sends a 429 response with Retry-After and X-RateLimit-* headers.
internal/server/middleware_ratelimit.go:1205
↓ 14 callersFunctionwriteRestoreSQLite
Copy a quiescent committed WAL tuple while its scratch connection is open, then close the scratch DB. The fixture itself has no live connection.
cmd/pad/cmd_db_restore_test.go:78
↓ 13 callersMethodAppend
Append writes line plus a newline: the same bytes the caller printed.
internal/cli/chat_seen.go:133
↓ 13 callersMethodApply
Apply walks doc and stamps EnumSource + resolved Enum values on matching args and flags. Resolution failures are silent: the document continues to adv
internal/cmdhelp/dynamic.go:113
↓ 13 callersMethodClaimAccountByProvider
ClaimAccountByProvider is ClaimAccountByVerification for a sign-in provider that vouched for the address (TASK-3351): the provider's verified assertio
internal/store/account_claim.go:134
↓ 13 callersMethodClaimDecisionJobs
ClaimDecisionJobs claims up to limit owed jobs for runner, oldest first, each leased until now+lease. The scan and the claim are separate statements;
internal/store/decisions.go:268
↓ 13 callersFunctionClaimPIDFile
ClaimPIDFile records this process in the PID file and holds the platform's ownership marker for as long as it runs. The returned release drops that ma
internal/cli/server.go:337
↓ 13 callersFunctionDoneFieldKey
DoneFieldKey resolves which field on a collection's schema represents "is this item done?". The resolution is: 1. If CollectionSettings.BoardGroupBy
internal/models/terminal.go:58
↓ 13 callersFunctionExtractItemDecisionLog
(fieldsJSON string)
internal/models/item.go:990
↓ 13 callersMethodGetUserQ
GetUserQ is GetUser parameterized over its executor (see Queryer).
internal/store/users.go:224
↓ 13 callersMethodJSONFieldText
JSONFieldText, JSONFieldEquals and JSONFieldOrder read an item field value by its JSON type, identically on both dialects (BUG-3221; the rule is in di
internal/store/dialect.go:45
↓ 13 callersMethodListCollectionsMinimal
ListCollectionsMinimal returns collection rows populated with just the fields needed for done-detection context and slug lookups: ID, Slug, Schema, Se
internal/store/collections.go:380
↓ 13 callersMethodListItemVerifications
ListItemVerifications returns an item's verdicts, oldest first (created_at, then id). With latestOnly, it returns only the newest row per criterion, w
internal/store/verifications.go:140
↓ 13 callersFunctionListSessions
ListSessions reads every registry record and returns them with a liveness verdict each, newest first. A malformed file is returned as a Malformed reco
internal/cli/session_registry.go:307
↓ 13 callersFunctionNewOfferCache
NewOfferCache returns a cache that reports unavailable until its first successful Refresh.
internal/billing/offer.go:149
↓ 13 callersFunctionNewRefPrefixFixture
(t *testing.T, postgres, identExists bool)
internal/store/storetest/ref_prefix.go:21
↓ 13 callersFunctionParseRule
ParseRule reads an RRULE value (no "RRULE:" prefix) strictly: RFC 5545 3.3.10 grammar, every combination the RFC forbids, and rules that can never pro
internal/schedule/rule.go:69
↓ 13 callersFunctionParseTrustedProxyCIDRs
ParseTrustedProxyCIDRs parses a comma-separated list of CIDRs or bare IPs from the PAD_TRUSTED_PROXIES setting. Bare IPs get /32 (IPv4) or 128 (IPv6).
internal/server/middleware_realip.go:109
↓ 13 callersMethodProvider
Provider returns the fosite.OAuth2Provider that sub-PR C's HTTP handlers will call (NewAuthorizeRequest, NewAccessRequest, WriteAuthorizeResponse, etc
internal/oauth/server.go:311
↓ 13 callersMethodRefresh
Refresh fetches once and returns how long to wait before the next fetch. Successful fetches warn about rejected intervals only when the rejection list
internal/billing/offer.go:169
↓ 13 callersFunctionRegisterCatalog
RegisterCatalog installs the v0.2 catalog tools on srv. Returns the count of tools registered (excluding pad_set_workspace, which the cmdhelp-walk pat
internal/mcp/catalog.go:230
↓ 13 callersFunctionRelativeTime
(t time.Time)
internal/cli/format.go:123
↓ 13 callersFunctionRepair
Repair is the ONE implementation of "make this value satisfy the invariant", and it lives beside the predicate for the same reason the predicate is sh
internal/textguard/repair.go:28
↓ 13 callersMethodResolveLateRelationDefaults
ResolveLateRelationDefaults resolves relation values that appeared in fieldMap only AFTER validation ran — i.e. schema defaults `ValidateFields` injec
internal/store/relation_referents.go:1696
↓ 13 callersFunctionResolveTool
ResolveTool finds an AgentTool by name or alias. Returns nil if not found.
internal/cli/agents.go:152
↓ 13 callersFunctionRewriteBracketsAt
RewriteBracketsAt rewrites every bracket named in `rewrites` in a SINGLE pass over `content`, returning the new content and how many rewrites it appli
internal/links/links.go:303
↓ 13 callersMethodSave
Save writes the registry to disk.
internal/cli/registry.go:67
↓ 13 callersFunctionScheduleMissed
ScheduleMissed counts the occurrences that passed unresolved AFTER the outstanding one: instances whose wall is after O's wall and which have passed f
internal/store/schedule_outstanding.go:75
↓ 13 callersFunctionSessionArmedLocally
SessionArmedLocally reports whether this session has a live explicit ARM (LocalArmOn). Retained for callers that only ask the ON question; the full tr
internal/cli/session_arm_state.go:557
↓ 13 callersFunctionSetWorkspaceTool
SetWorkspaceTool returns the (Tool, Handler) pair for the built-in pad_set_workspace tool. The handler updates state in place. Exposed as a construct
internal/mcp/workspace.go:122
↓ 13 callersMethodString
()
internal/collab/task3574_append_failure_test.go:90
↓ 13 callersMethodSubscriberCount
SubscriberCount returns the number of active subscribers whose itemID matches. Used by the room manager to decide when the active peer count has dropp
internal/collab/memory_bus.go:189
↓ 13 callersFunctionafterCommitReadback
(kind, id string)
internal/store/testing_helpers.go:272
↓ 13 callersFunctionapplierEcho
BUG-2840 half A: this file MEASURED the defect, and now asserts the property that replaced it (PLAN-2975 unit 2). The filing claims that on the APPLI
internal/server/handlers_collab_applier_refusal_test.go:33
↓ 13 callersFunctionassertMoveArm
(t *testing.T, f *schedFixture, sc *models.ItemSchedule, want string)
internal/store/commitment_move_test.go:34
↓ 13 callersFunctionassertRestoreSQLiteValue
(t *testing.T, path, want string)
cmd/pad/cmd_db_restore_test.go:159
↓ 13 callersMethodbuildCommitmentAccess
buildCommitmentAccess runs only for an already admitted workspace. All reads use q, including when a mutation reloads permissions inside its transacti
internal/server/commitment_access.go:45
↓ 13 callersFunctioncaptureUpdateBody
captureUpdateBody runs `item update` against a fake server and returns the decoded PATCH body. The GET is the CLI's own pre-fetch (it resolves the ite
cmd/pad/item_column_fields_test.go:32
↓ 13 callersFunctionchildLinkTypeSQL
childLinkTypeSQL returns a SQL IN clause fragment like "'parent','implements'" for filtering item_links by child relationship types.
internal/store/items.go:30
↓ 13 callersFunctioncollectionSchemaJSONFromFlags
collectionSchemaJSONFromFlags resolves the --schema and --fields flags into a marshaled CollectionSchema JSON string. Exactly one of schemaInput or f
cmd/pad/cmd_collection.go:81
↓ 13 callersFunctioncompensationServer
(t *testing.T)
internal/server/workspace_owner_compensation_test.go:37
↓ 13 callersFunctioncontainsToolText
containsToolText looks for substr in any TextContent block of res. MCP results can carry multiple content blocks; checking all of them keeps the asser
internal/mcp/dispatch_http_test.go:969
↓ 13 callersMethodconvention
(t *testing.T, title, fields, body string)
internal/decision/conventions_test.go:71
↓ 13 callersFunctioncountFor
countFor is the reverse count a viewer who sees everything gets.
internal/store/relation_links_test.go:39
↓ 13 callersMethodcreateActivityQ
createActivityQ is CreateActivity against an executor, so a caller that must commit the activity row together with the row that references it (comment
internal/store/activities.go:73
↓ 13 callersFunctioncreateBulkTestItem
createBulkTestItem creates a task and returns it.
internal/server/handlers_items_bulk_test.go:17
↓ 13 callersFunctioncurrent
()
web/src/lib/stores/workspace.svelte.ts:272
↓ 13 callersFunctiondistinctPNG
distinctPNG returns a valid PNG whose bytes differ per seed, so an assertion on served content can tell one blob from another. The download handler ne
internal/server/handlers_attachments_download_authz_test.go:149
↓ 13 callersMethoddoAs
(t *testing.T, rt capRoute, host, remoteAddr string)
cmd/pad/mcp_capability_test.go:492
↓ 13 callersMethodemitItemEventTx
emitItemEventTx writes one item-subject event to the outbox on the caller's transaction, carrying the post-mutation snapshot. The snapshot must be re
internal/store/event_outbox.go:1074
↓ 13 callersMethodexec
(t *testing.T, q string, args ...any)
internal/store/agent_claim_test.go:56
↓ 13 callersFunctionexecuteSQLiteRestore
(t *testing.T, backup string)
cmd/pad/cmd_db_restore_test.go:172
↓ 13 callersFunctionexpandPath
expandPath substitutes {key} placeholders in template using input. Each placeholder must appear as a non-empty string in input; otherwise expandPath r
internal/mcp/dispatch_http_routes.go:116
↓ 13 callersMethodfireOneReminder
fireOneReminder is the arbiter plus the emission, in one transaction. Returns (nil, nil) when another pass won the row or its item is gone.
internal/store/reminders.go:626
↓ 13 callersFunctionfmtInstant
fmtInstant renders an RFC3339 instant in the viewer's zone (loc overrides it when the caller named one), never the machine's.
cmd/pad/cmd_schedule.go:66
↓ 13 callersMethodformat
(value: unknown)
web/src/lib/collab/materializer/polyfills.ts:138
↓ 13 callersFunctiongroupStatus
(t *testing.T, rr *httptest.ResponseRecorder, want int)
internal/server/handlers_workspace_groups_test.go:45
↓ 13 callersMethodguest
(edit ...int)
internal/server/commitment_graph_entry_test.go:62
↓ 13 callersFunctionimportWithLinks
importWithLinks replaces a bundle's links and imports it.
internal/store/schedule_link_import_test.go:300
↓ 13 callersMethodinvalidate
Supersede every outstanding token without taking a new one.
web/src/lib/attachments/viewFence.ts:145
↓ 13 callersFunctionkindsOf
(entries []models.TimelineEntry)
internal/server/handlers_timeline_structured_test.go:67
← previousnext →1,201–1,300 of 31,685, ranked by callers