MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 3 callersMethodRecentComments
RecentComments returns an item's newest n comments, oldest first — the "recent trail" a decision's state carries. Ordered by (created_at, id) so a bur
internal/store/decisions.go:884
↓ 3 callersMethodRedeemInstallCode
RedeemInstallCode consumes a code and rotates the install client's secret in one transaction. Every failure is ErrInstallCodeInvalid. Lock order is t
internal/store/app_provision.go:484
↓ 3 callersMethodRefuses
Refuses reports whether an unresolvable value of this origin REFUSES the request, or is dropped and reported. THIS IS THE ONE STATEMENT OF THE RULE (
internal/store/relation_referents.go:1191
↓ 3 callersMethodRegister
Register installs store under prefix (e.g. "fs", "s3"). The prefix MUST NOT contain a colon — Resolve splits keys on the first colon, so a prefix with
internal/attachments/registry.go:37
↓ 3 callersMethodRegisterOAuthActiveTokensCollector
RegisterOAuthActiveTokensCollector exposes pad_oauth_active_tokens as a callback-driven gauge. Pulled on every scrape — same pattern as the db-stats c
internal/metrics/metrics.go:1178
↓ 3 callersMethodReindexCollectionRelationLinks
ReindexCollectionRelationLinks rebuilds the reverse index for every live item in one collection. WHY THIS EXISTS (the U5 contract). The index is a fu
internal/store/relation_links.go:205
↓ 3 callersMethodReleaseIdempotencyKey
ReleaseIdempotencyKey gives up a claim the write refused, so a corrected retry with the same key can proceed. A pending claim is deleted; an unknown o
internal/store/idempotency.go:140
↓ 3 callersMethodRemove
Remove implements SessionPresence. Removing the user's last session deletes the user's bucket too, so an idle server doesn't accumulate an empty map p
internal/server/session_presence.go:399
↓ 3 callersFunctionRemoveArmState
RemoveArmState disarms the current session by removing its arm-state file. It reports whether a file was actually present (so `pad session disarm` can
internal/cli/session_arm_state.go:316
↓ 3 callersMethodRemoveConnectionWorkspace
RemoveConnectionWorkspace deletes one (request_id, workspace_id) row. Idempotent: removing a pair that isn't present is a no-op (no error). Phase D's
internal/store/oauth_connections.go:601
↓ 3 callersMethodRenameConnection
RenameConnection updates the human-readable name. Touches updated_at. Returns ErrOAuthConnectionNotFound if the row doesn't exist. Trim is the caller
internal/store/oauth_connections.go:256
↓ 3 callersFunctionRenderCollectionMarkdown
RenderCollectionMarkdown is the writer-taking core of PrintCollectionMarkdown. Columns mirror PrintCollectionTable's.
internal/cli/format_markdown.go:168
↓ 3 callersMethodRenegotiateCommitment
RenegotiateCommitment previews or applies one plan. Authority belongs to the handler; expectedAssignee guards its decision (nil for an owner). The clo
internal/store/commitment_renegotiate.go:29
↓ 3 callersMethodResolveLateRelationDefaultsQ
ResolveLateRelationDefaultsQ is ResolveLateRelationDefaults on a caller-supplied read executor — the copy door runs inside a transaction.
internal/store/relation_referents.go:1708
↓ 3 callersFunctionResolveMode
ResolveMode picks the billing mode from PAD_BILLING and, for one release, its predecessor PAD_BILLING_AVAILABLE (TASK-3577): - PAD_BILLING set: it de
internal/billing/offer.go:41
↓ 3 callersFunctionResolveOutboundSecret
ResolveOutboundSecret picks the secret to send on pad → pad-cloud calls given the inbound rotation list and an optional explicit override. Pulled out
internal/billing/cloud_client.go:50
↓ 3 callersMethodResolvePath
ResolvePath returns the config path for the given agent using the installer's home/cwd + goos overrides. CWDBased agents (Claude Code) resolve against
internal/mcp/install.go:644
↓ 3 callersMethodRestoreCollection
RestoreCollection un-archives this workspace's archived collection id. sql.ErrNoRows when it is not one (already restored by a racing call, or never a
internal/store/collections_archive.go:62
↓ 3 callersFunctionRetryableStatus
RetryableStatus reports whether a receiver's HTTP status means "try again later" rather than "this request is unacceptable": any 5xx, and the three 4x
internal/webhooks/dispatcher.go:747
↓ 3 callersMethodRevokeInstallClientGrantsTx
RevokeInstallClientGrantsTx deletes every code, PKCE row, access and refresh token the install's client holds, with their bindings. The caller holds t
internal/store/install_clients.go:277
↓ 3 callersMethodRevokeUserCalendarFeedsTx
RevokeUserCalendarFeedsTx participates in credential revocation with the user row locked before feed rows, the same lock order as feed creation.
internal/store/calendar_feeds.go:136
↓ 3 callersMethodRotate
Rotate returns a new image rotated by deg degrees clockwise. Only multiples of 90 (90, 180, 270, plus their negatives) are supported in Phase 1 — that
internal/attachments/processor.go:48
↓ 3 callersMethodSaveReportLayout
SaveReportLayout upserts the user's layout for a workspace. The caller is responsible for sanitizing the layout (see server handler) before saving.
internal/store/report_layouts.go:40
↓ 3 callersFunctionScheduleSnoozedUntil
ScheduleSnoozedUntil derives the re-fire instant for the outstanding occurrence. occurrenceState is its history row state, or empty when no row exists
internal/store/schedule_snooze.go:16
↓ 3 callersFunctionScopeFor
ScopeFor answers the one question MigrateScope asks: is the item landing in a different workspace? It lives here, in the package that defines the type
internal/items/migrate.go:46
↓ 3 callersMethodScore
"importance" or "simplicity"
internal/needs/needs.go:284
↓ 3 callersMethodScrubOutboxUserRefsTx
ScrubOutboxUserRefsTx is ScrubOutboxUserRefsTxCtx without a deadline.
internal/store/event_outbox.go:987
↓ 3 callersMethodSendEmailVerification
SendEmailVerification sends an email-verification link to a newly registered user. Mirrors SendPasswordReset (buildHTMLShell/buildPlainShell, CloudMod
internal/email/templates.go:152
↓ 3 callersMethodSendInvitation
SendInvitation sends a workspace invitation email. If unsubscribeURL is non-empty, an unsubscribe link is included in the footer.
internal/email/templates.go:12
↓ 3 callersFunctionServedFilename
ServedFilename is the name an attachment is offered under, derived from its STORED name. For a row stored after BUG-2818 it equals the stored name. Fo
internal/attachments/filename.go:237
↓ 3 callersFunctionServedProtocolVersions
ServedProtocolVersions is the set of MCP wire protocol revisions pad's remote transport advertises: the LEGACY era only, meaning every revision that s
internal/mcp/transport.go:58
↓ 3 callersFunctionSetAwaitsHuman
SetAwaitsHuman returns settingsJSON with awaits_human set to v and every other key unchanged. Settings that do not parse as an object are an error.
internal/models/awaits_human.go:53
↓ 3 callersFunctionSetBcryptCostForTesting
SetBcryptCostForTesting overrides the bcrypt cost used by CreateUser and UpdateUser for the lifetime of a test binary. It returns a restore function —
internal/store/testing_helpers.go:27
↓ 3 callersMethodSetBilling
SetBilling installs the billing mode (PAD_BILLING) and the offer source. Called from cmd/pad when the server starts. Billing is offered only in cloud
internal/server/server.go:1035
↓ 3 callersMethodSetBudget
SetBudget bounds every iterator of r to n period-loop steps (0: unbounded). TASK-4100.
internal/schedule/internal/rrule/rrule.go:142
↓ 3 callersMethodSetClaimSecret
SetClaimSecret wires the HMAC key used to derive + verify stateless 6-digit claim codes for the POST /api/v1/oauth/claim endpoint (PLAN-1519 / TASK-15
internal/server/handlers_oauth.go:99
↓ 3 callersMethodSetCollabLimits
SetCollabLimits bounds how many collab WebSockets (/api/v1/collab/{itemID}) one principal may hold open at once (BUG-1308). 0 or less means unlimited,
internal/server/server.go:1529
↓ 3 callersMethodSetContext
SetContext sets the context that bounds backoff waits and app attempts.
internal/webhooks/dispatcher.go:246
↓ 3 callersMethodSetDecisionDebounce
SetDecisionDebounce installs the window function, or removes it with nil (no set waits). Atomic for the same reason as the resolver: every write door
internal/store/decisions.go:72
↓ 3 callersMethodSetEndpoint
SetEndpoint overrides the Maileroo API endpoint. Intended for tests that stand up an httptest server mimicking Maileroo's v2 API — production callers
internal/email/sender.go:71
↓ 3 callersFunctionSetMaxListPages
SetMaxListPages replaces the page cap and returns a func that restores it. It is a test hook: the production cap is not configurable.
internal/cli/client.go:381
↓ 3 callersMethodSetOrphanGCConfig
SetOrphanGCConfig overrides the default sweep interval (24h) and grace period (30d). Pass 0 for either to keep the package default. Must be called bef
internal/server/orphan_gc.go:545
↓ 3 callersMethodSetPushSender
SetPushSender substitutes the gateway client (a test seam).
internal/server/push_dispatch.go:168
↓ 3 callersMethodSetRevocationObserver
SetRevocationObserver wires a callback that fires after each access-token family revocation. Optional — leaving it unset is equivalent to wiring a no-
internal/oauth/storage.go:85
↓ 3 callersMethodSetSessionActivity
SetSessionActivity reports this worker's activity with a short deadline. It never probes capabilities, starts a server or retries; hook callers may ig
internal/cli/client.go:924
↓ 3 callersFunctionSetTracksWork
SetTracksWork returns settingsJSON with tracks_work set to v and every other key unchanged. Settings that do not parse as an object are an error: the
internal/models/tracks_work.go:128
↓ 3 callersMethodSetUsernameValidator
SetUsernameValidator sets the rule a generated username must pass. The server installs ValidateUsername, which this package cannot import.
internal/store/account_claim.go:179
↓ 3 callersFunctionSetupWriter
SetupWriter is like Setup but writes to w instead of stderr (useful for tests).
internal/logging/logging.go:30
↓ 3 callersFunctionShipPlaybook
ShipPlaybook returns the seeded `ship` playbook for the startup template. PLAN-1377's headline deliverable: gives every fresh `startup` workspace a re
internal/collections/templates_startup_ship.go:368
↓ 3 callersFunctionSliceBodyLines
SliceBodyLines numbers content's lines start..end (end 0 = to the end), clipped to the body. A body that ends in "\n" has no empty last line.
internal/bodypatch/lines.go:52
↓ 3 callersMethodStallPos
StallPos bounds below every occurrence an exhausted iterator did not yield. TASK-4100.
internal/schedule/internal/rrule/rrule.go:148
↓ 3 callersMethodStampContentWatermarkIfCaughtUpCounted
StampContentWatermarkIfCaughtUpCounted is StampContentWatermarkIfCaughtUp that also reports what the advance covered (TASK-3541 step 0). The count is
internal/store/content_watermark_stamp.go:86
↓ 3 callersMethodStampRestoreBoundaryOpIDTx
StampRestoreBoundaryOpIDTx sets items.restore_boundary_op_id INSIDE the caller's transaction (BUG-2264) — the DURABLE counterpart of the in-memory Roo
internal/store/yjs_updates.go:425
↓ 3 callersFunctionStampSkill
StampSkill returns content with the marker line appended for version.
internal/cli/skillstamp.go:42
↓ 3 callersMethodStartPushDispatch
StartPushDispatch starts the dispatch loop. Idempotent; tracked on s.bg.
internal/server/push_dispatch.go:224
↓ 3 callersMethodStartReminderTick
StartReminderTick starts the periodic reminder sweep. Idempotent. Started from the real server bootstrap path, not Server.New, so unit tests that con
internal/server/reminder_tick.go:80
↓ 3 callersMethodStat
(ctx context.Context, key string)
internal/attachments/registry.go:86
↓ 3 callersMethodState
State builds the item's current state, as a set without links sees it.
internal/decision/runner.go:489
↓ 3 callersMethodString
()
internal/schedule/internal/rrule/str.go:274
↓ 3 callersFunctionStructuredEntryIDKey
StructuredEntryIDKey is the ONE rule for what a structured entry's stored id means as a timeline id (BUG-2783, BUG-2788). It returns the key the entry
internal/models/structured_entry_ids.go:35
↓ 3 callersMethodSubscribe
Subscribe delegates to the inner bus and increments the SSE connection gauge.
internal/metrics/instrumented_bus.go:34
↓ 3 callersFunctionTerminalPlaceholdersForDoneField
TerminalPlaceholdersForDoneField is a SQL-layer convenience that returns the done-field key plus the placeholder + args pair needed for an IN clause.
internal/models/terminal.go:290
↓ 3 callersFunctionThumbnailExt
ThumbnailExt returns the file extension for a thumbnail encoded in `format`. Used to build a synthetic filename for the derived row (parent's basename
internal/attachments/processor.go:165
↓ 3 callersFunctionThumbnailFormat
Format-policy helpers — shared between the pure-Go and libvips backends. These are intentionally NOT inside a build-tagged file so they compile under
internal/attachments/processor.go:141
↓ 3 callersFunctionThumbnailMime
ThumbnailMime returns the canonical MIME type for a thumbnail encoded in `format` (paired with ThumbnailFormat above).
internal/attachments/processor.go:150
↓ 3 callersFunctionToItemSummary
ToItemSummary projects a single models.Item into the summary shape.
internal/cli/item_summary.go:153
↓ 3 callersFunctionTokensDecodeNUL
TokensDecodeNUL walks a VALID JSON document token by token and reports whether any string in it, key or value, decodes to a NUL (BUG-2812). It replac
internal/textguard/textguard.go:123
↓ 3 callersFunctionToolInstalled
ToolInstalled checks if the skill file exists for the given tool.
internal/cli/agents.go:219
↓ 3 callersMethodUnsnoozeNeedsItem
UnsnoozeNeedsItem removes userID's snooze on an item. It reports whether there was one.
internal/store/needs_snooze.go:175
↓ 3 callersMethodUnsubscribe
Unsubscribe removes a subscriber and closes its channel. No-op when the channel is unknown — a double-Unsubscribe (e.g. handler defer firing after Clo
internal/collab/memory_bus.go:83
↓ 3 callersMethodUpdateFieldKeys
UpdateFieldKeys are the field keys an update from this entry writes, sorted.
internal/collections/builtin.go:64
↓ 3 callersMethodUpdateFields
UpdateFields is the entry's update fields as a map: what an update from the library writes into the item, status excluded.
internal/collections/builtin.go:408
↓ 3 callersMethodUpdateItem
UpdateItem applies a scalar fields patch to an item this install created, in one FencedTx.
internal/appstore/items.go:162
↓ 3 callersMethodUpdateItemSortOrders
UpdateItemSortOrders sets sort_order for a set of items in ONE transaction: every entry lands or none does (TASK-3517). It replaces the web reorder's
internal/store/item_sort_order.go:45
↓ 3 callersMethodUpdateRoleSortOrder
UpdateRoleSortOrder batch-updates role_sort_order for a list of items. Every entry must update exactly one live item in workspaceID, or the whole batc
internal/store/agent_roles.go:461
↓ 3 callersMethodUpdateView
UpdateView modifies an existing view.
internal/store/views.go:137
↓ 3 callersMethodUpdateWorkspaceMemberRoleWithin
UpdateWorkspaceMemberRoleWithin is UpdateWorkspaceMemberRole for a caller restricted to specific collections (BUG-3634). within is the target's collec
internal/store/workspace_members.go:999
↓ 3 callersMethodUserID
UserID returns the pad user ID this session was issued to. Equivalent to GetSubject() under our model where Subject is always the user ID; kept as a t
internal/oauth/session.go:63
↓ 3 callersFunctionValidFilenameSource
ValidFilenameSource reports whether v is one of the stored values.
internal/attachments/filename.go:107
↓ 3 callersFunctionValidateAwaitsHumanSetting
ValidateAwaitsHumanSetting refuses an `awaits_human` that is present but not a JSON boolean. An absent key is fine.
internal/models/awaits_human.go:42
↓ 3 callersFunctionValidateBoolArity
ValidateBoolArity asserts that every bool-typed flag in doc obeys spec §5.3: bool flags MUST be presence switches. They MUST NOT appear in `--flag=val
internal/cmdhelp/example_validation.go:208
↓ 3 callersFunctionValidateCalendarViewConfig
ValidateCalendarViewConfig is the whole check of a calendar view's config.
internal/models/view_calendar.go:136
↓ 3 callersFunctionValidateSchemaKeysAndOptions
ValidateSchemaKeysAndOptions refuses a collection schema in which a field has no key, two fields share a key, or a select or multi_select field's opti
internal/models/schema_uniqueness.go:17
↓ 3 callersFunctionValidateTracksWorkSetting
ValidateTracksWorkSetting refuses a `tracks_work` that is present but not a JSON boolean. An absent key is fine (it means work on create, "unchanged"
internal/models/tracks_work.go:116
↓ 3 callersFunctionValidateWebhookURLContext
ValidateWebhookURLContext is ValidateWebhookURL with the hostname lookup bound to ctx. A lookup that fails returns a *ResolveError.
internal/webhooks/validate.go:47
↓ 3 callersMethodVerifyStepUpCode
VerifyStepUpCode charges an attempt before comparing the hash. The final conditional consume makes one code successful at most once, even when multipl
internal/store/step_up.go:76
↓ 3 callersMethodWhy
Why names the reasons actually present, for the two sites that state it in one sentence. Neutral on number: one caller says "it" and the other may be
cmd/pad/cmd_item.go:2830
↓ 3 callersFunctionWipeCredentialsFile
WipeCredentialsFile removes ~/.pad/credentials.json entirely. Distinct from CredentialStore.Delete (which removes a single server's entry) — used by t
internal/cli/credentials.go:584
↓ 3 callersFunctionWithChatGPTToolSchemes
WithChatGPTToolSchemes copies each tool's _meta.securitySchemes to the tool's top level in a tools/list response. The Apps SDK reads the top level and
internal/mcp/chatgpt_security.go:90
↓ 3 callersFunctionWithMCPToolOutcomeSink
WithMCPToolOutcomeSink returns ctx carrying a fresh sink, and the sink. MCPAuditLog is its production caller; it is exported for internal/mcp's tests,
internal/server/mcp_tool_outcome.go:35
↓ 3 callersMethodWithOwnRef
WithOwnRef guards a rename whose new title parses as a reference, like "TASK-1" (BUG-3693). Written into a bracket as a title, it would be read as a r
internal/links/links.go:542
↓ 3 callersFunctionWithRestorePlanLimit
WithRestorePlanLimit makes RestoreItem enforce the workspace's items_per_workspace cap before it un-deletes the row, counted in its own transaction un
internal/store/event_outbox.go:107
↓ 3 callersFunctionWithTracksWorkDefault
WithTracksWorkDefault returns settingsJSON with `tracks_work` set to DefaultTracksWork when the creator did not set it; settings that already carry th
internal/models/tracks_work.go:79
↓ 3 callersMethodWorkspaceBuiltinOrigins
WorkspaceBuiltinOrigins returns the origin of every live item in the workspace that has one, keyed by item id: one query, a join, however many items t
internal/store/builtin_origin.go:70
↓ 3 callersMethodWorkspaceMemberSince
WorkspaceMemberSince returns a membership's created_at exactly as stored, or "" when there is none or its workspace is deleted: the value a delegated
internal/store/install_clients.go:710
↓ 3 callersMethodWriteCollectionNotFound
WriteCollectionNotFound is the denial writer for a CrossWorkspaceCollectionScope check on a workspace the caller has ALREADY been authorized into (i.e
internal/server/authz_cross_workspace.go:296
↓ 3 callersFunctionWritePermissionDeniedError
WritePermissionDeniedError writes the structured marker line for a refused caller (BUG-3864), carrying the server's details.reason, so the stdio MCP t
internal/cli/client.go:3424
↓ 3 callersFunctionWriteScheduleActiveError
WriteScheduleActiveError preserves the refusal for stdio MCP and names the occurrence that closing will silence for CLI users.
internal/cli/client.go:3821
↓ 3 callersFunctionWriteStoredStateUnreadableError
WriteStoredStateUnreadableError formats a local refusal to w in the canonical two-track shape, mirroring WriteOpenChildrenError / WriteUpdateConflictE
internal/cli/client.go:2817
↓ 3 callersFunctionWriteTooLargeError
WriteTooLargeError writes the structured marker line for a 413 (BUG-2829), with the server's own code in details.reason, so the stdio MCP transport re
internal/cli/client.go:3389
← previousnext →4,601–4,700 of 28,840, ranked by callers