Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ OPENAI_BASE_URL="https://api.openai.com/v1"

# --- hCaptcha configuration ---
HCAPTCHA_SECRET_KEY=your-hcaptcha-secret-key-here
HCAPTCHA_SITE_KEY=your-hcaptcha-site-key-here
HCAPTCHA_SITE_KEY=your-hcaptcha-site-key-here

# --- Cloudflare configuration ---
CLOUDFLARE_TURNSTILE_SITE_KEY=your-cloudflare-turnstile-site-key-here
CLOUDFLARE_TURNSTILE_SECRET_KEY=your-cloudflare-turnstile-secret-key-here
6 changes: 5 additions & 1 deletion .env.schema
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ OPENAI_BASE_URL=

# --- hCaptcha configuration ---
HCAPTCHA_SECRET_KEY=
HCAPTCHA_SITE_KEY=
HCAPTCHA_SITE_KEY=

# --- Cloudflare configuration ---
CLOUDFLARE_TURNSTILE_SITE_KEY=
CLOUDFLARE_TURNSTILE_SECRET_KEY=
5 changes: 4 additions & 1 deletion apps/api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ OPENAI_BASE_URL="https://api.openai.com/v1"

# --- hCaptcha configuration ---
HCAPTCHA_SECRET_KEY=your-hcaptcha-secret-key-here
HCAPTCHA_SITE_KEY=your-hcaptcha-site-key-here
HCAPTCHA_SITE_KEY=your-hcaptcha-site-key-here

# --- Cloudflare configuration ---
CLOUDFLARE_TURNSTILE_SECRET_KEY=your-cloudflare-turnstile-secret-key-here
5 changes: 4 additions & 1 deletion apps/api/.env.schema
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ OPENAI_BASE_URL=

# --- hCaptcha configuration ---
HCAPTCHA_SECRET_KEY=
HCAPTCHA_SITE_KEY=
HCAPTCHA_SITE_KEY=

