MCPcopy Create free account

hub / github.com/Ckokoski/authorclaw / functions

Functions1,032 in github.com/Ckokoski/authorclaw

↓ 1 callersMethodmaybeDraftFromProject
* Auto-trigger: called by the gateway when a project completes. Decides * whether to draft a skill, then runs the drafter. Fire-and-forget.
gateway/src/services/auto-skill.ts:153
↓ 1 callersMethodmedian
(values: number[])
gateway/src/services/style-clone.ts:388
↓ 1 callersMethodmergeEntity
Merge a new entity into an existing canonical entry.
gateway/src/services/series-bible.ts:274
↓ 1 callersMethodmigrateEnvKeyIfPresent
* If the repo .env contains AUTHORCLAW_VAULT_KEY matching the given key, * migrate it to the out-of-repo key file and comment out the .env line.
gateway/src/security/vault.ts:122
↓ 1 callersFunctionmockAIComplete
(dimensionsJson: object)
gateway/src/services/writing-judge.test.ts:162
↓ 1 callersMethodnormalizeCategory
(value: any)
gateway/src/services/plot-promises.ts:484
↓ 1 callersMethodnormalizeContradiction
* Coerce one raw object into a Contradiction, or return null to drop it. * A finding with no evidence on EITHER side isn't evidence-chained, so it'
gateway/src/services/contradiction-detector.ts:343
↓ 1 callersMethodnormalizeDescription
(desc: string)
gateway/src/services/revision-orchestrator.ts:446
↓ 1 callersMethodnormalizeWhitespace
Collapse excessive whitespace but preserve intentional structure.
gateway/src/services/kdp-exporter.ts:148
↓ 1 callersMethodoptimize
* Analyze provided AMS performance data (pasted from Amazon Advertising UI * export) and produce optimization recommendations. * * Never prop
gateway/src/services/ams-ads.ts:130
↓ 1 callersFunctionoverBudgetDeps
(captured: { system?: string })
gateway/src/services/message-pipeline-tiered.test.ts:279
↓ 1 callersMethodparseContradictions
* Parse the model's JSON and coerce each entry into a well-typed * Contradiction. Invalid entries (bad category/subtype/severity, missing * evid
gateway/src/services/contradiction-detector.ts:320
↓ 1 callersMethodparseDialogueParagraph
Parse one paragraph into its dialogue core, tag, and inferred speaker.
gateway/src/services/dialogue-auditor.ts:106
↓ 1 callersMethodparseFeedback
* Parse an AI response into a structured ChapterFeedback. * Resilient to minor JSON issues.
gateway/src/services/beta-reader.ts:116
↓ 1 callersMethodparseField
(field: string, min: number, max: number)
gateway/src/services/cron-scheduler.ts:88
↓ 1 callersFunctionparseInlineFormatting
* Parse inline markdown formatting (bold, italic) into TextRuns.
gateway/src/services/docx-export.ts:298
↓ 1 callersFunctionparseMarkdownToDocx
* Parse markdown content into DOCX paragraphs with professional formatting.
gateway/src/services/docx-export.ts:214
↓ 1 callersMethodparsePlanResponse
* Parse the AI's JSON plan response, handling common formatting issues
gateway/src/services/projects.ts:464
↓ 1 callersMethodparseSkill
(content: string, name: string, category: 'core' | 'author' | 'marketing' | 'premium' | 'ops')
gateway/src/skills/loader.ts:127
↓ 1 callersMethodpassClassifyThreads
Pass 3 — classify each open plot thread as open|resolved.
gateway/src/services/sleep-consolidation.ts:474
↓ 1 callersMethodpassDistillStyle
Pass 4 — distill a ≤600-char style digest from SOUL/STYLE-GUIDE/VOICE.
gateway/src/services/sleep-consolidation.ts:525
↓ 1 callersMethodpassRefreshEntities
Pass 1 — extract entities on the newest chapters we can read text for.
gateway/src/services/sleep-consolidation.ts:336
↓ 1 callersMethodpassRefreshSeriesBible
Pass 5 — refresh (rebuild) the Series Bible report for this project's series.
gateway/src/services/sleep-consolidation.ts:570
↓ 1 callersMethodpassReindexAndBackfill
Pass 7 — reindex FTS then backfill project_id/persona_id via a slug→owner map.
gateway/src/services/sleep-consolidation.ts:585
↓ 1 callersMethodpassSummarizeArcs
Pass 2 — 1–2 sentence arc per major/promoted character.
gateway/src/services/sleep-consolidation.ts:430
↓ 1 callersMethodpauseAutonomous
* Pause autonomous mode temporarily (resumes on next enableAutonomous call)
gateway/src/services/heartbeat.ts:191
↓ 1 callersMethodpersist
(projectId: string)
gateway/src/services/character-voices.ts:170
↓ 1 callersMethodpersist
()
gateway/src/services/goals.ts:292
↓ 1 callersMethodpersist
()
gateway/src/services/cron-scheduler.ts:337
↓ 1 callersMethodpersistContext
(projectId: string)
gateway/src/services/context-engine.ts:349
↓ 1 callersMethodpersistReport
(projectId: string, report: ContinuityReport)
gateway/src/services/context-engine.ts:358
↓ 1 callersMethodpoll
()
gateway/src/bridges/telegram.ts:76
↓ 1 callersMethodpollLoop
()
gateway/src/bridges/telegram.ts:68
↓ 1 callersMethodprocess
( userMessage: string, assistantResponse: string, context?: { personaId?: string | null; projectId
gateway/src/services/memory.ts:150
↓ 1 callersMethodproposeCampaigns
* Propose three campaign templates from a base set of keywords + book metadata.
gateway/src/services/ams-ads.ts:78
↓ 1 callersMethodproposeStep
* Kick off a single launch step. Does NOT execute irreversible actions * itself — creates a ConfirmationRequest and returns its ID. Caller * pol
gateway/src/services/launch-orchestrator.ts:253
↓ 1 callersMethodproposeTranslation
* Propose actually running a translation. Creates a ConfirmationRequest * with the full cost + disclosure text. Caller must wait for approval *
gateway/src/services/translation-pipeline.ts:255
↓ 1 callersMethodqueryPerplexityDirect
(query: string, apiKey: string, maxWords: number)
gateway/src/services/research-lookup.ts:116
↓ 1 callersMethodqueryViaOpenRouter
(query: string, apiKey: string, maxWords: number)
gateway/src/services/research-lookup.ts:141
↓ 1 callersMethodreadChapterText
Read a chapter's full prose from disk (preferred) or fall back to summary.
gateway/src/services/sleep-consolidation.ts:401
↓ 1 callersMethodreadStyleGuideFallback
Read and cap the STYLE-GUIDE.md fallback. Never throws.
gateway/src/services/memory-tier.ts:290
↓ 1 callersMethodrecordActivity
(type: string, data: Record<string, any>)
gateway/src/services/heartbeat.ts:661
↓ 1 callersMethodrecoverTruncatedJson
* Attempt to close a truncated JSON object/array by: * 1. Finding the last complete element (object or value followed by `,`) * 2. Counting
gateway/src/services/context-engine.ts:242
↓ 1 callersMethodrecoverTruncatedJson
* Best-effort close of a truncated JSON string: walk the structure tracking * string context + brace/bracket depth, then append the missing closers
gateway/src/services/contradiction-detector.ts:449
↓ 1 callersMethodreformatBlurb
(amazonBlurb: string, warnings: string[])
gateway/src/services/bookbub-submitter.ts:111
↓ 1 callersFunctionregisterAudioRoutes
(ctx: ApiContext)
gateway/src/api/routes/audio.ts:11
↓ 1 callersFunctionregisterAuthorOSToolsRoutes
(ctx: ApiContext)
gateway/src/api/routes/authoros-tools.ts:11
↓ 1 callersFunctionregisterBackupRoutes
(ctx: ApiContext)
gateway/src/api/routes/backup.ts:9
↓ 1 callersFunctionregisterContextHeartbeatRoutes
(ctx: ApiContext)
gateway/src/api/routes/context-heartbeat.ts:10
↓ 1 callersFunctionregisterCronRoutes
(ctx: ApiContext)
gateway/src/api/routes/cron.ts:9
↓ 1 callersFunctionregisterDocumentRoutes
(ctx: ApiContext)
gateway/src/api/routes/documents.ts:13
↓ 1 callersFunctionregisterExternalCoversRoutes
(ctx: ApiContext)
gateway/src/api/routes/external-covers.ts:11
↓ 1 callersFunctionregisterImageRoutes
(ctx: ApiContext)
gateway/src/api/routes/images.ts:10
↓ 1 callersFunctionregisterJudgeCharacterVoiceRoutes
(ctx: ApiContext)
gateway/src/api/routes/judge-character-voices.ts:9
↓ 1 callersFunctionregisterKdpTrackChangesRoutes
(ctx: ApiContext)
gateway/src/api/routes/kdp-track-changes.ts:11
↓ 1 callersFunctionregisterManuscriptQualityRoutes
(ctx: ApiContext)
gateway/src/api/routes/manuscript-quality.ts:11
↓ 1 callersFunctionregisterMemorySearchRoutes
(ctx: ApiContext)
gateway/src/api/routes/memory-search.ts:9
↓ 1 callersFunctionregisterPersonaRoutes
(ctx: ApiContext)
gateway/src/api/routes/personas.ts:9
↓ 1 callersFunctionregisterProjectRoutes
(ctx: ApiContext)
gateway/src/api/routes/projects.ts:9
↓ 1 callersFunctionregisterResearchLookupRoutes
(ctx: ApiContext)
gateway/src/api/routes/research-lookup.ts:10
↓ 1 callersFunctionregisterResearchWebRoutes
(ctx: ApiContext)
gateway/src/api/routes/research-web.ts:9
↓ 1 callersFunctionregisterSkillDraftRoutes
(ctx: ApiContext)
gateway/src/api/routes/skill-drafts.ts:9
↓ 1 callersFunctionregisterSneakersRoutes
(ctx: ApiContext)
gateway/src/api/routes/sneakers.ts:9
↓ 1 callersFunctionregisterStructuresPlotRoutes
(ctx: ApiContext)
gateway/src/api/routes/structures-plot.ts:9
↓ 1 callersFunctionregisterSystemRoutes
(ctx: ApiContext)
gateway/src/api/routes/system.ts:10
↓ 1 callersFunctionregisterUserModelRoutes
(ctx: ApiContext)
gateway/src/api/routes/user-model.ts:9
↓ 1 callersFunctionregisterVideoResearchRoutes
(ctx: ApiContext)
gateway/src/api/routes/video-research.ts:9
↓ 1 callersFunctionregisterWave3GatedRoutes
(ctx: ApiContext)
gateway/src/api/routes/wave3-gated.ts:10
↓ 1 callersFunctionregisterWebsiteRoutes
(ctx: ApiContext)
gateway/src/api/routes/website.ts:11
↓ 1 callersMethodremoveBlogPost
(siteId: string, postSlug: string)
gateway/src/services/website-sites.ts:251
↓ 1 callersMethodremoveBook
(siteId: string, bookSlug: string)
gateway/src/services/website-sites.ts:220
↓ 1 callersMethodremoveEvent
(id: string)
gateway/src/services/release-calendar.ts:75
↓ 1 callersMethodremoveGoal
(goalId: string)
gateway/src/services/goals.ts:165
↓ 1 callersMethodremoveProject
(seriesId: string, projectId: string)
gateway/src/services/series-bible.ts:140
↓ 1 callersMethodremoveScript
(id: string)
gateway/src/services/orchestrator.ts:416
↓ 1 callersMethodrenderArchivalHit
Render one archival hit: title + snippet + source-type + date.
gateway/src/services/memory-tier.ts:547
↓ 1 callersMethodrenderedSheetsLength
Length of the rendered character sheets block body (lines only).
gateway/src/services/memory-tier.ts:438
↓ 1 callersMethodreportPath
(projectId: string)
gateway/src/services/context-engine.ts:321
↓ 1 callersMethodresolveRequestedPasses
Resolve which passes to run. Unknown names are ignored; omitting the * filter runs every registered pass.
gateway/src/services/revision-orchestrator.ts:418
↓ 1 callersMethodresolveTargets
(projectId?: string)
gateway/src/services/sleep-consolidation.ts:193
↓ 1 callersFunctionresolveThreshold
()
gateway/src/services/logger.ts:32
↓ 1 callersMethodresolveVaultKey
()
gateway/src/security/vault.ts:150
↓ 1 callersFunctionresolveVoiceForRequest
* Resolve voice priority: explicit voice > persona's voice > project preset > default. * Used by both /api/audio/generate and the project narration
gateway/src/api/routes/audio.ts:22
↓ 1 callersMethodrestart
()
gateway/src/services/orchestrator.ts:311
↓ 1 callersMethodrestartProject
* Reset the entire project: every failed/active step → pending, project * status → pending. Useful when the user wants to clean-start after a *
gateway/src/services/projects.ts:702
↓ 1 callersMethodrestartScript
(id: string)
gateway/src/services/orchestrator.ts:443
↓ 1 callersMethodresumeAutonomous
* Resume autonomous mode after pause
gateway/src/services/heartbeat.ts:200
↓ 1 callersMethodretryStep
* Reset a single failed (or active) step back to pending so the user can * retry it. Clears the error message + result. Does NOT delete the step's
gateway/src/services/projects.ts:673
↓ 1 callersMethodrunAntiSlopPass
(chapterText: string, chapterId?: string)
gateway/src/services/revision-orchestrator.ts:381
↓ 1 callersMethodrunContinuityPass
(input: RevisionAnalyzeInput)
gateway/src/services/revision-orchestrator.ts:206
↓ 1 callersMethodrunCraftPass
(chapterText: string, chapterId?: string)
gateway/src/services/revision-orchestrator.ts:335
↓ 1 callersMethodrunFactPass
(_input: RevisionAnalyzeInput)
gateway/src/services/revision-orchestrator.ts:403
↓ 1 callersMethodrunFormatPro
* Run Format Pro to produce a publication-ready export. * Returns the path to the output file.
gateway/src/services/external-tools.ts:120
↓ 1 callersMethodrunManuscriptAutopsy
* Run Manuscript Autopsy on a manuscript text (any length). * Writes text to a temp file, invokes the tool, reads the JSON output.
gateway/src/services/external-tools.ts:73
↓ 1 callersMethodrunNow
Manually run a job NOW. Useful for testing without waiting.
gateway/src/services/cron-scheduler.ts:270
↓ 1 callersMethodrunVoicePass
(input: RevisionAnalyzeInput)
gateway/src/services/revision-orchestrator.ts:283
↓ 1 callersMethodsafeJson
Best-effort JSON parse (strips code fences); returns null on failure.
gateway/src/services/sleep-consolidation.ts:635
↓ 1 callersMethodsafeParseJson
* Robust JSON recovery, mirroring ContextEngine.parseAIJson's strategy * (fences → first-brace/last-brace slice → common-fix pass → truncation *
gateway/src/services/contradiction-detector.ts:389
↓ 1 callersMethodsanitize
(metadata: Record<string, any>)
gateway/src/services/activity-log.ts:165
↓ 1 callersMethodsanitizePayload
Redact API keys / bearer tokens from persisted payloads.
gateway/src/services/confirmation-gate.ts:302
← previousnext →601–700 of 1,032, ranked by callers