Minimal Electron shell over the DSH JSON-RPC runtime — a first-look at what a ChatGPT.app-style host on top of the DeepSeek Harness looks like, with the harness's normally-invisible internals (trace timeline, context surface, subagent tree, compaction, plugin registry, rubrics) brought forward as first-class UI surfaces so plugin authors and researchers can see what the agent is actually doing. Runs against three keyless-to-live profiles (stdio-echo works on master out of the box; daemon-echo / daemon-vibe-echo activate once the daemon-demo lands; stdio-deepseek and daemon-vibe hit the real DeepSeek API when you supply a key). HARNESS_DEV auto-resolves to the in-repo runtime when this shell ships under examples/desktop/, so a fresh clone launches without config; env DSH_DEV_ROOT overrides for custom layouts, and a sibling deepseek-harness-dev/ checkout is the original dev workflow. Cold-clone gate (P0 fixes for first-time-clone usability): - HARNESS_DEV: 3-candidate resolver (env → walk-up in-repo marker → sibling), unit-tested via mock fs so ordering is locked without needing either real layout on disk. - config yml leaves rewritten at assemble time so the sibling-clone paths (../../deepseek-harness-dev/examples/echo-agent/…) become the in-repo paths (../../echo-agent/…) in the released tree — source yml stays usable for local dev, released tree ships a working shape. - pnpm-workspace.yaml allowBuilds.electron = true (was placeholder). - missing-key card in stdio-deepseek offers a one-click switch to stdio-echo (the keyless profile that works on master) rather than daemon-echo (blocked on the not-yet-shipped daemon-demo). - assemble-oss-release.sh rewrites the source-side breadcrumb name 'dsh-desktop-demo' → 'dsh-desktop' for the released package.json. FOUC guard on the onboarding gate (41fc5df carried) keeps the first-launch splash from flashing before the runtime probe finishes. Test suite (1634 tests in source, 3990 in the runtime repo) covers resolver ordering, renderer classifiers, trace timeline shape, compaction diff rendering, rubric parity, and the missing-key onboarding paths.
40 lines
1.9 KiB
JavaScript
40 lines
1.9 KiB
JavaScript
// Static gate for the emoji ban (user directive 2026-07-17; density-spec §5:
|
|
// "no emoji anywhere — typographic ✓ ✗ ↑ ↓ · allowed"). Pictographic emoji
|
|
// render as COLOR glyphs and survived one dedicated sweep batch (t159) plus
|
|
// four drift-review cycles before drift D43 caught the ⏳ family — reviewer
|
|
// eyes are provably not enough, so this locks the ban at the test layer.
|
|
'use strict'
|
|
const test = require('node:test')
|
|
const assert = require('node:assert')
|
|
const fs = require('node:fs')
|
|
const path = require('node:path')
|
|
|
|
// Pictographic / symbol blocks that render as color emoji in Chromium.
|
|
// Deliberately EXCLUDES the typographic carve-outs the spec allows
|
|
// (✓ U+2713, ✗ U+2717, ↑ ↓ arrows, · ⋯ ∘ ▸ ▹ punctuation/math).
|
|
const EMOJI_RE = /[\u{1F000}-\u{1FAFF}\u{2600}-\u{26FF}\u{2700}-\u{2712}\u{2714}\u{2716}\u{2728}-\u{274B}\u{2753}-\u{27BF}\u{2B00}-\u{2BFF}\u{FE0F}]/u
|
|
|
|
const ROOTS = ['src/renderer', 'src/main', 'src/preload']
|
|
|
|
test('no pictographic emoji in shipped source (drift D43 gate)', () => {
|
|
const offenders = []
|
|
for (const root of ROOTS) {
|
|
const dir = path.resolve(__dirname, '..', root)
|
|
if (!fs.existsSync(dir)) continue
|
|
for (const f of fs.readdirSync(dir)) {
|
|
if (!/\.(js|html|css)$/.test(f)) continue
|
|
const lines = fs.readFileSync(path.join(dir, f), 'utf8').split('\n')
|
|
lines.forEach((line, i) => {
|
|
// Comments are exempt: the ban is about rendered UI, and docs may
|
|
// legitimately NAME a banned glyph while explaining the ban.
|
|
const trimmed = line.trim()
|
|
if (trimmed.startsWith('//') || trimmed.startsWith('*') || trimmed.startsWith('<!--')) return
|
|
const m = line.match(EMOJI_RE)
|
|
if (m) offenders.push(`${root}/${f}:${i + 1} contains ${JSON.stringify(m[0])}`)
|
|
})
|
|
}
|
|
}
|
|
assert.deepStrictEqual(offenders, [],
|
|
`emoji ban violated:\n${offenders.join('\n')}`)
|
|
})
|