You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
quarto api: quarto.system.pandoc(), breakQuartoMd cell regex
pandoc execution wrapper
add optional startCodeCellRegex param to breakQuartoMd
update llm docs for quarto api
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy file name to clipboardExpand all lines: llm-docs/quarto-api.md
+86-94Lines changed: 86 additions & 94 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
# Quarto API and @quarto/types
2
2
3
+
## Scope of this document
4
+
5
+
This document covers **adding or modifying methods in existing namespaces** of the Quarto API.
6
+
7
+
**Out of scope:** Creating new namespaces, renaming namespaces, or restructuring the API architecture. These operations require reading `src/core/api/*.ts` in depth and should be planned and executed with a human in the loop.
8
+
9
+
---
10
+
3
11
## Building @quarto/types
4
12
5
13
To build the @quarto/types package:
@@ -18,160 +26,144 @@ This runs typecheck and then bundles all type definitions into `dist/index.d.ts`
18
26
The Quarto API is how external execution engines access Quarto's core functionality. The API exists in two places:
19
27
20
28
1.**Type definitions** in `packages/quarto-types/` - consumed by external engines (TypeScript)
21
-
2.**Implementation** in `src/core/quarto-api.ts` - used within quarto-cli
29
+
2.**Implementation** in `src/core/api/` - used within quarto-cli
22
30
23
-
### Step-by-step: Adding to the Quarto API
31
+
### Existing namespaces
24
32
25
-
Follow these steps in order when adding new functionality to the API:
33
+
The API has these namespaces (each has a corresponding file in `src/core/api/`):
26
34
27
-
#### 1. Update quarto-types type definitions
35
+
-`system` - Process execution, environment detection, temp files
36
+
-`console` - Logging, spinners, user feedback
37
+
-`path` - Path manipulation and resource locations
38
+
-`format` - Format detection utilities
39
+
-`jupyter` - Jupyter notebook operations
40
+
-`text` - Text processing utilities
41
+
-`mappedString` - Source-mapped string operations
42
+
-`markdownRegex` - Markdown parsing with regex
43
+
-`crypto` - Cryptographic utilities
28
44
29
-
**Add auxiliary types** (if needed):
45
+
### Step-by-step: Adding a method to an existing namespace
0 commit comments