Deepen all 16 pear-platform scaffolds to production APIs.

Expands spawn, argv, preflight, trust, OTA, pipes, and headless UI modules;
bumps to 0.3.1 with fuller tests and registry tier updates.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 01:35:15 -04:00
co-authored by Cursor
parent 64a2a824b5
commit 83a0ee684c
51 changed files with 982 additions and 178 deletions
@@ -1,12 +1,26 @@
require('bare-process/global')
const test = require('brittle')
const { HyperPearPreflightSync, PROTOCOL } = require('../index.js')
const { HyperPearPreflightSync } = require('../index.js')
test('preflight job', async (t) => {
const p = new HyperPearPreflightSync()
const j = p.start('pear://app', { id: 'j1' })
p.recordAsset('j1', 'a.js')
const job = p.start('pear://app', { id: 'j1' })
t.ok(job)
p.recordAsset('j1', 'bundle.js', 1024)
p.setProgress('j1', 0.5)
t.ok(p.complete('j1'))
t.ok(p.isReady('j1'))
await p.close()
})
test('startFromPlan and fail', async (t) => {
const p = new HyperPearPreflightSync()
const job = p.startFromPlan({
runId: 'plan1',
entrypoint: 'index.js',
resolved: { kind: 'pear-link', href: 'pear://k' }
})
t.ok(p.fail(job.id, 'network'))
t.is(p.getStats().failed, 1)
await p.close()
})