MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions31,685 in github.com/PerpetualSoftware/pad

↓ 7 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:3206
↓ 7 callersFunctionAttentionSet
AttentionSet returns the `attention` question set.
internal/decision/attention.go:53
↓ 7 callersFunctionBuildMetaPayload
BuildMetaPayload returns the meta payload for the given pad runtime version. An empty version falls back to FallbackVersion, as serverInfo.version doe
internal/mcp/meta.go:53
↓ 7 callersFunctionBuiltinStateOf
BuiltinStateOf compares an item with the built-in it was made from. It returns the state, the item's hash over the LIBRARY's update fields, and the en
internal/collections/builtin.go:302
↓ 7 callersMethodCheckSession
CheckSession returns the current auth status.
internal/cli/client.go:2627
↓ 7 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:24
↓ 7 callersMethodCompactedResumeCovers
CompactedResumeCovers reports whether a resume cursor is inside the item's compaction snapshot, which still exists (TASK-3531): such a tab is admitted
internal/collab/room.go:344
↓ 7 callersFunctionCompressResponses
CompressResponses gzips (or deflates) what the client accepts, except what compressSkips names.
internal/server/middleware_compress.go:91
↓ 7 callersMethodConfigureDecisions
ConfigureDecisions resolves the provider from every source, swaps the runner, and starts the tick if a provider is now configured. The returned error
internal/server/decision_settings.go:66
↓ 7 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:2237
↓ 7 callersFunctionConvertOpenAPI
ConvertOpenAPI converts an OpenAPI 3.x specification into a human-readable markdown document. The output is organized as: - H1 with the API title - I
internal/urlimport/openapi.go:30
↓ 7 callersMethodCopyItemPreflight
CopyItemPreflight runs the DRY RUN. It mutates nothing in the copy's own domain, so it is safe to call repeatedly and safe to retry. Returns the deco
internal/cli/client_items_copy.go:320
↓ 7 callersMethodCountLocked
CountLocked is the number of uploads holding hash. The caller holds Lock.
internal/attachments/inflight.go:61
↓ 7 callersMethodCreateSessionFenced
CreateSessionFenced is CreateSessionIssuedAt for a sign-in: it mints only if the account's credential_epoch still equals epoch, the value read when th
internal/store/sessions.go:218
↓ 7 callersMethodCreateView
CreateView adds a new saved view.
internal/store/views.go:11
↓ 7 callersMethodCreateWorkspaceGroup
(ctx context.Context, userID, name string, ids []string)
internal/store/workspace_groups.go:200
↓ 7 callersMethodDeleteCollection
DeleteCollection soft-deletes a collection by setting collections.deleted_at. Items in the collection are NOT cascaded; they remain in the database wi
internal/cli/client.go:333
↓ 7 callersMethodDeleteItemGrant
DeleteItemGrant revokes an item grant by ID, scoped to a workspace. When it was the grantee's last access to the workspace, their workspace tab goes
internal/store/grants.go:208
↓ 7 callersMethodDeleteUserAPIToken
DeleteUserAPIToken removes an API token by ID, verifying it belongs to the user.
internal/store/api_tokens.go:288
↓ 7 callersFunctionDerivePrefix
DerivePrefix generates a short uppercase prefix from a collection name. Single word: first 3-5 letters, removing trailing "s" for plurals Multi-word:
internal/collections/prefix.go:63
↓ 7 callersFunctionDisplayLocation
DisplayLocation returns the viewer's zone, never the machine's local zone.
internal/cli/zone.go:14
↓ 7 callersFunctionDropBlankRelations
DropBlankRelations deletes the blank scalar relation keys for which keep is false (every one when keep is nil) and returns the keys it deleted.
internal/items/relation_blanks.go:47
↓ 7 callersMethodEnableUser
EnableUser re-enables a disabled user account by clearing disabled_at.
internal/store/users.go:1422
↓ 7 callersFunctionEnsureBootstrapToken
EnsureBootstrapToken generates a fresh first-run bootstrap token (or loads the existing one if a valid file is already present). Returns the token str
internal/server/bootstrap.go:67
↓ 7 callersFunctionEnsureStructuredEntryIDs
EnsureStructuredEntryIDs gives every implementation note and decision-log entry a PERSISTED id that nothing else in the blob claims (BUG-2788). An en
internal/models/structured_entry_ids.go:105
↓ 7 callersMethodGet
Get returns the current session workspace, or empty string when none has been set.
internal/mcp/workspace.go:72
↓ 7 callersMethodGetAuthorizationCode
GetAuthorizationCode hydrates the code's session. Returns ErrOAuthInvalidatedCode if the row exists but active=false (fosite triggers grant-family rev
internal/store/oauth.go:291
↓ 7 callersMethodGetRefreshToken
GetRefreshToken hydrates a refresh token. Returns ErrOAuthInactiveToken when active=false, which fosite uses to trigger family revocation on the match
internal/store/oauth.go:379
↓ 7 callersMethodGetWorkspaceMemberQ
GetWorkspaceMemberQ is GetWorkspaceMember parameterized over its executor (see Queryer).
internal/store/workspace_members.go:452
↓ 7 callersMethodHandler
Handler returns the configured HTTP handler (router). Useful for testing with httptest.NewServer.
internal/server/server.go:3011
↓ 7 callersMethodHasEncryptionKey
HasEncryptionKey reports whether an encryption key is configured.
internal/store/encryption.go:27
↓ 7 callersMethodHijack
()
internal/server/flush_error_writer.go:94
↓ 7 callersFunctionIndex
Index builds the lookup for sec. A body with no acceptance-criteria section yields an empty index, in which every id is missing.
internal/verification/verification.go:57
↓ 7 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:440
↓ 7 callersMethodIsCompactedLog
IsCompactedLog reports whether itemID's op-log is exactly its compaction snapshot (one row, the snapshot row), so the sweep does not compact it again.
internal/store/yjs_compaction.go:165
↓ 7 callersMethodIsEdited
IsEdited reports whether the body changed after creation: create stamps created_at and updated_at with one value, and only an edit moves updated_at (r
internal/models/comment.go:83
↓ 7 callersMethodListAgentRoles
(workspaceID string)
internal/store/agent_roles.go:72
↓ 7 callersMethodListForUser
ListForUser implements SessionPresence, oldest connection first with the session id as a tiebreaker — the same deterministic order MemorySessionPresen
internal/server/session_presence_redis.go:666
↓ 7 callersMethodListPendingOutboxEvents
ListPendingOutboxEvents returns up to limit undispatched events in drain order. Ordering is (occurred_at, id) and is NOT a delivery-order contract —
internal/store/event_outbox.go:1738
↓ 7 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
↓ 7 callersMethodListUserAPITokens
ListUserAPITokens returns all API tokens owned by a user (without secrets).
internal/store/api_tokens.go:248
↓ 7 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
↓ 7 callersMethodListWebhooks
(workspaceID string)
internal/webhooks/dispatcher.go:74
↓ 7 callersFunctionMCPTokenIdentityFromContext
MCPTokenIdentityFromContext returns (kind, ref) attached by WithMCPTokenIdentity, or ("", "") if none was set. The audit middleware uses this to popul
internal/server/context.go:192
↓ 7 callersMethodMarkMigratedTx
MarkMigratedTx installs the refusal triggers and writes the marker row. IT MUST RUN INSIDE THE MIGRATION'S OWN TRANSACTION, after the last import has
internal/store/migrated.go:422
↓ 7 callersMethodMarkNotificationsSkipped
MarkNotificationsSkipped records ids as deliberately not pushed, with the reason. Same guard as MarkNotificationsSent.
internal/store/push_dispatch.go:304
↓ 7 callersMethodMarker
()
internal/store/redact_match.go:62
↓ 7 callersMethodMoveItemWithPreCheck
MoveItemWithPreCheck is MoveItem with the same precheck escape hatch UpdateItemWithPreCheck offers. A `pad item move ... --field status=done` writes a
internal/store/items.go:6263
↓ 7 callersMethodNeedsCandidateItems
NeedsCandidateItems returns the live items in scope that are router candidates: in a live, non-system collection, and an ask (an awaits_human collecti
internal/store/needs_read.go:170
↓ 7 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
↓ 7 callersFunctionNewClientRegistry
NewClientRegistry returns an empty registry.
internal/mcp/client_identity.go:74
↓ 7 callersFunctionNewCursor
NewCursor mints the cursor after row r.
internal/needs/cursor.go:144
↓ 7 callersFunctionNewGraph
NewGraph validates and copies edges without depending on their order.
internal/schedule/links.go:166
↓ 7 callersFunctionNewRateLimiters
NewRateLimiters creates rate limiters with sensible defaults.
internal/server/middleware_ratelimit.go:476
↓ 7 callersMethodNewWatchEventsStreamRequest
NewWatchEventsStreamRequest builds an authenticated GET request for GET /api/v1/events/stream (TASK-2533), used by `pad watch --stream --for-session`.
internal/cli/client.go:997
↓ 7 callersFunctionNormalizeRule
NormalizeRule turns a shorthand or RRULE text into the canonical rule. One leading "RRULE:" and surrounding space are stripped. It checks grammar only
internal/schedule/shorthand.go:40
↓ 7 callersFunctionNote
Note is the sentence that explains an unset zone, or "" when one is set.
internal/usertz/usertz.go:51
↓ 7 callersFunctionOwnerLiveness
OwnerLiveness is the shared verdict. EVERY recorded signal must agree: the socket (when recorded) must still exist with the identity captured at regis
internal/cli/session_owner.go:211
↓ 7 callersFunctionParameterRefused
ParameterRefused reports whether a value bound as a SQL parameter violates the invariant, and is the store layer's single entry point. isJSON is the
internal/textguard/textguard.go:179
↓ 7 callersFunctionParse
Parse decodes and validates manifest bytes. The first failure is returned as an *Error naming its path.
internal/appmanifest/manifest.go:152
↓ 7 callersFunctionPositiveTerminalValuesForDoneField
PositiveTerminalValuesForDoneField is TerminalValuesForDoneField minus the values that close WITHOUT delivering — the values that count as completed *
internal/models/terminal.go:153
↓ 7 callersFunctionPruneSessions
PruneSessions removes DEAD records, and — only when olderThan > 0 — UNKNOWN records whose timestamp is older than now-olderThan, each with its chat-se
internal/cli/session_registry.go:525
↓ 7 callersMethodPublish
Publish fans an event out to every subscriber whose itemID matches. Non-blocking: a slow subscriber whose buffer is full has new events dropped (logg
internal/collab/memory_bus.go:133
↓ 7 callersMethodQuery
(query string, args ...any)
internal/store/activities.go:343
↓ 7 callersMethodRecordItemWorkspaceMoveTx
RecordItemWorkspaceMoveTx inserts one provenance row inside an existing transaction. It is tx-taking by design: the row must be written in the same tr
internal/store/item_workspace_moves.go:55
↓ 7 callersFunctionRegister
Register installs pad's MCP tools on srv: the built-in pad_set_workspace plus every v0.2 catalog tool. Returns the count of registered tools (includin
internal/mcp/registry.go:78
↓ 7 callersMethodRemoveMilestoneChild
RemoveMilestoneChild soft-removes a selection: the row stays as history. Removing a child that is not selected writes nothing.
internal/store/milestone.go:233
↓ 7 callersFunctionRenderAttachmentImage
RenderAttachmentImage builds an inline `<img>` element for an image attachment. Width/height attributes are emitted when both are known and positive s
internal/server/render/attachments.go:215
↓ 7 callersMethodRenewSessionIfStale
RenewSessionIfStale implements sliding-window expiration. When a session is past its renewal threshold (less than half its renewal window remaining) i
internal/store/sessions.go:479
↓ 7 callersMethodResendInvitationAdmin
ResendInvitationAdmin replaces a pending invitation with a fresh one (new code, proof and expiry; same workspace, address and role), invited by invite
internal/store/workspace_members.go:1292
↓ 7 callersMethodResolveChatTarget
(target string, ensure bool)
internal/cli/client.go:4170
↓ 7 callersFunctionRewriteBracketAt
RewriteBracketAt rewrites the wiki-link bracket starting at byte position `position` in `content`, replacing the bracket's title segment with `newTitl
internal/links/links.go:261
↓ 7 callersMethodRotateAPIToken
RotateAPIToken generates a new secret for an existing token, preserving all metadata (name, scopes, workspace, user, expiry). The old token is invalid
internal/store/api_tokens.go:141
↓ 7 callersFunctionScheduleErrorCode
ScheduleErrorCode names an error from compiling or advancing a rule as the stable code item_schedules.error_code stores. The full set is the ten sched
internal/store/schedules.go:94
↓ 7 callersFunctionSchemaForMigratedFields
SchemaForMigratedFields returns schema with any reserved-key FieldDef removed, for validating the OUTPUT of MigrateFields. Only migration and copy ne
internal/items/migrate.go:296
↓ 7 callersFunctionSessionsDir
SessionsDir returns ~/.pad/sessions, creating it if it doesn't exist.
internal/cli/session_registry.go:130
↓ 7 callersMethodSetExportMetadataMaxBytes
100 MiB SetExportMetadataMaxBytes overrides the shared metadata cap on workspace exports and imports. Values <= 0 fall back to defaultExportMetadataMa
internal/server/export_metadata_limit.go:13
↓ 7 callersMethodSetImportBundleMaxBytes
SetImportBundleMaxBytes overrides the default 2 GiB cap on a single workspace import bundle. Set to 0 to fall back to the default. Wired from PAD_IMPO
internal/server/server.go:1425
↓ 7 callersMethodSetOpLogCompactor
SetOpLogCompactor turns dormancy compaction on (nil turns it off). Call before StartOpLogGC.
internal/server/oplog_compaction.go:58
↓ 7 callersMethodSetWebUI
SetWebUI sets the embedded web UI filesystem for serving the SPA.
internal/server/server.go:2835
↓ 7 callersFunctionStopServer
StopServer stops the server this CLI's config points at — or explains why it will not, which is the harder half. The PID file is a HANDLE, not eviden
internal/cli/server.go:187
↓ 7 callersFunctionT
(children, props = {})
plugin/hooks/register.js:531
↓ 7 callersFunctionTables
Tables returns the distinct tables in ws, sorted.
internal/store/storetest/writecapture.go:53
↓ 7 callersFunctionToItemSummaries
ToItemSummaries projects a slice of items into summary shape, preserving order. A nil input yields a non-nil empty slice so the JSON encodes as `[]`.
internal/cli/item_summary.go:243
↓ 7 callersFunctionTokenAllowedWorkspacesFromContext
TokenAllowedWorkspacesFromContext returns the token's workspace allow-list, or nil if none was attached. Three return shapes matter to callers: - nil
internal/server/context.go:213
↓ 7 callersMethodUninstallAppTx
UninstallAppTx is the uninstall's phase 2 (DOC-3371 §8 step 3): ONE transaction, child-first, uninstalling -> uninstalled. 1. the install client: its
internal/store/app_lifecycle.go:304
↓ 7 callersMethodUniqueFieldConflictsQ
UniqueFieldConflictsQ returns the keys of fields declaring `unique_scope: workspace_collection` whose value in fields is already held by another live
internal/store/unique_fields.go:35
↓ 7 callersMethodUpdateWorkspaceTab
UpdateWorkspaceTab applies u to the user's tab for workspaceID. It returns sql.ErrNoRows when that workspace is not open.
internal/store/workspace_tabs.go:355
↓ 7 callersMethodUploadAttachment
UploadAttachment stores an app upload bound to itemID, in the sequence above: StageUpload, then Insert. Refusals of the request itself are InputError
internal/appstore/attachments.go:143
↓ 7 callersMethodUsable
Usable reports whether MCP can be addressed at all: an origin and the two URLs derived from it all resolved.
internal/config/mcp.go:59
↓ 7 callersMethodUserHasGrantsInWorkspace
UserHasGrantsInWorkspace checks if a user has any active collection or item grants in a workspace (even though they are not a member). Used to detect
internal/store/grants.go:448
↓ 7 callersFunctionValidateDocumentTitle
ValidateDocumentTitle checks a document title at write time. Returns a message suitable for a 400 response, or "" when the title is acceptable. Cover
internal/models/document.go:184
↓ 7 callersFunctionValidateFieldsWithDrops
ValidateFieldsWithDrops is ValidateFields plus the discarded-default list (BUG-3079). For a door that has a `warnings.dropped_fields` channel; a door
internal/items/validate.go:90
↓ 7 callersFunctionWaitingOn
WaitingOn applies the rules in strict, exclusive order and returns what the item is waiting on. It reads no store; elig is the only question it asks.
internal/needs/needs.go:170
↓ 7 callersFunctionWithMCPTokenIdentity
WithMCPTokenIdentity stashes the bearer-token identity so the MCP audit middleware can record which connection drove the call. kind is the discrimina
internal/server/context.go:183
↓ 7 callersMethodWorkspaceStorageInfo
WorkspaceStorageInfo returns the consolidated quota summary for a workspace (used + limit + plan + override flag) in a single call. Used by the storag
internal/store/attachments.go:1961
↓ 7 callersMethodWrite
(p []byte)
internal/appfetch/poster_test.go:265
↓ 7 callersFunctionWritePlanLimitError
WritePlanLimitError formats a plan-limit rejection to w in the canonical two-track shape (TASK-788): 1. A single `pad-structured-error/v1: {json}\n`
internal/cli/client.go:3227
↓ 7 callersMethodacceptAs
acceptAs creates an existing account for email, signs it in, and accepts inv through the authenticated door (A1).
internal/server/handlers_invitation_accept_limit_test.go:62
↓ 7 callersMethodaccessEpoch
accessEpoch fingerprints this snapshot's effective visible set, so two revalidation ticks can be compared without re-querying anything (IDEA-2898). I
internal/server/handlers_events.go:806
← previousnext →2,301–2,400 of 31,685, ranked by callers