MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 3 callersMethodresolvePlaybook
resolvePlaybook finds a playbook by either its invocation_slug, its item slug, or its issue ref. invocation_slug takes precedence — that's the user-fa
internal/server/handlers_playbooks.go:649
↓ 3 callersMethodresolveReminderForWrite
resolveReminderForWrite resolves {reminderID} and enforces edit permission on the ITEM the reminder hangs off. PERMISSION IS THE ITEM'S, not the remi
internal/server/handlers_reminders.go:344
↓ 3 callersMethodresolveRemoteCaller
resolveRemoteCaller applies the precedence: a modern request's own _meta clientInfo, then the legacy session's remembered clientInfo, then nothing.
internal/mcp/client_identity.go:200
↓ 3 callersFunctionresolveRowWrite
( stored: ItemIndexRow | undefined, tombstone: Tombstone | undefined, incoming: ItemIndexRow, )
web/src/lib/stores/itemRowMerge.ts:109
↓ 3 callersFunctionresolveSQLiteDBPath
resolveSQLiteDBPath returns the SQLite database path using the SAME precedence the server uses (PAD_DB_PATH > PAD_DATA_DIR/pad.db > ~/.pad/pad.db), vi
cmd/pad/cmd_db.go:54
↓ 3 callersFunctionresolveShareWithPassword
resolveShareWithPassword issues an anonymous GET /api/v1/s/{token} from the given source IP with the password supplied via the X-Share-Password header
internal/server/handlers_share_links_bruteforce_test.go:16
↓ 3 callersFunctionresolver
(m: AttachmentMeta)
web/src/lib/markdown/attachmentEmbedDecision.test.ts:95
↓ 3 callersFunctionresourceCmdKey
resourceCmdKey identifies the pad command from the positional tokens of a resource-fetch arg vector. The resource handlers in resources.go are the onl
internal/mcp/resources_http.go:339
↓ 3 callersFunctionresourceHTTPError
resourceHTTPError renders a non-2xx in-process response as a Go error, trimming the body so an oversized error page can't blow up the message.
internal/mcp/resources_http.go:325
↓ 3 callersFunctionrespond
(status: number, date: string | null, body: unknown)
web/src/lib/api/serverClockWiring.test.ts:18
↓ 3 callersMethodrestoreBulk
(items ...*models.Item)
internal/server/handlers_restore_plan_limit_test.go:67
↓ 3 callersMethodrestoreCollection
(t *testing.T)
internal/server/bug3635_share_archived_target_test.go:30
↓ 3 callersFunctionrestoreEdits
(d: { markdown: string; baseBody: string; baseStale?: true })
web/src/lib/items/draftPatch.ts:136
↓ 3 callersFunctionresultOf
resultOf extracts a response's `result`, with serverInfo.version replaced by a placeholder. The rest of the bytes are passed through untouched.
cmd/pad/mcp_wire_golden_test.go:134
↓ 3 callersFunctionresultsFor
--- the retry matrix ---
internal/server/task3939b2a_push_test.go:217
↓ 3 callersMethodresumeGap
()
internal/watchevents/observer.go:181
↓ 3 callersFunctionresyncProjectionScope
( ws: string, state: WorkspaceState, // The epoch the SERVER most recently told this caller, when the calle
web/src/lib/stores/localIndex.svelte.ts:957
↓ 3 callersFunctionretargetRelationsInSchemaJSON
retargetRelationsInSchemaJSON rewrites `collection` on every `relation` field in a raw schema document, preserving every other property including ones
internal/store/collections.go:1606
↓ 3 callersMethodretirePendingLocked
retirePendingLocked removes an establishment record if it is still the current one. Callers must hold b.mu. The identity check matters: a record we a
internal/events/redis_bus.go:2009
↓ 3 callersMethodretryOnDeadlockCtx
retryOnDeadlockCtx is retryOnDeadlock that stops retrying once ctx is done: the attempt's own error is returned, and the backoff sleep ends early (TAS
internal/store/deadlock_retry.go:51
↓ 3 callersMethodrevalidateIfSchemaMovedTx
BUG-3407: an item write is validated against its collection's schema in the handler, BEFORE the store takes the workspace seq lock. A schema change th
internal/store/items_revalidate.go:38
↓ 3 callersFunctionreviewsCollection
BUG-2347: a collection's own `abandoned_options` decides which terminal values close WITHOUT delivering. The live instance: plans declare terminal_opt
internal/server/handlers_changelog_abandoned_test.go:15
↓ 3 callersFunctionrfcInt
rfcInt reads RFC 5545 3.3.10 integers. Check the whole grammar before conversion so a malformed suffix remains syntax even after huge digits. maxDigit
internal/schedule/rule.go:157
↓ 3 callersMethodrichLinks
richLinks writes the links and overrides every round-trip test starts from: a civil link and an elapsed one with a cancel policy, both with overrides.
internal/store/schedule_link_carry_test.go:64
↓ 3 callersFunctionrl3310Exhaust
rl3310Exhaust sends path until it draws a 429, failing the test if 200 requests never do.
internal/server/middleware_ratelimit_bug3310_test.go:30
↓ 3 callersFunctionroleConfigured
roleConfigured reports whether a schedule's roles include role.
internal/store/commitment_links.go:491
↓ 3 callersFunctionroleLevel
roleLevel returns a numeric level for role comparison. Higher values indicate more permissions.
internal/server/middleware_auth.go:985
↓ 3 callersFunctionroleMarkers
(entries: AgendaEntry[], zone: string, forecasts: AgendaForecast[] = [], nextFrom?: string)
web/src/lib/calendar/presentation.ts:463
↓ 3 callersFunctionroleOffsetsOf
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/commitment_role_offsets_test.go:28
↓ 3 callersFunctionrollupPresence
( conversationAgentKeys: readonly string[], sessions: readonly LiveSession[] | 'unavailable' )
web/src/lib/chat/presence.ts:62
↓ 3 callersFunctionrotateWithBearer
BUG-3978: a credential change rotates the caller's session, and the replacement keeps the replaced session's own sliding window. It used to be minted
internal/server/bug3978_rotation_ttl_test.go:20
↓ 3 callersFunctionrow
(id: string, seq: number, collection = 'kept')
web/src/lib/stores/localIndexResyncSettled.svelte.test.ts:45
↓ 3 callersFunctionrow
(page: Page, seq: number)
web/e2e/chat-thread-write.spec.ts:75
↓ 3 callersMethodrow
(t *testing.T, id string)
internal/store/convention_role_backfill_test.go:65
↓ 3 callersFunctionrowIDs
(rows []*needs.Row)
internal/server/needs_scorers.go:145
↓ 3 callersFunctionrtProbe
rtProbe creates the scratch table the bound tests write to.
internal/store/runtime_pool_test.go:81
↓ 3 callersFunctionrtServer
(s string)
internal/server/handlers_agenda_test.go:685
↓ 3 callersFunctionrun
(key: K, work: (run: SingleFlightRun) => Promise<void>)
web/src/lib/stores/singleFlight.ts:124
↓ 3 callersFunctionrunBrowserSetup
runBrowserSetup drives the browser-based first-admin bootstrap and the CLI authorization in a SINGLE browser handoff. Before printing anything it crea
cmd/pad/cmd_auth.go:156
↓ 3 callersFunctionrunConfigureFlow
(cfg *config.Config, values configureValues)
cmd/pad/configure.go:108
↓ 3 callersMethodrunDisconnectCleanup
* Cleanup shared by `onClose` and the paths that bypass it via * `closeSocket()` (which removes the close listener before calling * `ws.close()`):
web/src/lib/collab/wsProvider.svelte.ts:758
↓ 3 callersFunctionrunHandshake
runHandshake spins up srv against in-memory pipes, drives the MCP client's Initialize, and returns the result + a cleanup that tears the goroutine dow
internal/mcp/server_test.go:191
↓ 3 callersFunctionrunHeadlessSetup
runHeadlessSetup drives the output layer for `pad auth setup --email …`. It delegates the actual work to doHeadlessBootstrap and then prints the resul
cmd/pad/cmd_auth.go:282
↓ 3 callersFunctionrunHeals
Run the queued heals; the pathnames of those that reported a navigation. Sync unless one returned a promise.
web/src/lib/stores/chatSurface.svelte.ts:97
↓ 3 callersFunctionrunNote
(t *testing.T, args ...string)
cmd/pad/task3585_append_retry_test.go:49
↓ 3 callersFunctionrunNoteAgainst
(t *testing.T, stub *appendStub, decide bool)
cmd/pad/notes_append_gate_test.go:84
↓ 3 callersMethodrunOpenChildrenGuard
runOpenChildrenGuard executes the guard logic inside the store-layer transaction. Returns: - (nil, nil) when the guard doesn't apply (no transition,
internal/server/handlers_items_open_children_guard.go:157
↓ 3 callersMethodrunPushDispatchTick
runPushDispatchTick is one pass. ctx is the shutdown signal.
internal/server/push_dispatch.go:494
↓ 3 callersFunctionrunRecorded
runRecorded runs CaptureWrites under a recorder and returns its fatal message, or "" if the capture completed.
internal/store/storetest/writecapture_test.go:183
↓ 3 callersFunctionrunSessionExpiryKeepers
()
web/src/lib/stores/sessionExpiryKeep.ts:26
↓ 3 callersFunctionsafeLocalFilename
safeLocalFilename reduces a SERVER-SUPPLIED filename to something safe to join onto a local directory. The name in Content-Disposition originates wit
cmd/pad/cmd_attachment.go:299
↓ 3 callersFunctionsameSchedItems
(t *testing.T, what string, got []AgendaSchedule, want ...*models.Item)
internal/store/schedule_calendar_test.go:73
↓ 3 callersFunctionsameSet
(a, b []string)
internal/store/bug3686_list_search_test.go:29
↓ 3 callersFunctionsameWriter
(a: HistoryWho, b: HistoryWho)
web/src/lib/components/timeline/historyEvents.ts:142
↓ 3 callersFunctionsanitizeSessionLabel
sanitizeSessionLabel makes a client-supplied label safe to store and hand to a UI: printable characters only, collapsed whitespace, truncated to maxSe
internal/server/session_identity.go:116
↓ 3 callersFunctionsavePending
(userId: string, n: number, op_key: string, body: string, reply_seq: number | null = null)
web/src/lib/chat/chatRecords.ts:75
↓ 3 callersFunctionscanAPIToken
scanAPIToken scans an API token from a row scanner.
internal/store/api_tokens.go:436
↓ 3 callersMethodscanAttachmentsInto
scanAttachmentsInto runs a query returning attachmentColumns and hands each row to visit.
internal/store/attachments_copy_plan.go:733
↓ 3 callersMethodscanCollectionRow
scanCollectionRow reads one collection row through q and hydrates the model. The WHERE predicate is the only per-caller difference — scope and deleted
internal/store/collections.go:258
↓ 3 callersFunctionscanComments
(rows *sql.Rows)
internal/store/comments.go:408
↓ 3 callersFunctionscanConversation
(row rowScanner)
internal/store/conversations.go:171
↓ 3 callersFunctionscanItemDecisions
(rows *sql.Rows)
internal/store/decisions.go:812
↓ 3 callersFunctionscanMCPAuditRows
scanMCPAuditRows is the shared row-decoder for every list method. Pulls out the nullable workspace_id + error_kind into *string, parses the timestamp,
internal/store/mcp_audit.go:303
↓ 3 callersMethodsched
sched makes an item with a daily schedule in coll (the fixture's collection when nil), with the given status, and records its 1 October occurrence as
internal/store/schedule_calendar_test.go:39
↓ 3 callersMethodscheduleReconnect
()
web/src/lib/collab/wsProvider.svelte.ts:1483
↓ 3 callersMethodscheduleReq
scheduleReq builds a schedule request the way the router would, for a handler called directly.
internal/server/handlers_items_copy_schedule_test.go:287
↓ 3 callersFunctionschemaFields
Schema fields for the done-field resolvers below, validated in ONE place. * * Stored JSON can be valid and still mistyped (`{"fields":null}`, a null
web/src/lib/types/index.ts:3311
↓ 3 callersMethodscope
()
web/src/test/identityFenceAst.ts:1116
↓ 3 callersFunctionscriptFns
scriptFns runs prog after the script's own numeric, pid_file_pid, pid_liveness and pid_file_removable, extracted with sed: the rest of the script neve
internal/buildtools/bug4068_pidfile_test.go:150
↓ 3 callersFunctionsearch
* Synchronous ranked search. Returns at most `opts.limit` (default 50) * id+score pairs ordered by descending score. Empty / whitespace * queries
web/src/lib/stores/localSearch.svelte.ts:560
↓ 3 callersMethodsearchMatches
searchMatches builds one row per item before sorting, paging, counting or faceting, without computing snippets. Materialization keeps SQLite ranks in
internal/store/search.go:288
↓ 3 callersMethodsearchSlugs
(tok, path string)
internal/server/bug3982_pinned_token_test.go:78
↓ 3 callersFunctionsection
(label, extra)
plugin/hooks/register.js:546
↓ 3 callersFunctionseedAuditRow
MCP audit handler tests (PLAN-943 TASK-960). Two endpoints: - GET /api/v1/connected-apps/{id}/audit — owner-scoped per-connection. - GET /api/v1/ad
internal/server/handlers_mcp_audit_test.go:32
↓ 3 callersMethodseedCandidates
seedCandidates makes n open items answered for needs_human_decision only and clears the jobs their creation owed.
internal/decision/effort_backfill_test.go:104
↓ 3 callersFunctionseedCollection
(t *testing.T, s *store.Store)
internal/store/storetest/writecapture_test.go:26
↓ 3 callersFunctionseedExisting
seedExisting sets an existing item's stored body directly; false on Postgres for a body that is not valid UTF-8 (refused, as seedItemBody).
internal/store/bug3839_invalid_utf8_version_test.go:309
↓ 3 callersFunctionseedFullWorkspace
seedFullWorkspace inserts one row into every workspace-scoped child table so a purge can be proven exhaustive. Raw inserts deliberately omit columns t
internal/store/workspace_purge_test.go:80
↓ 3 callersFunctionseedPLAN3114Tail
seedPLAN3114Tail reproduces the measured sequence: a tab connects (step1), sends the full state (U), flushes — the watermark lands on U — and then rec
internal/store/bug3124_content_bearing_test.go:86
↓ 3 callersMethodseedRawOriginal
seedRawOriginal stores body under mime, anchored to itemID, WITHOUT any derived variant — the legacy shape the lazy-derive path backfills. Unlike putB
internal/server/handlers_share_attachments_derive_test.go:49
↓ 3 callersFunctionseedReadActivities
BUG-2765. The timeline over-fetches per source and drops rows that cannot render, so a page can carry fewer entries than the rows it consumed — or non
internal/server/handlers_timeline_cursor_test.go:21
↓ 3 callersMethodseedSent
seedSent writes n rows for u that were pushed ago ago.
internal/server/task3939b2a_push_test.go:30
↓ 3 callersFunctionseedVerifiedSpec
TASK-3617 r4 F1: verifications travel with the workspace. A verdict is user-written evidence that nothing can rebuild, so an export/import that droppe
internal/store/task3617_verifications_export_test.go:23
↓ 3 callersFunctionseedWorkspaceActivities
BUG-2781: the activity feeds page by a (created_at, id) keyset cursor.
internal/server/activity_cursor_test.go:14
↓ 3 callersMethodsendChunk
sendChunk sends one chunk of whole units and settles it immediately. Per message: sent keeps the device; invalid_token deletes it (the only result tha
internal/server/push_dispatch.go:706
↓ 3 callersFunctionseqFromCursor
* Decode a cursor string to its numeric `seq` for tombstone stamping. Cursors * are decimal-encoded seq values; a non-numeric / empty cursor decodes
web/src/lib/stores/localIndexPersistence.ts:211
↓ 3 callersMethodseqRepairList
()
internal/events/observer_test.go:71
↓ 3 callersFunctionseqs
()
web/src/lib/stores/chatThread.svelte.test.ts:161
↓ 3 callersMethodserve
serve builds an authed in-process request (reusing the dispatcher's scope/consent/verified-email perimeter) and runs it through the handler.
internal/mcp/resources_http.go:304
↓ 3 callersMethodserve
serve sends req as the browser would: on a self-host, to the configured origin's host (requireConfiguredHost refuses any other).
internal/server/task3399_delegated_flow_test.go:58
↓ 3 callersFunctionserveItemWithUnreadableNotes
serveItemWithUnreadableNotes stands up the fake server for the refusal tests: the GET returns the exact defect shape (the entries array stored as a JS
cmd/pad/item_reserved_field_test.go:74
↓ 3 callersMethodsession
(t *testing.T, u *models.User)
internal/server/task3615_catch_up_test.go:68
↓ 3 callersFunctionsessionActivityCmd
sessionActivityCmd is hook plumbing: no prompting, server startup or output. A missed activity update must never fail a Claude Code hook.
cmd/pad/cmd_session.go:838
↓ 3 callersFunctionsessionActivityRegistry
(t *testing.T)
cmd/pad/session_activity_detach_test.go:107
↓ 3 callersFunctionsessionCmd
sessionCmd groups the local session-registry verbs (register / list / prune — TASK-2533, TASK-2767) and the arm/disarm/status consent verbs (PLAN-2613
cmd/pad/cmd_session.go:24
↓ 3 callersFunctionsessionDisarmCmd
sessionDisarmCmd is `pad session disarm` (PLAN-2613 S3, TASK-2618): the withdrawal verb. It writes a session-scoped explicit-OFF marker (NOT a file re
cmd/pad/cmd_session.go:466
↓ 3 callersFunctionsessionExpiry
(t *testing.T, srv *Server, token string)
internal/server/task3975_cli_token_lifetime_test.go:25
↓ 3 callersMethodsessionMCP
sessionMCP computes sessionMCPState from ONE read of the setting, so a concurrent toggle cannot produce a payload whose four fields disagree (a URL wi
internal/server/handlers_admin_mcp.go:117
↓ 3 callersFunctionsessionResetCmd
sessionResetCmd is `pad session reset` (BUG-2771): remove this session's arm-state file outright, so auto_arm decides again. Arm and disarm both WRITE
cmd/pad/cmd_session.go:534
↓ 3 callersFunctionsessionRowsFor
BUG-3232: an admin creating another user's account is not signing in as them, so the admin-created register path mints no session: no token in the bod
internal/server/handlers_auth_admin_register_test.go:16
← previousnext →5,601–5,700 of 28,840, ranked by callers