Orginize
This commit is contained in:
@@ -2,25 +2,25 @@ import test from 'brittle'
|
||||
import { readFileSync } from 'node:fs'
|
||||
|
||||
const STATE = readFileSync(
|
||||
new URL('../lib/agent-state.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-state.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const TOOLS =
|
||||
readFileSync(new URL('../lib/agent-tools.js', import.meta.url), 'utf8') +
|
||||
readFileSync(new URL('../lib/agent/agent-tools.js', import.meta.url), 'utf8') +
|
||||
readFileSync(
|
||||
new URL('../lib/agent-tool-definitions.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-tool-definitions.js', import.meta.url),
|
||||
'utf8'
|
||||
) +
|
||||
readFileSync(
|
||||
new URL('../lib/agent-tool-dispatch.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-tool-dispatch.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const OPENAI = readFileSync(
|
||||
new URL('../lib/agent-openai.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-openai.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const TUI = readFileSync(
|
||||
new URL('../lib/agent-tui.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-tui.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const CLI = readFileSync(new URL('../src/agent.js', import.meta.url), 'utf8')
|
||||
|
||||
@@ -5,25 +5,25 @@ import test from 'brittle'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const STATE_SRC = readFileSync(new URL('../lib/agent-state.js', import.meta.url), 'utf8')
|
||||
const STATE_SRC = readFileSync(new URL('../lib/agent/agent-state.js', import.meta.url), 'utf8')
|
||||
const HELPERS_SRC = readFileSync(
|
||||
new URL('../lib/agent-helpers.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-helpers.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const PORT_SRC = readFileSync(
|
||||
new URL('../lib/agent-grok-port.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-grok-port.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const TOOLS_SRC =
|
||||
readFileSync(new URL('../lib/agent-tools.js', import.meta.url), 'utf8') +
|
||||
readFileSync(new URL('../lib/agent/agent-tools.js', import.meta.url), 'utf8') +
|
||||
'\n' +
|
||||
readFileSync(
|
||||
new URL('../lib/agent-tool-definitions.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-tool-definitions.js', import.meta.url),
|
||||
'utf8'
|
||||
) +
|
||||
'\n' +
|
||||
readFileSync(
|
||||
new URL('../lib/agent-tool-dispatch.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-tool-dispatch.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import test from 'brittle'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const CODE = readFileSync(new URL('../lib/agent-helpers.js', import.meta.url), 'utf8')
|
||||
const CODE = readFileSync(new URL('../lib/agent/agent-helpers.js', import.meta.url), 'utf8')
|
||||
|
||||
function load() {
|
||||
const sandbox = { TextDecoder, TextEncoder, Uint8Array, console }
|
||||
|
||||
@@ -2,7 +2,7 @@ import test from 'brittle'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const SRC = readFileSync(new URL('../lib/agent-models.js', import.meta.url), 'utf8')
|
||||
const SRC = readFileSync(new URL('../lib/agent/agent-models.js', import.meta.url), 'utf8')
|
||||
|
||||
function load() {
|
||||
const sandbox = { console }
|
||||
|
||||
@@ -2,7 +2,7 @@ import test from 'brittle'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const QVAC_SRC = readFileSync(new URL('../lib/agent-qvac.js', import.meta.url), 'utf8')
|
||||
const QVAC_SRC = readFileSync(new URL('../lib/agent/agent-qvac.js', import.meta.url), 'utf8')
|
||||
|
||||
/** Eval concat-style preamble helpers into a sandbox (same shape as /bin/agent). */
|
||||
function loadAgentQvacHelpers() {
|
||||
|
||||
@@ -6,10 +6,10 @@ import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const WORKSPACE = readFileSync(
|
||||
new URL('../lib/agent-workspace.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-workspace.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const SKILLS = readFileSync(new URL('../lib/agent-skills.js', import.meta.url), 'utf8')
|
||||
const SKILLS = readFileSync(new URL('../lib/agent/agent-skills.js', import.meta.url), 'utf8')
|
||||
|
||||
/** @returns {Record<string, unknown>} */
|
||||
function loadSandbox() {
|
||||
|
||||
@@ -39,7 +39,7 @@ function loadFns(rel, names) {
|
||||
}
|
||||
|
||||
test('markdown renders headings lists and bold', () => {
|
||||
const api = loadFns('../lib/agent-markdown.js', ['bareAgentRenderMarkdown'])
|
||||
const api = loadFns('../lib/agent/agent-markdown.js', ['bareAgentRenderMarkdown'])
|
||||
const out = api.bareAgentRenderMarkdown(
|
||||
'# Title\n\nI use **bold** and `code`.\n\n1. One\n2. Two\n\n- Alpha\n- Beta\n',
|
||||
{ useColor: false, width: 72 }
|
||||
@@ -52,7 +52,7 @@ test('markdown renders headings lists and bold', () => {
|
||||
})
|
||||
|
||||
test('markdown fences keep code body', () => {
|
||||
const api = loadFns('../lib/agent-markdown.js', ['bareAgentRenderMarkdown'])
|
||||
const api = loadFns('../lib/agent/agent-markdown.js', ['bareAgentRenderMarkdown'])
|
||||
const out = api.bareAgentRenderMarkdown('```js\nconst x = 1\n```\n', {
|
||||
useColor: false,
|
||||
width: 72
|
||||
@@ -62,7 +62,7 @@ test('markdown fences keep code body', () => {
|
||||
})
|
||||
|
||||
test('think panel scrollbar and scroll keys', () => {
|
||||
const api = loadFns('../lib/agent-think-panel.js', [
|
||||
const api = loadFns('../lib/agent/agent-think-panel.js', [
|
||||
'bareAgentCreateThinkPanel',
|
||||
'bareAgentThinkScrollbar'
|
||||
])
|
||||
@@ -96,7 +96,7 @@ test('think panel scrollbar and scroll keys', () => {
|
||||
})
|
||||
|
||||
test('term cols use full width without 120 cap', () => {
|
||||
const api = loadFns('../lib/agent-think-panel.js', [
|
||||
const api = loadFns('../lib/agent/agent-think-panel.js', [
|
||||
'bareAgentResolveTermCols'
|
||||
])
|
||||
const w = api.bareAgentResolveTermCols(
|
||||
@@ -109,7 +109,7 @@ test('term cols use full width without 120 cap', () => {
|
||||
})
|
||||
|
||||
test('empty think panel never draws', () => {
|
||||
const api = loadFns('../lib/agent-think-panel.js', [
|
||||
const api = loadFns('../lib/agent/agent-think-panel.js', [
|
||||
'bareAgentCreateThinkPanel'
|
||||
])
|
||||
/** @type {string[]} */
|
||||
@@ -134,7 +134,7 @@ test('empty think panel never draws', () => {
|
||||
})
|
||||
|
||||
test('think tag splitter still works', () => {
|
||||
const api = loadFns('../lib/agent-think-panel.js', [
|
||||
const api = loadFns('../lib/agent/agent-think-panel.js', [
|
||||
'bareAgentCreateThinkTagSplitter'
|
||||
])
|
||||
/** @type {string[]} */
|
||||
|
||||
@@ -8,7 +8,7 @@ import vm from 'node:vm'
|
||||
const dir = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
function loadToolCallFns() {
|
||||
const src = readFileSync(join(dir, '../lib/agent-tui.js'), 'utf8')
|
||||
const src = readFileSync(join(dir, '../lib/agent/agent-tui.js'), 'utf8')
|
||||
const start = src.indexOf('function bareAgentMergeToolCallDelta')
|
||||
const end = src.indexOf('function bareAgentReasoningSettings')
|
||||
assert.ok(start >= 0 && end > start, 'tool-call helpers missing in agent-tui.js')
|
||||
|
||||
@@ -3,15 +3,15 @@ import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const CODE =
|
||||
readFileSync(new URL('../lib/agent-tools.js', import.meta.url), 'utf8') +
|
||||
readFileSync(new URL('../lib/agent/agent-tools.js', import.meta.url), 'utf8') +
|
||||
'\n' +
|
||||
readFileSync(
|
||||
new URL('../lib/agent-tool-definitions.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-tool-definitions.js', import.meta.url),
|
||||
'utf8'
|
||||
) +
|
||||
'\n' +
|
||||
readFileSync(
|
||||
new URL('../lib/agent-tool-dispatch.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-tool-dispatch.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ import test from 'brittle'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const STATE_SRC = readFileSync(new URL('../lib/agent-state.js', import.meta.url), 'utf8')
|
||||
const STATE_SRC = readFileSync(new URL('../lib/agent/agent-state.js', import.meta.url), 'utf8')
|
||||
const COMPACT_SRC = readFileSync(
|
||||
new URL('../lib/agent-compact.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-compact.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const CODE = readFileSync(
|
||||
new URL('../lib/agent-web-fetch.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-web-fetch.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { readFileSync } from 'node:fs'
|
||||
import vm from 'node:vm'
|
||||
|
||||
const CODE = readFileSync(
|
||||
new URL('../lib/agent-workspace.js', import.meta.url),
|
||||
new URL('../lib/agent/agent-workspace.js', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor
|
||||
|
||||
async function loadAppstoreBin() {
|
||||
const runtime = await readFile(path.join(__dirname, '../lib/runtime.js'), 'utf8')
|
||||
const p2p = await readFile(path.join(__dirname, '../lib/p2p-suite.js'), 'utf8')
|
||||
const pear = await readFile(path.join(__dirname, '../lib/appstore-pear.js'), 'utf8')
|
||||
const p2p = await readFile(path.join(__dirname, '../lib/p2p/p2p-suite.js'), 'utf8')
|
||||
const pear = await readFile(path.join(__dirname, '../lib/pear/appstore-pear.js'), 'utf8')
|
||||
const body = await readFile(path.join(__dirname, '../src/appstore.js'), 'utf8')
|
||||
return new AsyncFunction(
|
||||
'ctx',
|
||||
|
||||
@@ -5,7 +5,7 @@ import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import test from 'brittle'
|
||||
import { bareAwkRun } from '../lib/awk-engine.js'
|
||||
import { bareAwkRun } from '../lib/engines/awk-engine.js'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const srcDir = join(__dirname, '../src')
|
||||
@@ -24,7 +24,7 @@ test('awk.js exists and wires field parsing', async (t) => {
|
||||
})
|
||||
|
||||
test('awk-engine supports delete arr[key] statement', async (t) => {
|
||||
const s = await readFile(join(__dirname, '../lib/awk-engine.js'), 'utf8')
|
||||
const s = await readFile(join(__dirname, '../lib/engines/awk-engine.js'), 'utf8')
|
||||
t.ok(s.includes("id === 'delete'"))
|
||||
t.ok(s.includes("case 'delete':"))
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@ import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const tuiPath = join(__dirname, '../lib/baretop-tui.js')
|
||||
const tuiPath = join(__dirname, '../lib/baretop/baretop-tui.js')
|
||||
const kernelBaretop = join(__dirname, '../../../kernel/bin/baretop')
|
||||
const kernelBtop = join(__dirname, '../../../kernel/bin/btop')
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import { fileURLToPath } from 'node:url'
|
||||
import { createContext, runInContext } from 'node:vm'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const helpersPath = join(__dirname, '../lib/baretop-ui-helpers.js')
|
||||
const composePath = join(__dirname, '../lib/baretop-compose.js')
|
||||
const helpersPath = join(__dirname, '../lib/baretop/baretop-ui-helpers.js')
|
||||
const composePath = join(__dirname, '../lib/baretop/baretop-compose.js')
|
||||
const fixturePath = join(__dirname, 'fixtures/baretop-process-table.json')
|
||||
|
||||
test('bareTopComposeSmokeTestFrame golden lines', async (t) => {
|
||||
|
||||
@@ -11,8 +11,8 @@ const largeProcessTableFixture = join(
|
||||
__dirname,
|
||||
'fixtures/baretop-large-process-table.json'
|
||||
)
|
||||
const helpersPath = join(__dirname, '../lib/baretop-ui-helpers.js')
|
||||
const snapPath = join(__dirname, '../lib/baretop-snapshot.js')
|
||||
const helpersPath = join(__dirname, '../lib/baretop/baretop-ui-helpers.js')
|
||||
const snapPath = join(__dirname, '../lib/baretop/baretop-snapshot.js')
|
||||
|
||||
test('fixture metrics_live-shaped JSON parses with expected keys', async (t) => {
|
||||
const raw = await readFile(fixturePath, 'utf8')
|
||||
|
||||
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'
|
||||
import { createContext, runInContext } from 'node:vm'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const composePath = join(__dirname, '../lib/baretop-compose.js')
|
||||
const composePath = join(__dirname, '../lib/baretop/baretop-compose.js')
|
||||
|
||||
test('incremental line-diff patch is smaller than full frame when one line changes', async (t) => {
|
||||
const compose = await readFile(composePath, 'utf8')
|
||||
|
||||
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'
|
||||
import { createContext, runInContext } from 'node:vm'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const tuiPath = join(__dirname, '../lib/baretop-tui.js')
|
||||
const tuiPath = join(__dirname, '../lib/baretop/baretop-tui.js')
|
||||
|
||||
test('bareTopModalSleepMs prioritizes buffered input', async (t) => {
|
||||
const src = await readFile(tuiPath, 'utf8')
|
||||
|
||||
@@ -5,9 +5,9 @@ import { fileURLToPath } from 'node:url'
|
||||
import { createContext, runInContext } from 'node:vm'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const snapshotPath = join(__dirname, '../lib/baretop-snapshot.js')
|
||||
const helpersPath = join(__dirname, '../lib/baretop-ui-helpers.js')
|
||||
const tuiPath = join(__dirname, '../lib/baretop-tui.js')
|
||||
const snapshotPath = join(__dirname, '../lib/baretop/baretop-snapshot.js')
|
||||
const helpersPath = join(__dirname, '../lib/baretop/baretop-ui-helpers.js')
|
||||
const tuiPath = join(__dirname, '../lib/baretop/baretop-tui.js')
|
||||
|
||||
test('baretop snapshot supports extended missing-signal hints', async (t) => {
|
||||
const src = await readFile(snapshotPath, 'utf8')
|
||||
|
||||
@@ -5,8 +5,8 @@ import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const helpersPath = join(__dirname, '../lib/baretop-ui-helpers.js')
|
||||
const composePath = join(__dirname, '../lib/baretop-compose.js')
|
||||
const helpersPath = join(__dirname, '../lib/baretop/baretop-ui-helpers.js')
|
||||
const composePath = join(__dirname, '../lib/baretop/baretop-compose.js')
|
||||
const largeProcPath = join(__dirname, 'fixtures/baretop-large-process-table.json')
|
||||
const largeNetPath = join(__dirname, 'fixtures/baretop-large-net-summary.json')
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const helpersPath = join(__dirname, '../lib/baretop-ui-helpers.js')
|
||||
const composePath = join(__dirname, '../lib/baretop-compose.js')
|
||||
const helpersPath = join(__dirname, '../lib/baretop/baretop-ui-helpers.js')
|
||||
const composePath = join(__dirname, '../lib/baretop/baretop-compose.js')
|
||||
|
||||
test('stress synthetic snapshots do not crash compose loop', async (t) => {
|
||||
const helpers = await readFile(helpersPath, 'utf8')
|
||||
|
||||
@@ -3,7 +3,7 @@ import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/bare-os-tui-sdk.js'
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/services/bare-os-tui-sdk.js'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const lib = (name) => join(__dirname, '../lib', name)
|
||||
|
||||
@@ -5,7 +5,7 @@ import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const helpersPath = join(__dirname, '../lib/baretop-ui-helpers.js')
|
||||
const helpersPath = join(__dirname, '../lib/baretop/baretop-ui-helpers.js')
|
||||
const largeNetFixture = join(
|
||||
__dirname,
|
||||
'fixtures/baretop-large-net-summary.json'
|
||||
|
||||
@@ -3,10 +3,10 @@ import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/bare-os-tui-sdk.js'
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/services/bare-os-tui-sdk.js'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const libPath = join(__dirname, '../lib/chat-tui.js')
|
||||
const libPath = join(__dirname, '../lib/edit/chat-tui.js')
|
||||
|
||||
async function loadChatTui() {
|
||||
const src = await readFile(libPath, 'utf8')
|
||||
|
||||
@@ -7,7 +7,7 @@ import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const parseSrc = readFileSync(join(__dirname, '../lib/edit-key-parse.js'), 'utf8')
|
||||
const parseSrc = readFileSync(join(__dirname, '../lib/edit/edit-key-parse.js'), 'utf8')
|
||||
const hook = {}
|
||||
new Function(
|
||||
'exports',
|
||||
|
||||
@@ -4,7 +4,7 @@ import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const tuiPath = join(__dirname, '../lib/edit-tui.js')
|
||||
const tuiPath = join(__dirname, '../lib/edit/edit-tui.js')
|
||||
const kernelEditPath = join(__dirname, '../../../kernel/bin/edit')
|
||||
|
||||
test('edit-tui finally tears down alternate screen or clears display', async (t) => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/bare-os-tui-sdk.js'
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/services/bare-os-tui-sdk.js'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const lib = (name) => join(__dirname, '../lib', name)
|
||||
|
||||
@@ -8,12 +8,12 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function load() {
|
||||
const parts = await Promise.all([
|
||||
readFile(join(__dirname, '../lib/irc-parse.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-isupport.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-sasl.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-state.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-config.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-client.js'), 'utf8')
|
||||
readFile(join(__dirname, '../lib/irc/irc-parse.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-isupport.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-sasl.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-state.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-config.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-client.js'), 'utf8')
|
||||
])
|
||||
const hook = {}
|
||||
new Function(
|
||||
|
||||
@@ -7,13 +7,13 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function load() {
|
||||
const parts = await Promise.all([
|
||||
readFile(join(__dirname, '../lib/irc-parse.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-isupport.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-sasl.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-state.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-config.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-client.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-commands.js'), 'utf8')
|
||||
readFile(join(__dirname, '../lib/irc/irc-parse.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-isupport.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-sasl.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-state.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-config.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-client.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-commands.js'), 'utf8')
|
||||
])
|
||||
const hook = {}
|
||||
new Function(
|
||||
|
||||
@@ -7,8 +7,8 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function load() {
|
||||
const parts = await Promise.all([
|
||||
readFile(join(__dirname, '../lib/irc-config.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-dial.js'), 'utf8')
|
||||
readFile(join(__dirname, '../lib/irc/irc-config.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-dial.js'), 'utf8')
|
||||
])
|
||||
const hook = {}
|
||||
new Function(
|
||||
|
||||
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url'
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function load() {
|
||||
const src = await readFile(join(__dirname, '../lib/irc-parse.js'), 'utf8')
|
||||
const src = await readFile(join(__dirname, '../lib/irc/irc-parse.js'), 'utf8')
|
||||
const hook = {}
|
||||
new Function(
|
||||
'exports',
|
||||
|
||||
@@ -3,21 +3,21 @@ import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/bare-os-tui-sdk.js'
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/services/bare-os-tui-sdk.js'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function load() {
|
||||
const parts = await Promise.all([
|
||||
readFile(join(__dirname, '../lib/irc-parse.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-isupport.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-sasl.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-state.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-config.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-client.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-dial.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-commands.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc-tui.js'), 'utf8')
|
||||
readFile(join(__dirname, '../lib/irc/irc-parse.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-isupport.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-sasl.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-state.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-config.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-client.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-dial.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-commands.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/irc/irc-tui.js'), 'utf8')
|
||||
])
|
||||
const hook = {}
|
||||
new Function(
|
||||
|
||||
@@ -10,7 +10,7 @@ const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor
|
||||
async function loadLoginBin() {
|
||||
const runtime = await readFile(path.join(__dirname, '../lib/runtime.js'), 'utf8')
|
||||
const preamble = await readFile(
|
||||
path.join(__dirname, '../lib/interactive-masked-line.js'),
|
||||
path.join(__dirname, '../lib/edit/interactive-masked-line.js'),
|
||||
'utf8'
|
||||
)
|
||||
const body = await readFile(path.join(__dirname, '../src/login.js'), 'utf8')
|
||||
|
||||
@@ -3,10 +3,10 @@ import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/bare-os-tui-sdk.js'
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/services/bare-os-tui-sdk.js'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const libPath = join(__dirname, '../lib/p2p-suite-tui.js')
|
||||
const libPath = join(__dirname, '../lib/p2p/p2p-suite-tui.js')
|
||||
|
||||
async function loadP2pTui() {
|
||||
const src = await readFile(libPath, 'utf8')
|
||||
|
||||
@@ -9,8 +9,8 @@ const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor
|
||||
|
||||
async function loadPearBin() {
|
||||
const runtime = await readFile(path.join(__dirname, '../lib/runtime.js'), 'utf8')
|
||||
const stage = await readFile(path.join(__dirname, '../lib/pear-stage.js'), 'utf8')
|
||||
const release = await readFile(path.join(__dirname, '../lib/pear-release.js'), 'utf8')
|
||||
const stage = await readFile(path.join(__dirname, '../lib/pear/pear-stage.js'), 'utf8')
|
||||
const release = await readFile(path.join(__dirname, '../lib/pear/pear-release.js'), 'utf8')
|
||||
const body = await readFile(path.join(__dirname, '../src/pear.js'), 'utf8')
|
||||
return new AsyncFunction(
|
||||
'ctx',
|
||||
|
||||
@@ -9,7 +9,7 @@ const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor
|
||||
|
||||
async function loadPearBin() {
|
||||
const runtime = await readFile(path.join(__dirname, '../lib/runtime.js'), 'utf8')
|
||||
const stage = await readFile(path.join(__dirname, '../lib/pear-stage.js'), 'utf8')
|
||||
const stage = await readFile(path.join(__dirname, '../lib/pear/pear-stage.js'), 'utf8')
|
||||
const body = await readFile(path.join(__dirname, '../src/pear.js'), 'utf8')
|
||||
return new AsyncFunction(
|
||||
'ctx',
|
||||
|
||||
@@ -8,7 +8,7 @@ import vm from 'node:vm'
|
||||
import test from 'brittle'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
const sha224Lib = path.join(__dirname, '../lib/sha224.js')
|
||||
const sha224Lib = path.join(__dirname, '../lib/engines/sha224.js')
|
||||
|
||||
function loadBareSha224() {
|
||||
const src = readFileSync(sha224Lib, 'utf8')
|
||||
|
||||
@@ -7,16 +7,16 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function load() {
|
||||
const parts = await Promise.all([
|
||||
readFile(join(__dirname, '../lib/summon-url.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-cookie.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-http.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-html.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-css.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-layout.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-form.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-dom.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-js.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-session.js'), 'utf8')
|
||||
readFile(join(__dirname, '../lib/summon/summon-url.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-cookie.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-http.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-html.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-css.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-layout.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-form.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-dom.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-js.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-session.js'), 'utf8')
|
||||
])
|
||||
const hook = {}
|
||||
new Function(
|
||||
|
||||
@@ -3,23 +3,23 @@ import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/bare-os-tui-sdk.js'
|
||||
import { attachBareOsTuiSdk } from '../../bare-os-booter/lib/services/bare-os-tui-sdk.js'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function load() {
|
||||
const parts = await Promise.all([
|
||||
readFile(join(__dirname, '../lib/summon-url.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-cookie.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-http.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-html.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-css.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-layout.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-form.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-dom.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-js.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-session.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon-tui.js'), 'utf8')
|
||||
readFile(join(__dirname, '../lib/summon/summon-url.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-cookie.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-http.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-html.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-css.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-layout.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-form.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-dom.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-js.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-session.js'), 'utf8'),
|
||||
readFile(join(__dirname, '../lib/summon/summon-tui.js'), 'utf8')
|
||||
])
|
||||
const hook = {}
|
||||
new Function(
|
||||
|
||||
Reference in New Issue
Block a user