MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 7 callersFunctionwithAppContextForTest
(r *http.Request, ac *appContext)
internal/server/task3401_app_api_test.go:668
↓ 7 callersFunctionwithClosedStdin
withClosedStdin replaces os.Stdin with a pipe whose write end is already closed, so term.IsTerminal(stdin) is false and any read hits EOF immediately
cmd/pad/workspace_init_noninteractive_test.go:46
↓ 7 callersMethodwithTokenPin
withTokenPin confines ctx to the workspace a user-owned token is pinned to. It records the pin, and sets the one-slug allow-list [workspace slug] that
internal/server/pinned_token.go:40
↓ 7 callersFunctionwithUndecodableManifest
BUG-2709 (the parent filing of the husk class): the bundle import's mid-stream KEEP path. When a plain, non-validation error fires after pad-export.js
internal/server/handlers_import_bundle_partial_test.go:46
↓ 7 callersFunctionwrapItemNotFound
wrapItemNotFound rewrites a bare "not_found" APIError from the item-by-ref endpoints into a message that echoes the failing ref and workspace, so `pad
internal/cli/client.go:713
↓ 7 callersFunctionwrite
(key: string, value: string | null)
web/src/lib/chat/chatRecords.ts:31
↓ 7 callersFunctionwriteAppNotFound
(w http.ResponseWriter, what string)
internal/server/app_api_read.go:135
↓ 7 callersFunctionwriteAppUnauthorized
(w http.ResponseWriter)
internal/server/app_api.go:251
↓ 7 callersFunctionwriteBusy
writeBusy answers a request the database was too busy for (a statement, lock or idle timeout, a deadlock: store.IsDBBusy; or a client-side interruptio
internal/server/server.go:2959
↓ 7 callersFunctionwriteReminderManaged
writeReminderManaged answers 409 reminder_managed. scheduleID is "" when the caller only has the store's refusal (a caller that skipped the door).
internal/server/handlers_reminders.go:408
↓ 7 callersFunctionwriteSkill
writeSkill writes a tool's /pad skill through cli.WriteSkill, the one door that keeps an edited skill and refuses to downgrade a newer one (BUG-3466),
cmd/pad/skill_write.go:17
↓ 7 callersFunctionwriteWorkspaceGroupError
(w http.ResponseWriter, err error)
internal/server/handlers_workspace_groups.go:48
↓ 6 callersMethod#cancelRetry
()
web/src/lib/stores/chat.svelte.ts:159
↓ 6 callersMethod#enqueue
(current: () => boolean, run: () => Promise<void>)
web/src/lib/stores/chatThread.svelte.ts:297
↓ 6 callersMethod#list
* Every list read goes through here. The page's refs are absorbed only while * `current` holds, so a page that resolves after a reopen, a dispose or
web/src/lib/stores/chatThread.svelte.ts:214
↓ 6 callersMethodAdoptLegacyBuiltins
AdoptLegacyBuiltins gives items made before built-in origins were recorded (TASK-3462 U4) the origin their exact title names, with no seed version, so
internal/store/builtin_legacy.go:44
↓ 6 callersMethodAgendaOutstanding
AgendaOutstanding reads one outstanding occurrence without a calendar window. It shares the same role resolver with ExpandAgendaCut, never a recurrenc
internal/store/agenda_roles.go:95
↓ 6 callersMethodAllowedAudience
AllowedAudience returns the canonical resource URL the server is configured to accept. Sub-PR C's /authorize handler reads this to reject mismatched `
internal/oauth/server.go:327
↓ 6 callersMethodAppPrincipalForInstall
AppPrincipalForInstall returns the install's bot: the kind='app' user at the address CreateAppUserTx gave it, or nil when there is none.
internal/store/install_clients.go:553
↓ 6 callersFunctionApply
Apply runs edits in order against body, each against the result of the ones before it, and returns the new body. All or nothing: the first edit that c
internal/bodypatch/bodypatch.go:59
↓ 6 callersFunctionApplyWithContext
ApplyWithContext is Apply, also returning each edit with its context. The context of edit i is read from the body as it stood right after edit i, whic
internal/bodypatch/bodypatch.go:151
↓ 6 callersMethodAsPlanLimit
AsPlanLimit returns the parsed plan-limit details when this APIError carries them, or nil otherwise. Returns nil for any error other than "plan_limit_
internal/cli/client.go:2847
↓ 6 callersMethodAssertUnchanged
(t *testing.T, before string)
internal/store/storetest/ref_prefix.go:85
↓ 6 callersMethodAttachAttachmentToItem
AttachAttachmentToItem binds an UNATTACHED attachment (item_id NULL, as `pad attachment upload -` leaves it) to a live item in the same workspace, and
internal/store/attachments.go:330
↓ 6 callersMethodBackfillRelationLinks
BackfillRelationLinks derives `item_relation_links` for every live item. Called from server startup after migrations. ITS GUARD IS A COMPLETION MARKE
internal/store/relation_links_backfill.go:75
↓ 6 callersMethodBaseURL
BaseURL returns the base URL for the API. If URL is set (via config, --url flag, or PAD_URL), it takes precedence. Otherwise, constructs from host and
internal/config/config.go:815
↓ 6 callersFunctionBoundRuntimePool
BoundRuntimePool is boundRuntimePool as a package function. It is not a method on purpose: scripts/ci-web-census treats an exported *Store method that
internal/store/runtime_limits.go:79
↓ 6 callersFunctionBuildCommentState
BuildCommentState builds and serialises one comment's state.
internal/decision/comment_state.go:30
↓ 6 callersMethodCancelCustomer
CancelCustomer asks pad-cloud to cancel every active Stripe subscription for customerID and then delete the Stripe customer object. Used by handleDele
internal/server/server.go:1002
↓ 6 callersFunctionCanonicalTraitsForSlug
CanonicalTraitsForSlug returns the kernel-trait declarations that a collection with the given slug carries by default, or the zero value when the slug
internal/collections/traits.go:140
↓ 6 callersMethodClose
Close stops every renewal goroutine and waits for them. It is NOT part of the SessionPresence interface — MemorySessionPresence has nothing to shut do
internal/server/session_presence_redis.go:815
↓ 6 callersFunctionCollectionAwaitsHumanJSON
IDEA-3906 / TASK-3919: an awaits_human collection holds ASKS of a person (a human-tasks or asks collection). The needs-you router treats an open, assi
internal/models/awaits_human.go:24
↓ 6 callersFunctionCommitmentBody
CommitmentBody translates flags to native roles using the former create mapping: hard has a zero deadline offset, soft/check only a target, window an
internal/schedule/commitment_flags.go:23
↓ 6 callersMethodCompactItemOpLog
CompactItemOpLog replaces the op-log rows the snapshot was built from (ids, every row the job read, oldest first) with the single snapshot frame, in o
internal/store/yjs_compaction.go:61
↓ 6 callersMethodConsumeTOTPStep
ConsumeTOTPStep atomically records a TOTP time-step as consumed, enforcing single-use semantics for login codes (BUG-2054). It succeeds only if step i
internal/store/users.go:2044
↓ 6 callersFunctionConvertGeneric
ConvertGeneric converts an HTML document into markdown by first running go-readability to strip chrome, navigation, and ads, then piping the cleaned H
internal/urlimport/generic.go:37
↓ 6 callersMethodCreateInstallClientTx
CreateInstallClientTx creates the install's one confidential client and returns its id and secret. The secret is returned here only; its hash is store
internal/store/install_clients.go:201
↓ 6 callersMethodCreatePKCERequest
============================================================ PKCE request sessions (handler/pkce/storage.go PKCERequestStorage) ======================
internal/store/oauth.go:645
↓ 6 callersMethodCurrent
Current is the offer to show now: Available with at least one interval, or unavailable. The returned value is a copy.
internal/billing/offer.go:153
↓ 6 callersFunctionDecideSkillWrite
DecideSkillWrite decides what to do with a tool's skill file. expected is FormatForTool's unstamped output for this pad; running is this pad's version
internal/cli/skillstamp.go:106
↓ 6 callersMethodDecisionJobsFailing
DecisionJobsFailing reports whether any owed job for the set in this workspace carries a recorded failure — the read path's only view of a provider th
internal/store/decisions.go:868
↓ 6 callersMethodDeleteItemLink
(id string)
internal/store/items.go:4475
↓ 6 callersFunctionDetectTools
DetectTools returns the tools that appear to be in use, based on any of: a project-local directory, a home-directory install, or a binary on PATH.
internal/cli/agents.go:170
↓ 6 callersFunctionDisplayLocation
DisplayLocation returns the viewer's zone, never the machine's local zone.
internal/cli/zone.go:14
↓ 6 callersMethodDrainInstallDeliveries
DrainInstallDeliveries is the wait between the phases: until the install has no unexpired in-flight webhook delivery row, in database time (DOC-3371 §
internal/store/app_lifecycle.go:149
↓ 6 callersMethodDropOwedDelivery
DropOwedDelivery decides a delivery that is past the drop age. In ONE transaction that takes the install row first, as admission does, it runs admissi
internal/store/app_delivery.go:184
↓ 6 callersMethodEmitBulkHeaderEvent
EmitBulkHeaderEvent writes the batch header for one handler-path bulk operation, in its own transaction after the member loop. WHY THIS IS NOT A TRAN
internal/store/event_outbox.go:2357
↓ 6 callersFunctionEmitJSON
EmitJSON walks the command tree below `target`, builds a cmdhelp v0.1 Document, and writes it to w as indented JSON terminated by a newline. `root` M
internal/cmdhelp/json.go:73
↓ 6 callersMethodEncryptWebhookSecretsAtRest
EncryptWebhookSecretsAtRest encrypts plaintext webhook HMAC secrets (BUG-2057). Called on startup when an encryption key is configured. It handles two
internal/store/encryption.go:190
↓ 6 callersMethodError
()
internal/server/handlers_import_bundle.go:1485
↓ 6 callersMethodExec
(query string, args ...any)
internal/store/yjs_updates.go:111
↓ 6 callersMethodExportWorkspaceSnapshot
ExportWorkspaceSnapshot reads a workspace export and, when withAttachments is set, the bundle's attachment rows, all inside one read-only transaction,
internal/store/export.go:182
↓ 6 callersFunctionFirstDuplicateJSONKey
FirstDuplicateJSONKey reports the first object member name that appears twice in the same object, at any depth. It walks EVERY depth: each object on
internal/models/json_duplicate_keys.go:24
↓ 6 callersMethodGetAccessToken
GetAccessToken hydrates an access token by its HMAC signature. Returns ErrOAuthInactiveToken if the row exists but has been revoked / rotated out, Err
internal/store/oauth.go:339
↓ 6 callersMethodGetBillingMetrics
GetBillingMetrics fetches an aggregated Stripe-derived snapshot from pad-cloud's /admin/metrics/billing endpoint (active subs, MRR, ARR, churn, cancel
internal/server/server.go:1013
↓ 6 callersMethodGetCommitmentFor
GetCommitmentFor is GetCommitment for one reader: canRead says whether that reader may read a given child item (nil: every child). The milestone half
internal/store/commitment.go:154
↓ 6 callersMethodGetConversationByNumber
GetConversationByNumber resolves a number in the actor's own numbering (numbers are per owner; 2a conversations are all the actor's own).
internal/store/conversations.go:203
↓ 6 callersMethodGetItemLease
GetItemLease returns the item's live lease, or nil — absent and expired are indistinguishable on purpose (expiry is absence on every read path).
internal/store/item_lease.go:154
↓ 6 callersMethodGetNeedsSnooze
GetNeedsSnooze returns userID's snooze on an item with Holds evaluated at now, or nil when there is none. A deferral holds until defer_until, whatever
internal/store/needs_snooze.go:189
↓ 6 callersMethodGetRelationBacklinks
GetRelationBacklinks returns the live items that reference targetItemID through a `relation` field, filtered to what this viewer may see. VISIBILITY
internal/store/relation_links.go:278
↓ 6 callersMethodInstall
Install wires the runner's registry into the store's write doors. With a nil runner it removes any resolver, so the doors enqueue nothing.
internal/decision/runner.go:447
↓ 6 callersFunctionIsDiffSmaller
IsDiffSmaller returns true if storing a diff would be meaningfully smaller than storing the full content. Returns false for near-complete rewrites whe
internal/diff/diff.go:105
↓ 6 callersMethodIsItemStarred
IsItemStarred checks whether a specific item is starred by a user.
internal/store/item_stars.go:43
↓ 6 callersFunctionIsServerRunning
IsServerRunning reports whether a server answers on the configured address.
internal/cli/server.go:252
↓ 6 callersFunctionIsTerminalStatusDefault
IsTerminalStatusDefault checks using the default fallback list (for cases where no collection schema is available).
internal/models/terminal.go:374
↓ 6 callersMethodJSONExtractText
JSONExtractText returns SQL to extract a text value from a JSON column. SQLite: json_extract(col, '$.key') PostgreSQL: col->>'key'
internal/store/dialect.go:34
↓ 6 callersMethodListAllItems
ListAllItems is ListItems for a caller that needs every matching row (a report): it follows the server's next-offset until has-more is false (BUG-3704
internal/cli/client.go:444
↓ 6 callersMethodListArchivedItemWorkspaceMovesBySource
ListArchivedItemWorkspaceMovesBySource returns at most `limit` MOVE rows for one source — rows with archived_source true — newest first. It serves th
internal/store/item_workspace_moves.go:160
↓ 6 callersMethodListItemVersionsPage
ListItemVersionsPage returns an item's versions newest-first, bounded to `limit` rows (limit <= 0 means unbounded). Raw rows — reverse-patch versions
internal/store/items.go:6935
↓ 6 callersMethodListScheduleLinks
ListScheduleLinks returns the links touching itemID whose BOTH ends the caller can read. A link with an unreadable other end is absent: the item shows
internal/store/commitment_links.go:913
↓ 6 callersMethodListUserAPITokens
ListUserAPITokens returns all API tokens owned by a user (without secrets).
internal/store/api_tokens.go:240
↓ 6 callersMethodListUserActivity
ListUserActivity returns activities originated by the given user, in reverse-chronological order. Powers the Activity tab of the admin user modal (T15
internal/store/activities.go:789
↓ 6 callersMethodListUsers
ListUsers returns all users.
internal/store/users.go:373
↓ 6 callersMethodListVersions
(documentID string)
internal/store/versions.go:91
↓ 6 callersMethodListWatchesForUser
ListWatchesForUser returns every watch a user holds, across ALL workspaces they're a member of, newest first — enriched with the watched item's ref/ti
internal/store/watches.go:70
↓ 6 callersMethodLoadMaterializeInput
LoadMaterializeInput reads the item's op-log for a recovery job. It returns nil (no error) when the item is missing, soft-deleted, or has no op-log.
internal/store/materialize_flush.go:62
↓ 6 callersFunctionLoadPadToml
LoadPadToml finds and reads the nearest .pad.toml by walking up from cwd. Returns nil if no .pad.toml is found (not an error).
internal/cli/workspace.go:89
↓ 6 callersMethodMarkConversationRead
MarkConversationRead advances the member's read marker, capped at last_seq (TASK-4038).
internal/store/conversations.go:653
↓ 6 callersMethodMessage
Message renders the issue the way every door reports it. One function so the six refusing doors cannot phrase the same refusal three ways.
internal/store/relation_referents.go:119
↓ 6 callersFunctionMigratedRefusalTables
MigratedRefusalTables returns the population, sorted, for the guard test and the renderer to consume the same value.
internal/store/migrated.go:348
↓ 6 callersMethodMintContextCode
MintContextCode mints a code for viewerID's click on actionKey of installID for itemID in workspaceID, after the same checks redeem makes, under the s
internal/store/app_item_actions.go:307
↓ 6 callersMethodNeedsDueOccurrences
NeedsDueOccurrences returns the earliest outstanding human-audience claim per open item received by userID. BootstrapAgenda applies visibility, recipi
internal/store/needs_due.go:16
↓ 6 callersFunctionNew
New loads the bundle into a fresh goja runtime and builds the headless editor once, so the cost of that lands here and not in the first job.
internal/materialize/materialize.go:108
↓ 6 callersFunctionNew
New wraps the store for app writes.
internal/appstore/appstore.go:74
↓ 6 callersFunctionNewStructuredEntryID
NewStructuredEntryID mints the id of an implementation-note or decision-log entry: the prefix and a unix-nano timestamp, the shape every writer has us
internal/models/item.go:1712
↓ 6 callersFunctionNormalizeWorkspaceSettings
(raw string)
internal/models/workspace_settings.go:82
↓ 6 callersMethodOutcome
Outcome reports the recorded failure, if any.
internal/server/mcp_tool_outcome.go:41
↓ 6 callersMethodOwedDecisionJobs
OwedDecisionJobs returns the set of items among ids that have a job owed for the question set and not failed: the same "owed" the dashboard flags use
internal/store/needs_scoring.go:114
↓ 6 callersMethodProblems
Problems lists every configured value that could not be used, as "VARIABLE: reason" lines for a startup warning. An unset origin is not a problem; it
internal/config/mcp.go:80
↓ 6 callersFunctionPromptBody
PromptBody returns the canonical body text for a registered prompt. Exported so tests can assert lockstep with SKILL.md without duplicating the litera
internal/mcp/prompts.go:85
↓ 6 callersMethodQContext
QContext is Q with every read bound to ctx (BUG-3632).
internal/store/store.go:1028
↓ 6 callersMethodQuery
(query string, args ...any)
internal/store/activities.go:343
↓ 6 callersMethodReadFrom
(r io.Reader)
internal/server/flush_error_writer.go:101
↓ 6 callersMethodRecordNotificationsSent
RecordNotificationsSent records ids as pushed, BY ID AND NOT BY CLAIM: this is the one deliberate exception to "settle only under the claim". A delive
internal/store/push_dispatch_settle.go:35
↓ 6 callersFunctionRegisterResources
RegisterResources installs the read-only MCP resource templates on srv: - pad://workspace/{ws}/items/{ref} — single item markdown - pad://workspace/{
internal/mcp/resources.go:200
↓ 6 callersMethodReleaseItemLease
ReleaseItemLease clears the caller's lease on an item. Idempotent: releasing an absent or expired lease is a no-op (released=false), never an error —
internal/store/item_lease.go:118
↓ 6 callersFunctionRenderAttachmentChip
RenderAttachmentChip builds a Notion-style file-chip anchor for a non-image attachment. `target=_blank` + `rel=noopener noreferrer` matches the existi
internal/server/render/attachments.go:243
↓ 6 callersFunctionRenderAttachmentMissing
RenderAttachmentMissing builds a placeholder span for a missing/deleted attachment. Keeps the document layout intact and tells the user *why* there's
internal/server/render/attachments.go:272
↓ 6 callersFunctionRenderMarkdown
RenderMarkdown writes a Document as markdown matching cmdhelp v0.1 §6. Useful for tests that build a Document manually and want to render it without r
internal/cmdhelp/md.go:29
↓ 6 callersFunctionReplaceTitle
ReplaceTitle rewrites every link to oldTitle as a link to newTitle. LEGACY helper used by the document-rename path: case-sensitive, and whole-body lin
internal/links/links.go:33
← previousnext →2,401–2,500 of 28,840, ranked by callers