Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Ckokoski/authorclaw
/ functions
Functions
1,032 in github.com/Ckokoski/authorclaw
⨍
Functions
1,032
◇
Types & classes
335
↓ 485 callers
Method
push
(line: string)
gateway/src/services/orchestrator.ts:139
↓ 146 callers
Method
round
(value: number, digits: number)
gateway/src/services/style-clone.ts:398
↓ 120 callers
Method
get
(path: string, defaultValue?: any)
gateway/src/services/config.ts:38
↓ 117 callers
Method
get
Get the override model for a provider, or undefined if none set.
gateway/src/ai/model-config.ts:72
↓ 78 callers
Method
info
(message: string, ...args: unknown[])
gateway/src/services/logger.ts:65
↓ 76 callers
Method
sort
* Sort by severity (error > warning > info), then by pass order (the * canonical REVISION_PASSES ordering), so the most urgent, most structural
gateway/src/services/revision-orchestrator.ts:460
↓ 74 callers
Method
parse
(expression: string)
gateway/src/services/cron-scheduler.ts:70
↓ 73 callers
Method
log
(entry: any)
gateway/src/services/manuscript-hub.ts:72
↓ 67 callers
Method
sendMessage
(chatId: number, text: string)
gateway/src/bridges/telegram.ts:644
↓ 66 callers
Method
set
(path: string, value: any)
gateway/src/services/config.ts:48
↓ 56 callers
Method
set
* Set (or clear) a provider's model override and persist. * Passing an empty/whitespace model clears the override (revert to default).
gateway/src/ai/model-config.ts:85
↓ 56 callers
Method
warn
(message: string, ...args: unknown[])
gateway/src/services/logger.ts:71
↓ 53 callers
Method
getProject
(id: string)
gateway/src/services/step-executor.ts:77
↓ 48 callers
Method
error
(message: string, ...args: unknown[])
gateway/src/services/logger.ts:77
↓ 48 callers
Method
esc
(s: string | undefined)
gateway/src/services/website-builder.ts:483
↓ 44 callers
Method
getProjectEngine
()
gateway/src/index.ts:1232
↓ 37 callers
Method
selectProvider
* Select the best provider for a given task type using tiered routing. * Priority: per-project override → global preference → tier routing. * Wh
gateway/src/ai/router.ts:482
↓ 36 callers
Method
get
(key: string)
gateway/src/security/vault.ts:236
↓ 33 callers
Method
initialize
()
gateway/src/ai/router.ts:240
↓ 30 callers
Function
sanitizeSegment
(name: string, fallback = 'file')
gateway/src/security/paths.ts:96
↓ 30 callers
Function
writeSkillFixture
Write a fixture SKILL.md at skills/<category>/<name>/SKILL.md.
gateway/src/skills/loader.test.ts:9
↓ 29 callers
Function
addStep
( label: string, phase: string, taskType: string, prompt: string, opts: { skill?: string;
gateway/src/services/project-templates.ts:1099
↓ 29 callers
Method
complete
* Send completion request to the selected provider. * Tracks system prompt cache hits to estimate token savings.
gateway/src/ai/router.ts:545
↓ 29 callers
Method
delete
(key: string)
gateway/src/security/vault.ts:279
↓ 25 callers
Method
loadAll
()
gateway/src/skills/loader.ts:38
↓ 25 callers
Method
logAutonomous
(message: string, type: AgentJournalEntry['type'] = 'wake', metadata?: Record<string, any>)
gateway/src/services/heartbeat.ts:639
↓ 24 callers
Method
list
()
gateway/src/security/vault.ts:290
↓ 22 callers
Method
analyze
* Analyze a sample of the author's prose and build a style profile.
gateway/src/services/style-clone.ts:134
↓ 21 callers
Method
debug
(message: string, ...args: unknown[])
gateway/src/services/logger.ts:59
↓ 20 callers
Function
resolveWithin
(baseDir: string, ...segments: string[])
gateway/src/security/paths.ts:47
↓ 19 callers
Function
getLLMPrice
( model: string, fallback?: { costPer1kInput: number; costPer1kOutput: number }, )
gateway/src/services/pricing.ts:178
↓ 18 callers
Method
mechanicalScreen
Run the deterministic mechanical screen. Cheap; safe to run on every draft.
gateway/src/services/writing-judge.ts:267
↓ 18 callers
Method
set
(key: string, value: string)
gateway/src/security/vault.ts:259
↓ 17 callers
Function
getOpenAIImagePrice
( width: number, height: number, quality: 'low' | 'medium' | 'high' | 'auto' = 'high', model?: string,
gateway/src/services/pricing.ts:199
↓ 17 callers
Method
loadContext
(projectId: string)
gateway/src/services/context-engine.ts:325
↓ 16 callers
Function
addWaveDisclaimer
(res: Response)
gateway/src/api/context.ts:125
↓ 16 callers
Method
getActiveProviders
()
gateway/src/ai/router.ts:898
↓ 16 callers
Method
listProjects
(status?: string)
gateway/src/services/sleep-consolidation.ts:62
↓ 15 callers
Function
loadSeed
Write a {projectId}.json fixture into workspace/context and load it.
gateway/src/services/memory-tier.test.ts:133
↓ 14 callers
Method
broadcast
(message: string)
gateway/src/services/heartbeat.ts:649
↓ 14 callers
Method
detect
* Diff a chapter against the entity DB + prior summaries and return * categorized, evidence-chained contradictions. * * Never throws on AI tr
gateway/src/services/contradiction-detector.ts:197
↓ 14 callers
Method
persistState
* Persist all project state to disk (debounced — max once per second). * Non-fatal: if save fails, projects continue to work in-memory.
gateway/src/services/projects.ts:155
↓ 14 callers
Method
searchArchival
* Search the ARCHIVAL tier (FTS5 BM25 over conversations + manuscripts + * project steps) and return a labeled, budgeted excerpt block. * * F
gateway/src/services/memory-tier.ts:498
↓ 14 callers
Method
shellQuote
(s: string)
gateway/src/services/website-deploy.ts:414
↓ 13 callers
Method
getLoadedCount
()
gateway/src/skills/loader.ts:243
↓ 13 callers
Method
isAvailable
(tool: string)
gateway/src/services/author-os.ts:470
↓ 13 callers
Function
safePath
(base: string, userInput: string)
gateway/src/api/context.ts:20
↓ 13 callers
Function
seedContext
* A 3-chapter project: * - Aria: protagonist, recurring across all 3 chapters (baseline top-K). * - Kael: recurring, named in the active chapter
gateway/src/services/memory-tier.test.ts:45
↓ 12 callers
Function
daysAgo
ISO timestamp `days` before NOW.
gateway/src/services/preferences.test.ts:17
↓ 12 callers
Method
delete
(id: string)
gateway/src/services/personas.ts:118
↓ 12 callers
Function
escapeXml
* Escape special XML characters.
gateway/src/services/epub-export.ts:308
↓ 12 callers
Method
initialize
()
gateway/src/security/vault.ts:39
↓ 12 callers
Function
makeAiSelect
A recording aiSelectProvider — captures the task types requested.
gateway/src/services/contradiction-detector.test.ts:68
↓ 12 callers
Function
seed
Directly seed a preference with a chosen source + updatedAt (bypassing set()'s clock).
gateway/src/services/preferences.test.ts:22
↓ 12 callers
Method
toolDir
(tool: string)
gateway/src/services/author-os.ts:474
↓ 11 callers
Method
buildCore
* Assemble the CORE block for a project, budgeted per the design's priority * table and hard-clamped to CORE_BUDGETS.total chars. * * Pure re
gateway/src/services/memory-tier.ts:131
↓ 11 callers
Function
gatherChapters
(baseDir: string, project: any)
gateway/src/api/context.ts:134
↓ 11 callers
Function
makeAiComplete
* A stubbed aiComplete that returns a fixed body, and records the request so * tests can assert on the provider/task routing.
gateway/src/services/contradiction-detector.test.ts:58
↓ 11 callers
Method
matchSkills
* Match skills against user input, ranked by match quality, capped at the * top MAX_MATCHED_SKILLS, with a total injected-content budget so skill
gateway/src/skills/loader.ts:185
↓ 11 callers
Method
persist
()
gateway/src/services/website-sites.ts:297
↓ 10 callers
Function
getOutputBudget
(taskType: string)
gateway/src/ai/router.ts:136
↓ 10 callers
Method
getStats
Structured stats for dashboard Morning Briefing
gateway/src/services/heartbeat.ts:707
↓ 10 callers
Method
getSummaries
* Returns the cached chapter summaries for a project (chapter-sorted, as * generateSummary keeps them). Pure in-memory read — never AI-calls, never
gateway/src/services/context-engine.ts:922
↓ 10 callers
Function
hit
(overrides: Partial<SearchHit> = {})
gateway/src/services/memory-tier.test.ts:456
↓ 10 callers
Method
isAvailable
Edge TTS is always available (only needs internet); ElevenLabs needs an API key.
gateway/src/services/tts.ts:183
↓ 10 callers
Function
matchSpeakerTag
( trimmedParagraph: string, options: SpeakerTagOptions = {}, )
gateway/src/services/dialogue-parser.ts:90
↓ 10 callers
Function
pad
(n: number)
gateway/src/api/routes/backup.ts:21
↓ 9 callers
Method
evaluate
* Combined evaluation. Returns a verdict including whether to retry. * * Default scoring weights: * - mechanical 30%, judge 70% (judge catc
gateway/src/services/writing-judge.ts:523
↓ 9 callers
Method
getAutonomousStatus
* Get autonomous mode status for dashboard/API
gateway/src/services/heartbeat.ts:216
↓ 9 callers
Method
getEntitiesByType
* Returns cached entities filtered by type. Pure in-memory read over cached * ProjectContext — never AI-calls, never throws. Returns [] if nothing
gateway/src/services/context-engine.ts:911
↓ 9 callers
Method
loadCoreDigest
* Read the materialized core digest. Never throws — returns null on missing * file or malformed JSON so the hot path degrades to live reads.
gateway/src/services/memory-tier.ts:454
↓ 9 callers
Function
makeContextEngine
(opts: { issues?: any[]; characters?: Array<{ name: string; aliases?: string[] }>; throws?: boolean; } =
gateway/src/services/revision-orchestrator.test.ts:11
↓ 9 callers
Method
sanitizeSlug
(s: string)
gateway/src/services/website-sites.ts:290
↓ 8 callers
Function
aiComplete
()
gateway/src/services/writing-judge.test.ts:188
↓ 8 callers
Function
buildNameLookup
( characterNames: string[], aliases: Record<string, string[]> = {}, )
gateway/src/services/dialogue-parser.ts:109
↓ 8 callers
Method
buildProjectContext
(project: Project, step: ProjectStep)
gateway/src/services/step-executor.ts:80
↓ 8 callers
Method
createProject
* Create a new project from a template or custom definition. * Returns the project with auto-planned steps.
gateway/src/services/projects.ts:490
↓ 8 callers
Method
getActiveVoice
()
gateway/src/services/tts.ts:174
↓ 8 callers
Method
getPromotedSet
* Compute the promoted set of character sheets for CORE. * * PROMOTE rule: a character is promoted if its name/alias appears * (case-insensit
gateway/src/services/memory-tier.ts:335
↓ 8 callers
Function
getRecommendedThinking
(taskType: string)
gateway/src/ai/router.ts:109
↓ 8 callers
Method
guard
Run a pass body, converting throws into a failed PassOutcome (never rethrows).
gateway/src/services/sleep-consolidation.ts:288
↓ 8 callers
Method
handleMessage
* Core message handler — processes input from any channel. * Optional extraContext is appended to the system prompt (used by goal engine).
gateway/src/index.ts:1157
↓ 8 callers
Function
makeDeps
* Build a minimal fake ServiceContainer covering exactly the members * handleMessage() touches on the happy path. `overrides` lets a test swap in a
gateway/src/services/message-pipeline-tiered.test.ts:109
↓ 8 callers
Function
makeWritingJudge
(opts: { issues?: any[]; spy?: () => void } = {})
gateway/src/services/revision-orchestrator.test.ts:114
↓ 8 callers
Method
run
* Cron entry point (CronHandler shape). Consolidates one project (when * payload.projectId is given) or every enumerable project. * * Never r
gateway/src/services/sleep-consolidation.ts:164
↓ 8 callers
Function
runChat
Run one chat turn through the pipeline and return the assembled system prompt.
gateway/src/services/message-pipeline-tiered.test.ts:162
↓ 8 callers
Method
sanitizeSlug
(s: string)
gateway/src/services/website-builder.ts:493
↓ 8 callers
Method
update
(id: string, updates: Partial<AuthorPersona>)
gateway/src/services/personas.ts:102
↓ 8 callers
Method
writeCoreDigest
* Write the materialized core digest atomically (tmp + rename). Best-effort: * ensures the context dir exists first. Throws only on a genuine write
gateway/src/services/memory-tier.ts:473
↓ 7 callers
Method
checkBinary
(name: string)
gateway/src/services/website-deploy.ts:406
↓ 7 callers
Function
extractSpokenText
(trimmedParagraph: string)
gateway/src/services/dialogue-parser.ts:55
↓ 7 callers
Method
failStep
(projectId: string, stepId: string, error: string)
gateway/src/services/step-executor.ts:79
↓ 7 callers
Method
getActivePersonaId
Get the persona currently tagging new conversation turns.
gateway/src/services/memory.ts:61
↓ 7 callers
Function
inferPreferenceKey
* Infer a preference key from a value phrase.
gateway/src/services/preferences.ts:124
↓ 7 callers
Method
inferProjectType
* Infer the best project type from a natural language description. * Used when the user just says what they want without specifying a type.
gateway/src/services/projects.ts:1371
↓ 7 callers
Method
load
(projectId: string)
gateway/src/services/plot-promises.ts:185
↓ 7 callers
Method
prune
* Sleep-job maintenance pass (Tiered Memory Chunk C, step 6). * * Removes low-value inferred/observed preferences that have gone stale, plus
gateway/src/services/preferences.ts:241
↓ 7 callers
Method
readFile
(filename: string)
gateway/src/index.ts:2343
↓ 7 callers
Method
resolveModel
* Resolve the active model for a provider using the precedence: * model-config.json override → this.config.<provider>.model → hardcoded default.
gateway/src/ai/router.ts:219
↓ 7 callers
Method
setProviderModel
* Set (or clear) a provider's model override, persist it, and reinitialize * so the change takes effect without a restart. Passing an empty model
gateway/src/ai/router.ts:394
next →
1–100 of 1,032, ranked by callers