MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 21 callersFunctionCrossWorkspaceCollectionScope
CrossWorkspaceCollectionScope scopes the check to one collection — creating into it, or disclosing its schema. Visibility here is FULL-collection-acc
internal/server/authz_cross_workspace.go:358
↓ 21 callersFunctionEnsureServer
EnsureServer checks if the pad server is running; if not, starts it in the background.
internal/cli/server.go:18
↓ 21 callersMethodGetOAuthClient
GetOAuthClient looks up a registered client by ID. Returns ErrOAuthNotFound if no row matches.
internal/store/oauth.go:147
↓ 21 callersFunctionOutstandingInstant
OutstandingInstant is the instant of sc's outstanding occurrence. view is the zone an armed floating schedule is read in; it is ignored otherwise. ok
internal/store/schedule_outstanding.go:50
↓ 21 callersMethodQueryRowContext
(ctx context.Context, query string, args ...any)
internal/store/store.go:995
↓ 21 callersFunctionRegisterSession
RegisterSession records the CURRENT session — owner from the environment (CaptureSessionOwner), the given cwd and agent name — to ~/.pad/sessions/<ses
internal/cli/session_registry.go:244
↓ 21 callersFunctionWithTokenScopes
WithTokenScopes returns ctx decorated with the API token's JSON-encoded scopes string (e.g. `["read"]`, `["*"]`). Stashed by the MCP Bearer middleware
internal/server/context.go:100
↓ 21 callersMethodaccess
(editable ...int)
internal/store/commitment_links_test.go:43
↓ 21 callersMethodappendRows
(t *testing.T, itemID string, rows ...[]byte)
internal/server/materialize_recovery_test.go:131
↓ 21 callersFunctionargsContainPair
(args []string, flag, value string)
internal/mcp/catalog_item_fields_test.go:73
↓ 21 callersFunctionbuildSyntheticTree
buildSyntheticTree returns a small cobra tree exercising the shapes the emitter has to handle: subgroups, leaf commands with positional args, flags of
internal/cmdhelp/json_test.go:26
↓ 21 callersMethodcalOK
(t *testing.T, u *models.User, coll, query string)
internal/server/handlers_calendar_test.go:34
↓ 21 callersMethodcopyOK
copyOK issues the copy as the owner and requires a 201.
internal/server/handlers_items_copy_test.go:94
↓ 21 callersMethodcycleIdleSubscriptions
cycleIdleSubscriptions ends coverage for every workspace whose subscription has received nothing for idleTimeout, and REPLACES that subscription. DRO
internal/events/redis_heartbeat.go:463
↓ 21 callersFunctiondecisionTime
(t time.Time)
internal/store/decisions.go:150
↓ 21 callersFunctiongetOnlyAttachmentID
getOnlyAttachmentID returns the ID of the single live attachment row in a workspace — the test infrastructure uploads at most one blob per call, so th
internal/server/handlers_storage_test.go:418
↓ 21 callersFunctionlapseSchedule
(t *testing.T, f *schedFixture, recurring bool)
internal/store/schedule_lapse_test.go:16
↓ 21 callersFunctionmeAgendaFacts
(t *testing.T, w *agendaWorld, coll, title string)
internal/server/handlers_me_agenda_test.go:63
↓ 21 callersFunctionmount
()
web/src/routes/(console)/agenda/agenda.svelte.test.ts:33
↓ 21 callersFunctionnewBug3133Fixture
(t *testing.T)
internal/server/handlers_items_bug3133_pending_guard_test.go:30
↓ 21 callersFunctionnewCapFixture
newCapFixture builds a store the way an existing install has it — migrated, users present, a workspace, PATs, and NO mcp_enabled row — then a server o
cmd/pad/mcp_capability_test.go:96
↓ 21 callersFunctionnewHeartbeatBus
(t *testing.T, publishHeartbeat bool)
internal/watchevents/heartbeat_test.go:37
↓ 21 callersFunctionnewPatchFixture
(t *testing.T, srv *Server, body string)
internal/server/plan3578_patch_test.go:22
↓ 21 callersFunctionnewTestClient
Tests for the OAuth 2.1 storage layer (PLAN-943 TASK-951 sub-PR A). The store layer is fosite-agnostic by design — sub-PR B introduces the fosite impo
internal/store/oauth_test.go:23
↓ 21 callersMethodorigin
()
internal/server/handlers_apps_install_test.go:116
↓ 21 callersFunctionrenegotiateRows
Capture complete rows, including timestamps and IDs, to detect any write.
internal/store/commitment_renegotiate_test.go:15
↓ 21 callersFunctionsetupRBACEnv
(t *testing.T)
internal/server/handlers_rbac_test.go:24
↓ 21 callersFunctiontask3408Fixture
task3408Fixture: an active install with one companion collection and a released hook subscribed to item.created on it.
internal/store/task3408_delivery_test.go:26
↓ 21 callersFunctionwatchNotificationVisible
watchNotificationVisible decides whether a Notification should be delivered to a caller holding the given watch map. Extracted from the handler so the
internal/server/handlers_watch_events.go:752
↓ 20 callersFunctionCollectionTracksWorkJSON
CollectionTracksWorkJSON is CollectionTracksWork over the stored settings JSON. Unparseable settings count as work (today's behaviour).
internal/models/tracks_work.go:29
↓ 20 callersMethodGetDocument
(id string)
internal/store/documents.go:222
↓ 20 callersMethodMigrateRelationReferents
MigrateRelationReferents is the ONE decision the four migrate doors share (PLAN-2857 U1 / TASK-2878). Same-workspace move, bulk move, cross-workspace
internal/store/relation_referents.go:1229
↓ 20 callersFunctionNewRegistry
NewRegistry returns an empty registry.
internal/attachments/registry.go:26
↓ 20 callersMethodPublish
Publish broadcasts an event to every subscriber whose itemID matches event.ItemID. Non-blocking: a full subscriber channel drops the event with a warn
internal/collab/bus.go:127
↓ 20 callersMethodRemapAttachmentReferencesInWorkspace
RemapAttachmentReferencesInWorkspace rewrites every "pad-attachment:OLD" reference in items.content + items.fields, in comment bodies (BUG-2615) AND i
internal/store/attachments_remap.go:175
↓ 20 callersMethodResolveRelationReferents
ResolveRelationReferents canonicalises every `relation` value in fieldMap to the target item's ID and reports the ones that cannot be resolved. It MU
internal/store/relation_referents.go:207
↓ 20 callersMethodSetForecast
SetForecast stores the schedule's forecast, replacing the current one, and appends a history event. It touches no role, override or reminder row, so a
internal/store/milestone.go:75
↓ 20 callersFunctionappendFrame
(t *testing.T, s *store.Store, itemID string, frame []byte)
internal/store/bug3124_content_bearing_test.go:60
↓ 20 callersFunctionarmViaAPI
(t *testing.T, srv *Server, wsSlug string, item models.Item, at string)
internal/server/handlers_reminders_test.go:22
↓ 20 callersMethodbearerHeaders
()
internal/server/handlers_items_test.go:2625
↓ 20 callersMethodcheckItemVisible
checkItemVisible is the context-free visibility decision. Returns (true, nil) when the (user, role) pair can see `item` under the same rules `requireI
internal/server/server.go:3714
↓ 20 callersMethodcomment
comment adds a comment by u (nil: no user) with createdBy, stamped at `at` so same-second cases are exact rather than timing-dependent.
internal/store/needs_snooze_test.go:47
↓ 20 callersFunctionderef
(p *string)
internal/store/schedule_fire_test.go:1055
↓ 20 callersMethodensureRouter
ensureRouter lazily initializes the router on first use, so all Set* configuration is applied before the middleware chain is built.
internal/server/server.go:2819
↓ 20 callersFunctionerrStructured
errStructured wraps a Go error into the standard MCP tool-error envelope (TASK-1077) with a stable identifier prefix (e.g. "pad_item.link"). Local hel
internal/mcp/catalog_item.go:754
↓ 20 callersFunctiongroupRequest
(s *Server, u *models.User, method, path, body string, mods ...func(context.Context) context.Context)
internal/server/handlers_workspace_groups_test.go:28
↓ 20 callersFunctionmcpAndOAuthEnabledTestServer
===================================================================== mcp ↔ OAuth integration (sub-PR E, TASK-1027) ==================================
internal/server/handlers_mcp_test.go:505
↓ 20 callersFunctionmount
(unread: number, props: Record<string, unknown> = {})
web/src/lib/components/chat/ChatLink.svelte.test.ts:38
↓ 20 callersFunctionmultiDefaultSchema
A `multi_relation` DEFAULT, and `required` on one (PLAN-2857 U4) Both were the same defect in two places: a gate reading `def.Type != "relation"`. `V
internal/store/relation_multi_defaults_test.go:17
↓ 20 callersFunctionmustJob
(t *testing.T, s *Store, itemID, set string)
internal/store/decisions_test.go:33
↓ 20 callersMethodrestrictedEditor
--- authorization: the four checks, in order -------------------------- restrictedEditor returns an editor in both workspaces whose membership in each
internal/server/handlers_items_copy_preflight_test.go:668
↓ 20 callersMethodseedImage
seedImage creates an image original anchored to itemID plus its thumb-md variant, each with distinct bytes, and returns (originalID, thumbMdBytes).
internal/server/handlers_share_attachments_test.go:156
↓ 20 callersFunctionseedParentAndChildren
seedParentAndChildren creates a plan + N child tasks with the given statuses (one per child), returning the parent and the slice of child refs in crea
internal/server/handlers_items_open_children_guard_test.go:24
↓ 20 callersMethodstoredRelation
storedRelation reads owner_ref back out of the database. Deliberately not the response body: a handler that echoed the right thing while writing the w
internal/server/relation_referents_doors_test.go:142
↓ 20 callersMethodupdateScheduleAt
(workspaceID, itemID string, upd models.ScheduleUpdate, nowT time.Time)
internal/store/schedules.go:722
↓ 20 callersFunctionwriteOutboxTx
writeOutboxTx appends one canonical event to the outbox on the caller's transaction. Two rejections, both deliberately hard errors that fail the encl
internal/store/event_outbox.go:390
↓ 19 callersFunctionCaptureWrites
CaptureWrites runs fn and returns every table write it caused, as the DATABASE saw it, triggers included (SPEC-6 §4, TASK-3388). It is the app store's
internal/store/storetest/writecapture.go:44
↓ 19 callersMethodCreateAuthorizationCode
============================================================ Authorization codes (handler/oauth2/storage.go AuthorizeCodeStorage) ====================
internal/store/oauth.go:283
↓ 19 callersMethodCreateEmailVerification
CreateEmailVerification generates an email-verification token for the given user. Returns the plaintext token (to embed in the verification URL). The
internal/store/email_verification.go:29
↓ 19 callersMethodCreateRefreshToken
============================================================ Refresh tokens (handler/oauth2/storage.go RefreshTokenStorage) ==========================
internal/store/oauth.go:370
↓ 19 callersMethodError
()
internal/attachments/mime.go:502
↓ 19 callersMethodGetItemLinks
GetItemLinks returns links where the given item is either source or target. Links pointing to or from soft-deleted items, or items in a soft-deleted c
internal/store/items.go:4398
↓ 19 callersMethodGetOAuthConnection
GetOAuthConnection fetches the connection row by request_id. Returns ErrOAuthConnectionNotFound if no row exists; any other error is a real I/O failur
internal/store/oauth_connections.go:107
↓ 19 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:128
↓ 19 callersMethodRunOnce
RunOnce evaluates up to limit owed jobs, CLAIMING ONE AT A TIME, and returns how many it claimed. One at a time so that each job's lease starts when
internal/decision/runner.go:1037
↓ 19 callersMethodSchemaVersion
SchemaVersion is the collab schema version the bundle was built with.
internal/materialize/materialize.go:139
↓ 19 callersMethodUntil
Until set a new UNTIL for the rule and recalculates the timeset if needed. It will be truncated to second precision. Default to `Dtstart.Add(time.Dura
internal/schedule/internal/rrule/rrule.go:998
↓ 19 callersFunctionWriteDisarmState
WriteDisarmState writes a session-scoped explicit-OFF marker (PLAN-2613 S3): the session withdraws consent for its remaining life, beating a repo's au
internal/cli/session_arm_state.go:206
↓ 19 callersFunction__resetViewerBackdropForTests
()
web/src/lib/a11y/viewerBackdrop.ts:496
↓ 19 callersFunctionassertAllowed
(t *testing.T, got CrossWorkspaceAccess, label string)
internal/server/authz_cross_workspace_test.go:186
↓ 19 callersFunctionbundleObject
(t *testing.T, v any)
internal/store/commitment_bundle_v2_test.go:14
↓ 19 callersMethodcallAs
callAs is `call` with an explicit user and workspace role, for the legs that need someone other than the fixture owner.
internal/server/relation_referents_doors_test.go:631
↓ 19 callersFunctioncaptureLogs
(t *testing.T)
internal/server/workspace_owner_compensation_test.go:64
↓ 19 callersFunctionchatSend
(t *testing.T, s *Store, convID string, author models.ConversationActor, body, opKey string, replyTo *int64)
internal/store/conversations_test.go:31
↓ 19 callersFunctioncount
(t *testing.T, srv *Server, query string, args ...any)
internal/server/bug3382_verify_claim_test.go:100
↓ 19 callersFunctioncsrfCookieName
csrfCookieName returns the CSRF cookie name. Uses the same __Host- prefix strategy as the session cookie.
internal/server/handlers_auth.go:59
↓ 19 callersFunctiondecodeAttributionBody
(t *testing.T, rr *httptest.ResponseRecorder, out any)
internal/server/handlers_items_attribution_test.go:129
↓ 19 callersMethoddown
Press a finger down at (x, y); sends `touchStart` with the full active set.
web/e2e/lib/attachment-viewer.ts:383
↓ 19 callersFunctionequalSlice
equalSlice is a small helper for stable []string comparison; kept here so test files across the package can share it. catalog_test.go has equalString
internal/mcp/registry_test.go:189
↓ 19 callersMethodfanOutFromRedis
fanOutFromRedis is the receive path: a message that arrived on the subscription identified by gen, carrying the ID space it belongs to. A zero epoch
internal/events/redis_bus.go:2710
↓ 19 callersFunctionfilterAttention
filterAttention returns attention items of a given type.
internal/server/handlers_dashboard_test.go:1278
↓ 19 callersMethodgetScheduleQ
(q Queryer, workspaceID, itemID string, lock bool)
internal/store/schedules.go:419
↓ 19 callersMethodinsert
(t *testing.T, id, body, source string, parent any)
internal/store/task3391_comments_rebuild_test.go:32
↓ 19 callersFunctionlinkObject
linkObject is one bundle link, for bundles edited by hand.
internal/store/schedule_link_import_test.go:285
↓ 19 callersMethodlogAuditEventForUser
logAuditEventForUser logs an audit event with an explicit user ID. Use this when the user isn't (yet) in the request context, e.g. after a successful
internal/server/handlers_documents.go:476
↓ 19 callersFunctionmeAgendaGet
(t *testing.T, w *agendaWorld, u *models.User, query string, mods ...func(context.Context) context.Context)
internal/server/handlers_me_agenda_test.go:19
↓ 19 callersFunctionnewGCClaimFixture
(t *testing.T)
internal/store/attachments_gc_claim_test.go:23
↓ 19 callersFunctionnewSeededMonitorChat
(f *fakeChatSink, printed *recentSet)
cmd/pad/cmd_watch_chat_test.go:655
↓ 19 callersMethodopenedAt
(t *testing.T, gateID string)
internal/store/commitment_gates_outcome_test.go:64
↓ 19 callersMethodregister
register adds a live connection under its user and workspace (either may be empty: a legacy workspace-token stream has no user, and the watch stream s
internal/server/access_kick.go:61
↓ 19 callersFunctionstr
(p *string)
internal/store/commitment_c1_test.go:73
↓ 19 callersFunctionwithWorkspace
(in map[string]any)
internal/mcp/task4105_schedule_test.go:184
↓ 18 callersMethodApplyExternalContent
ApplyExternalContent routes an external content update through a designated applier when an active room exists. Returns nil on success; one of the sen
internal/collab/applier.go:464
↓ 18 callersMethodClaimPendingNotifications
ClaimPendingNotifications claims up to limit pending rows for token: rows at least as old as settleCutoff (so a burst settles before it is pushed) and
internal/store/push_dispatch.go:143
↓ 18 callersFunctionCompile
Compile validates the whole Spec. Every refusal is a *MalformedError, and no text from the expansion library can reach the caller.
internal/schedule/spec.go:57
↓ 18 callersFunctionCrossWorkspaceWorkspaceOnlyScope
CrossWorkspaceWorkspaceOnlyScope requests a WORKSPACE-LEVEL CHECK ONLY, which is almost never sufficient on its own. It answers "does this caller hav
internal/server/authz_cross_workspace.go:378
↓ 18 callersMethodDisableUserLeavingCredentialsForTesting
DisableUserLeavingCredentialsForTesting sets disabled_at without revoking anything and without the last-admin guard: the state a disable made before B
internal/store/testing_helpers.go:319
↓ 18 callersMethodGetMemberCollectionAccess
GetMemberCollectionAccess returns the collection IDs a member has been explicitly granted access to (only meaningful when collection_access = "specifi
internal/store/workspace_members.go:701
↓ 18 callersMethodGetOAuthConnectionAccess
GetOAuthConnectionAccess is the hot-path projection used by the MCP introspection middleware. Runs at most two cheap indexed queries (one PK lookup, o
internal/store/oauth_connections.go:152
↓ 18 callersMethodHasElectableApplier
HasElectableApplier reports whether an external content update for itemID would, at this instant, route through a designated applier rather than fall
internal/collab/applier.go:595
← previousnext →701–800 of 28,840, ranked by callers