export declare const CODEMODE_HELP = "# Code Mode API Reference\n\nIn Code Mode (`mj_execute_code`), you do NOT have native MCP tool schemas. You must orchestrate the server using the `mj.*` API inside the sandbox.\n\n## Sandbox Environment\n- **Network:** Disabled. `fetch()` is blocked and returns a 403 `VALIDATION_ERROR` response object. Node network modules are stripped.\n- **Native Modules:** `fs`, `path`, `child_process`, `require()`, `import` are disabled. To pass file contents or external payloads into Code Mode, use the `context` parameter (accessible inside JS code as `context`).\n- **Globals:** `createEntry()`, `find()`, `recent()`, `searchEntries()`, `deleteEntry()`, `help()` work without the `mj.` prefix.\n- **Positional Arguments:** `createEntry(\"note\")`, `searchEntries(\"performance\")`, `mj.backup.backupJournal(\"snapshot\")`.\n- **Healing Aliases:** The proxy auto-heals common hallucinations (e.g., `query` (search, q), `output_dir` (path, filepath), `keep_count` (keep), `target_user` (user, assignee), `workspace_id` (team, project)).\n- **Arrays & Methods:** Proxies seamlessly support native array properties/methods (e.g., `.length`, `[0]`, `.map()`, `.filter()`, `.includes()`, `.shift()`, `.concat()`). Calling an unsupported method returns an actionable `VALIDATION_ERROR` rather than crashing.\n- **Async/Await:** Do NOT access `Promise` objects synchronously. Always `await` async operations. Missing `await` statements will be intercepted and return an actionable `VALIDATION_ERROR`.\n- **SQL Translation & Auto-Healing:** Code Mode executes JavaScript code via `mj.*` API. If raw SQL statements are passed (e.g., `SELECT * FROM journal_entries LIMIT 10`), the server automatically translates them to type-safe `mj.core.getRecentEntries({ limit: 10 })` or `mj.search.searchEntries({ query: \"...\" })` calls.\n- **Direct SQLite & Prepared Statements:** Do NOT execute direct SQLite statements or driver preparations (e.g. `const db = mj.getDatabase(); db.prepare(...)`). Use high-level `mj.*` API calls instead: `mj.admin.updateEntry({ entry_id: ..., content: ... })` to update entries, and `mj.core.createEntry({ ... })` to insert entries. The sandbox automatically translates prepared statement updates and queries into safe `mj.*` method invocations.\n- **Template Literals & Backticks:** When passing multi-line strings or markdown with embedded backticks (e.g. inline code blocks like `` `.npmrc` ``), avoid raw unescaped backticks inside a template literal. Either escape them (`\\```) or pass the string safely via the `context` parameter and access it as `context.myContent`.\n- **Quotes & Escaping:** When passing strings with single quotes, double quotes, or backticks in Code Mode, avoid double-escaping backslashes (e.g. `\\\\'` or `\\\\\"`), which prematurely terminates string literals in JavaScript. Pass complex content safely via `context.content`.\n- **Payload Objects & Raw JSON:** When calling Code Mode, structured dictionary objects (via `payload`, `entry`, or as a raw JSON string in `code`) containing task summaries, notes, changes, status, or action directives (e.g., `{ action: \"create\", task: \"...\", changes: [...], notes: \"...\" }`) are automatically translated and synthesized into type-safe `mj.core.createEntry(...)` or `mj.admin.updateEntry(...)` calls.\n- **Result Size Cap & Auto-Compaction:** By default, Code Mode enforces a 100KB result serialization boundary to protect LLM context windows. For large datasets or multi-entry queries, pass `max_result_size: ` (e.g. `200 * 1024` or `500 * 1024`, up to 50MB) in `mj_execute_code` parameters or context. When structured results exceed the limit, the sandbox automatically compacts oversized markdown content and long arrays so execution succeeds seamlessly.\n\n## API Namespace Map\n\n### `mj.core`\n- `createEntry(params)`\n- `getEntryById(params)`\n- `getRecentEntries(params)`\n- `getEntryHistory(params)`\n- `testSimple(params)`\n- `testErrorHandling(params)`\n- `triggerProgress(params)`\n- `listTags(params)`\n- `markAnchorsStale(params)`\n\n### `mj.search`\n- `searchEntries(params)`\n- `searchByDateRange(params)`\n- `semanticSearch(params)`\n- `getVectorIndexStats(params)`\n- `listDeletedEntries(params)`\n- `crossTeamSearch(params)`\n\n### `mj.analytics`\n- `getStatistics(params)` (or `getStats()`)\n- `getCrossProjectInsights(params)` (or `getInsights()`)\n\n### `mj.relationships`\n- `linkEntries(params)`\n- `visualizeRelationships(params)`\n\n### `mj.io`\n- `exportEntries(params)`\n- `exportMarkdown(params)`\n- `importMarkdown(params)`\n- `importExternal(params)`\n\n### `mj.admin`\n- `updateConfiguration(params)`\n- `registerProject(params)`\n- `updateProject(params)`\n- `deleteProject(params)`\n- `getProject(params)`\n- `listProjects(params)`\n- `updateEntry(params)`\n- `deleteEntry(params)`\n- `restoreEntry(params)`\n- `rebuildVectorIndex(params)`\n- `addToVectorIndex(params)`\n- `mergeTags(params)`\n- `batchCreateEntries(params)`\n- `batchUpdateEntries(params)`\n- `batchDeleteEntries(params)`\n- `runAutoPrune(params)`\n- `searchAuditLog(params)`\n\n### `mj.github`\n- `getGithubIssues(params)`\n- `getGithubPrs(params)`\n- `getGithubIssue(params)`\n- `getGithubPr(params)`\n- `getGithubContext(params)`\n- `getKanbanBoard(params)`\n- `moveKanbanItem(params)`\n- `addKanbanItem(params)`\n- `deleteKanbanItem(params)`\n- `createGithubIssueWithEntry(params)`\n- `closeGithubIssueWithEntry(params)`\n- `getGithubMilestones(params)`\n- `getGithubMilestone(params)`\n- `createGithubMilestone(params)`\n- `updateGithubMilestone(params)`\n- `deleteGithubMilestone(params)`\n- `getRepoInsights(params)`\n- `getCopilotReviews(params)`\n\n### `mj.git`\n- `getCommitHistory(params)`\n- `searchCommits(params)`\n- `getReleaseInfo(params)`\n- `getUnreleasedCommits(params)`\n- `analyzeCommitPatterns(params)`\n- `checkEntryStaleness(params)`\n\n### `mj.backup`\n- `backupJournal(params)`\n- `listBackups(params)`\n- `restoreBackup(params)`\n- `cleanupBackups(params)`\n\n### `mj.team`\n- `teamCreateEntry(params)`, `teamGetEntryById(params)` (or `read()`), `teamGetRecent(params)`, `teamListTags(params)`\n- `teamSearch(params)`, `teamSearchByDateRange(params)`, `teamSemanticSearch(params)`\n- `teamUpdateEntry(params)`, `teamDeleteEntry(params)`, `teamRestoreEntry(params)`, `teamListDeletedEntries(params)` (or `trash()`)\n- `teamMergeTags(params)`, `teamLinkEntries(params)`, `teamVisualizeRelationships(params)`\n- `teamBatchCreateEntries(params)`, `teamBatchUpdateEntries(params)`, `teamBatchDeleteEntries(params)`\n- `teamGetStatistics(params)` (or `stats()`), `teamGetCrossProjectInsights(params)`, `teamGetCollaborationMatrix(params)`\n- `teamExportEntries(params)` (or `export()`), `teamExportMarkdown(params)`, `teamImportMarkdown(params)` (or `importMd()`), `teamImportExternal(params)`\n- `teamBackup(params)`, `teamListBackups(params)`\n- `teamGetVectorIndexStats(params)`, `teamRebuildVectorIndex(params)`, `teamAddToVectorIndex(params)`\n- `teamAddMember(params)`, `teamRemoveMember(params)`, `teamUpdateMemberRole(params)`, `teamListMembers(params)`, `teamGetMember(params)`\n- `teamAddAuthorAlias(params)`, `teamRemoveAuthorAlias(params)`, `teamListAuthorAliases(params)`, `teamResolveAuthor(params)`, `teamConsolidateAuthors(params)`\n\n**Rule:** When `mj_execute_code` is the only registered tool (e.g., Code Mode), all tool actions must be performed using the `mj.*` namespaces listed above inside the code sandbox. Do NOT attempt to call the original tool names as direct MCP operations. CLI commands are exempt from this and should be run in the terminal."; //# sourceMappingURL=codemode.d.ts.map