# --- Cloudflare configuration ---
CLOUDFLARE_TURNSTILE_SECRET_KEY=
6 changes: 4 additions & 2 deletions apps/api/middleware/helmet.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ const helmetMiddleware = helmet({

'upgrade-insecure-requests': isDevelopment ? null : [],
'frame-ancestors': ["'self'", ...CORS_TRUSTED_HOSTS],
'script-src': ["'self'", "'unsafe-inline'", 'https://static.cloudflareinsights.com', 'https://js.hcaptcha.com', 'https://newassets.hcaptcha.com', ...CORS_TRUSTED_CDN_HOSTS],
'frame-src': ["'self'", 'https://newassets.hcaptcha.com', 'https://js.hcaptcha.com', 'https://challenges.cloudflare.com', ...CORS_TRUSTED_HOSTS],
'script-src': ["'self'", "'unsafe-inline'", 'https://static.cloudflareinsights.com', 'https://js.hcaptcha.com', 'https://newassets.hcaptcha.com', 'https://challenges.cloudflare.com', ...CORS_TRUSTED_CDN_HOSTS],
'style-src': ["'self'", "'unsafe-inline'", 'https://newassets.hcaptcha.com', ...CORS_TRUSTED_CDN_HOSTS],
'img-src': ["'self'", 'data:', 'https://contrib.rocks', ...CORS_TRUSTED_CDN_HOSTS],
'font-src': ["'self'", ...CORS_TRUSTED_CDN_HOSTS]
'font-src': ["'self'", ...CORS_TRUSTED_CDN_HOSTS],
'connect-src': ["'self'", 'https://hcaptcha.com', 'https://*.hcaptcha.com', 'https://challenges.cloudflare.com']
}
},
frameguard: false,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/api/generate-docx.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const route = new AppRoute('/generate-docx', 'post', async (req, res) =>
const body = req.body

try {
const result = await handleGenerateDocx(body)
const result = await handleGenerateDocx(body, req)

if (result.status === 200) {
const docxBuffer = result.data
Expand Down
6 changes: 5 additions & 1 deletion apps/web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ OPENAI_BASE_URL="https://api.openai.com/v1"

# --- hCaptcha configuration ---
HCAPTCHA_SECRET_KEY=your-hcaptcha-secret-key-here
HCAPTCHA_SITE_KEY=your-hcaptcha-site-key-here
HCAPTCHA_SITE_KEY=your-hcaptcha-site-key-here

# --- Cloudflare configuration ---
CLOUDFLARE_TURNSTILE_SITE_KEY=your-cloudflare-turnstile-site-key-here
CLOUDFLARE_TURNSTILE_SECRET_KEY=your-cloudflare-turnstile-secret-key-here
6 changes: 5 additions & 1 deletion apps/web/.env.schema
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ OPENAI_BASE_URL=

# --- hCaptcha configuration ---
HCAPTCHA_SECRET_KEY=
HCAPTCHA_SITE_KEY=
HCAPTCHA_SITE_KEY=

# --- Cloudflare configuration ---
CLOUDFLARE_TURNSTILE_SITE_KEY=
CLOUDFLARE_TURNSTILE_SECRET_KEY=
6 changes: 3 additions & 3 deletions apps/web/middleware/helmet.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const helmetMiddleware = helmet({

'upgrade-insecure-requests': isDevelopment ? null : [],
'frame-ancestors': ["'self'", ...CORS_TRUSTED_HOSTS],
'frame-src': ["'self'", 'https://newassets.hcaptcha.com', 'https://js.hcaptcha.com', ...CORS_TRUSTED_HOSTS],
'script-src': ["'self'", "'unsafe-inline'", 'https://static.cloudflareinsights.com', 'https://js.hcaptcha.com', 'https://newassets.hcaptcha.com', ...CORS_TRUSTED_CDN_HOSTS],
'frame-src': ["'self'", 'https://newassets.hcaptcha.com', 'https://js.hcaptcha.com', 'https://challenges.cloudflare.com', ...CORS_TRUSTED_HOSTS],
'script-src': ["'self'", "'unsafe-inline'", 'https://static.cloudflareinsights.com', 'https://js.hcaptcha.com', 'https://newassets.hcaptcha.com', 'https://challenges.cloudflare.com', ...CORS_TRUSTED_CDN_HOSTS],
'style-src': ["'self'", "'unsafe-inline'", 'https://newassets.hcaptcha.com', ...CORS_TRUSTED_CDN_HOSTS],
'img-src': ["'self'", 'data:', 'https://contrib.rocks', ...CORS_TRUSTED_CDN_HOSTS],
'font-src': ["'self'", ...CORS_TRUSTED_CDN_HOSTS],
'connect-src': ["'self'", 'https://hcaptcha.com', 'https://*.hcaptcha.com', ...(APP_API_BASE_URL ? [removePathFromUrl(APP_API_BASE_URL)] : [])]
'connect-src': ["'self'", 'https://hcaptcha.com', 'https://*.hcaptcha.com', 'https://challenges.cloudflare.com', ...(APP_API_BASE_URL ? [removePathFromUrl(APP_API_BASE_URL)] : [])]
}
},
frameguard: false,
Expand Down
3 changes: 2 additions & 1 deletion apps/web/routes/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const route = new AppRoute('/', 'get', async (req, res) => {
APP_API_BASE_URL: process.env.APP_USE_BUILTIN_API === 'true'
? '/api'
: normalizeApiBaseUrl(String(process.env.APP_API_BASE_URL)),
HCAPTCHA_SITE_KEY: String(process.env.HCAPTCHA_SITE_KEY || '')
HCAPTCHA_SITE_KEY: String(process.env.HCAPTCHA_SITE_KEY || ''),
CLOUDFLARE_TURNSTILE_SITE_KEY: String(process.env.CLOUDFLARE_TURNSTILE_SITE_KEY || '')
}

res.render('layout/main', { VIEW: 'home', APP_NAME, TITLE: 'Home', BASE_URL: process.env.BASE_URL || '', META })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: default

Defined in: [packages/core/ai/openai-wrapper.js:26](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L26)
Defined in: [packages/core/ai/openai-wrapper.js:26](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L26)

OpenAIWrapper is a simple wrapper around the OpenAI API to manage contexts and generate responses.

Expand All @@ -29,7 +29,7 @@ Make sure to set the OPENAI_API_KEY and OPENAI_MODEL environment variables befor

> **new default**(`apiKey`, `model?`, `baseURL?`): `OpenAIWrapper`

Defined in: [packages/core/ai/openai-wrapper.js:43](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L43)
Defined in: [packages/core/ai/openai-wrapper.js:43](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L43)

Creates an instance of OpenAIWrapper.

Expand Down Expand Up @@ -65,7 +65,7 @@ The base URL for the OpenAI API

> **get** **baseURL**(): `string` \| `null`

Defined in: [packages/core/ai/openai-wrapper.js:63](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L63)
Defined in: [packages/core/ai/openai-wrapper.js:63](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L63)

Gets the base URL for the OpenAI API.

Expand All @@ -81,7 +81,7 @@ Gets the base URL for the OpenAI API.

> **get** **client**(): `OpenAI`

Defined in: [packages/core/ai/openai-wrapper.js:88](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L88)
Defined in: [packages/core/ai/openai-wrapper.js:88](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L88)

Gets the OpenAI client instance.

Expand All @@ -97,7 +97,7 @@ Gets the OpenAI client instance.

> **get** **context**(): [`Message`](../interfaces/Message.md)[]

Defined in: [packages/core/ai/openai-wrapper.js:96](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L96)
Defined in: [packages/core/ai/openai-wrapper.js:96](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L96)

Gets the default context.

Expand All @@ -109,7 +109,7 @@ Gets the default context.

> **set** **context**(`context`): `void`

Defined in: [packages/core/ai/openai-wrapper.js:104](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L104)
Defined in: [packages/core/ai/openai-wrapper.js:104](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L104)

Sets the default context.

Expand All @@ -131,7 +131,7 @@ Sets the default context.

> **get** **model**(): `string`

Defined in: [packages/core/ai/openai-wrapper.js:71](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L71)
Defined in: [packages/core/ai/openai-wrapper.js:71](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L71)

Gets the model.

Expand All @@ -143,7 +143,7 @@ Gets the model.

> **set** **model**(`model`): `void`

Defined in: [packages/core/ai/openai-wrapper.js:79](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L79)
Defined in: [packages/core/ai/openai-wrapper.js:79](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L79)

Sets the model.

Expand All @@ -163,7 +163,7 @@ Sets the model.

> **addContext**(...`contexts`): `void`

Defined in: [packages/core/ai/openai-wrapper.js:115](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L115)
Defined in: [packages/core/ai/openai-wrapper.js:115](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L115)

Adds one or more context objects to the existing default context.

Expand All @@ -183,7 +183,7 @@ Adds one or more context objects to the existing default context.

> **chat**(`messages`): `Promise`\<`string`\>

Defined in: [packages/core/ai/openai-wrapper.js:173](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L173)
Defined in: [packages/core/ai/openai-wrapper.js:173](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L173)

Send a chat message to the OpenAI model with the loaded contexts.

Expand All @@ -205,7 +205,7 @@ Send a chat message to the OpenAI model with the loaded contexts.

> **loadContext**(`filePath`): `void`

Defined in: [packages/core/ai/openai-wrapper.js:151](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L151)
Defined in: [packages/core/ai/openai-wrapper.js:151](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L151)

Loads a context from a file and adds it to the default context as a system message.

Expand All @@ -225,7 +225,7 @@ Loads a context from a file and adds it to the default context as a system messa

> **loadContextsFromDir**(`pathDir`): `void`

Defined in: [packages/core/ai/openai-wrapper.js:126](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L126)
Defined in: [packages/core/ai/openai-wrapper.js:126](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L126)

Load context(s) from a directory.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

# Interface: Message

Defined in: [packages/core/ai/openai-wrapper.js:8](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L8)
Defined in: [packages/core/ai/openai-wrapper.js:8](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L8)

## Properties

### content

> **content**: `string`

Defined in: [packages/core/ai/openai-wrapper.js:10](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L10)
Defined in: [packages/core/ai/openai-wrapper.js:10](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L10)

The content of the message

Expand All @@ -24,7 +24,7 @@ The content of the message

> `optional` **name?**: `string`

Defined in: [packages/core/ai/openai-wrapper.js:11](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L11)
Defined in: [packages/core/ai/openai-wrapper.js:11](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L11)

Optional name for tool/function messages

Expand All @@ -34,7 +34,7 @@ Optional name for tool/function messages

> **role**: `"system"` \| `"user"` \| `"assistant"` \| `"tool"`

Defined in: [packages/core/ai/openai-wrapper.js:9](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L9)
Defined in: [packages/core/ai/openai-wrapper.js:9](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L9)

The role of the message sender (excluding 'function' to avoid name requirement)

Expand All @@ -44,6 +44,6 @@ The role of the message sender (excluding 'function' to avoid name requirement)

> `optional` **tool\_call\_id?**: `string`

Defined in: [packages/core/ai/openai-wrapper.js:12](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L12)
Defined in: [packages/core/ai/openai-wrapper.js:12](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/ai/openai-wrapper.js#L12)

Optional tool_call_id for tool messages
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: default

Defined in: [packages/core/engine/vm-runner.js:28](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L28)
Defined in: [packages/core/engine/vm-runner.js:28](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L28)

Runs JavaScript code safely inside a sandboxed VM context.

Expand All @@ -30,7 +30,7 @@ const runner = new VMRunner(

> **new default**(`code`, `shared?`, `callback?`): `VMRunner`

Defined in: [packages/core/engine/vm-runner.js:45](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L45)
Defined in: [packages/core/engine/vm-runner.js:45](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L45)

Creates a new VMRunner instance.

Expand Down Expand Up @@ -64,39 +64,39 @@ Error-first callback for results

> **callback**: [`VMCallback`](../type-aliases/VMCallback.md) \| `null` = `null`

Defined in: [packages/core/engine/vm-runner.js:34](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L34)
Defined in: [packages/core/engine/vm-runner.js:34](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L34)

***

### code

> **code**: `string` \| `null` = `null`

Defined in: [packages/core/engine/vm-runner.js:30](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L30)
Defined in: [packages/core/engine/vm-runner.js:30](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L30)

***

### context

> **context**: [`ContextObject`](../type-aliases/ContextObject.md) \| `null` = `null`

Defined in: [packages/core/engine/vm-runner.js:36](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L36)
Defined in: [packages/core/engine/vm-runner.js:36](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L36)

***

### shared

> **shared**: [`ContextObject`](../type-aliases/ContextObject.md) \| `null` = `null`

Defined in: [packages/core/engine/vm-runner.js:32](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L32)
Defined in: [packages/core/engine/vm-runner.js:32](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L32)

## Methods

### addContext()

> **addContext**(...`contexts`): `void`

Defined in: [packages/core/engine/vm-runner.js:144](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L144)
Defined in: [packages/core/engine/vm-runner.js:144](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L144)

Adds extra variables into the VM context before running.

Expand All @@ -118,7 +118,7 @@ Objects to merge into the VM context

> **run**(): `void`

Defined in: [packages/core/engine/vm-runner.js:76](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L76)
Defined in: [packages/core/engine/vm-runner.js:76](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L76)

Runs the code inside the VM and calls the callback with the result.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

> **ContextObject** = `Record`\<`string`, `any`\>

Defined in: [packages/core/engine/vm-runner.js:11](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L11)
Defined in: [packages/core/engine/vm-runner.js:11](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L11)

## Type Parameters
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **VMCallback** = (`err`, `result?`) => `void`

Defined in: [packages/core/engine/vm-runner.js:10](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/engine/vm-runner.js#L10)
Defined in: [packages/core/engine/vm-runner.js:10](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/core/engine/vm-runner.js#L10)

## Type Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **default**(`body`): `Promise`\<\{ `data?`: `string`; `message?`: `string`; `status`: `number`; \}\>

Defined in: [packages/handlers/handle-autofill-ai.js:61](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/handlers/handle-autofill-ai.js#L61)
Defined in: [packages/handlers/handle-autofill-ai.js:65](https://github.com/GTPSHAX/modul-ajar-generator/blob/42ec3258b61b6f10fbbc19c487d848a7d8aaf16f/packages/handlers/handle-autofill-ai.js#L65)

Handles auto-filling AI functionality.

Expand Down
Loading
Loading