Skip to content
Open
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
4 changes: 2 additions & 2 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ An agentic AI coding app for the Mac, with the TensorFold engine built in. It al
any OpenAI‑compatible LLM endpoint, local or cloud. The look comes from the TensorFold brand:
graphite and navy surfaces, an electric-blue primary and the fold gradient.

The current desktop release is [beta 9](https://github.com/ashhart/TensorFold/releases/tag/v1.0.0-beta.9).
It launches the bundled native Zig engine directly.
The current desktop release is [beta 10](https://github.com/ashhart/TensorFold/releases/tag/v1.0.0-beta.10).
It launches the bundled TensorFold 1.1.4 native Zig engine directly.

It reads, edits, and runs your code through a tool‑use loop, with streaming responses,
live diffs, and per‑action approval.
Expand Down
10 changes: 5 additions & 5 deletions app/build/engine.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"version": "1.1.0",
"version": "1.1.4",
"platform": "macos-arm64",
"archive": "tensorfold-1.1.0-macos-arm64.tar.gz",
"root": "tensorfold-1.1.0-macos-arm64",
"url": "https://github.com/ashhart/TensorFold/releases/download/v1.1.0/tensorfold-1.1.0-macos-arm64.tar.gz",
"sha256": "99c66f56fcde07a7dd8df6ea555bcbd406d0537b7d92a453112a54bef5a72707",
"archive": "tensorfold-1.1.4-macos-arm64.tar.gz",
"root": "tensorfold-1.1.4-macos-arm64",
"url": "https://github.com/ashhart/TensorFold/releases/download/v1.1.4/tensorfold-1.1.4-macos-arm64.tar.gz",
"sha256": "e60096c8af989f26eb622bde3099ff6ed3ecc37cdd46ade0397b3afd16145c6f",
"required": [
"bin/tensorfold-native",
"lib/libtfgrammar.dylib",
Expand Down
22 changes: 22 additions & 0 deletions app/docs/beta/1.0.0-beta.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# TensorFold app 1.0.0-beta.10

This macOS app beta bundles the released TensorFold 1.1.4 native engine for Apple silicon on macOS 13.3 or later.
The engine archive is pinned to its published SHA-256 and its internal file checksums are verified before packaging.

## In this beta

- Update the bundled native engine from 1.1.0 to 1.1.4. See the [engine release notes](https://github.com/ashhart/TensorFold/releases/tag/v1.1.4) for its platform-specific changes and measurements.
- Benchmarks use the engine's community-v2 protocol, recording request routes, cache format and natural sampled stops. Saved community-v1 results remain readable with their original protocol label.
- Google sign-in accepts Google's issuer callback parameter and shows a useful explanation when sign-in fails.
- Update checks and downloads work through fake-IP proxies while retaining the destination checks used for Hub downloads.
- The model library uses the engine's geometry admission checks before offering a checkpoint for loading.
- Update the shipped HTTP, email and schema-validation dependencies to patched versions.

## Limits and qualification

The beta.9 limitations still apply, including disabled Cortheon web research, experimental Living Weights and incomplete distributed-inference qualification.
Google and messaging connections require user-owned accounts and permissions; synthetic service checks do not establish every live-account workflow.
Window-close flashing reported in Full mode remains under investigation.
No new mobile or watch installer is included.

Download the signed Mac installer from https://tensorfold.dev/download/mac, or use the in-app update prompt after the signed feed detects this version.
2 changes: 1 addition & 1 deletion app/electron/agent/engine/benchmark/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class ModelBenchmarks {
job.receipt = receipt ? parseBenchmarkReceipt(JSON.stringify(receipt), { ...input, engineVersion: checkpoint?.engineVersion ?? BENCHMARK_ENGINE_VERSION }, this.now()) : null
if (job.receipt) {
if (checkpoint && (job.receipt.model.revision !== checkpoint.revision || job.receipt.model.config_sha256 !== checkpoint.configSha256)) { job.receipt = null; throw new Error('The cached checkpoint changed during the benchmark.') }
job.snapshot.metadata = structuredClone({ runtime: job.receipt.runtime, model: job.receipt.model, hardware: job.receipt.hardware, settings: job.receipt.settings })
job.snapshot.metadata = structuredClone({ suite: job.receipt.suite, runtime: job.receipt.runtime, model: job.receipt.model, hardware: job.receipt.hardware, settings: job.receipt.settings })
job.snapshot.cells = benchmarkCells(job.receipt)
job.snapshot.receiptAvailable = true
job.snapshot.protocolComplete = benchmarkProtocolComplete(job.receipt)
Expand Down
6 changes: 3 additions & 3 deletions app/electron/agent/engine/benchmark/fake-benchmark.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url'
let args = process.argv.slice(2)
let scenario = 'complete'
if (args[0]?.startsWith('scenario:')) scenario = args.shift().slice(9)
const engineVersion = scenario === 'old-version' ? '1.0.12' : scenario === 'unknown-version' ? '9.9.9' : '1.1.0'
const engineVersion = scenario === 'old-version' ? '1.0.12' : scenario === 'unknown-version' ? '9.9.9' : JSON.parse(readFileSync(new URL('../../../../build/engine.json', import.meta.url), 'utf8')).version
if (args[0] === '--version') { console.log(`tensorfold-native ${engineVersion}`); process.exit(0) }
if (args[0] !== 'benchmark') {
const fixture = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../test-fixtures/fake-engine.mjs')
Expand All @@ -19,8 +19,8 @@ const serial = args.includes('--serial')
const root = path.join(process.env.HF_HUB_CACHE ?? '', `models--${model.replace('/', '--')}`)
let revision = 'a'.repeat(40), config = Buffer.from('{}')
try { revision = readFileSync(path.join(root, 'refs', 'main'), 'utf8').trim(); config = readFileSync(path.join(root, 'snapshots', revision, 'config.json')) } catch {}
const receipt = { schema_version: 1, suite: { id: 'community-v1', sha256: '9bb717da00666b90b4006174abd9ed46108affc37456b43c64a224a9c938d5be' }, run_id: '00000000-0000-4000-8000-000000000001', created_at: '2026-01-01T00:00:00Z', runtime: { tensorfold_version: scenario === 'mismatched-receipt' ? '1.0.12' : engineVersion, backend: 'mlx', python_version: 'none', platform: 'macos', dependencies: {} }, model: { repo_id: model, revision, family: 'qwen3_5', config_sha256: createHash('sha256').update(config).digest('hex'), tokenizer_sha256: null, quantization: 'mlx-4bit-g64', drafter_repo_id: null, local: false }, hardware: { cpu_model: 'Synthetic CPU', system_memory_bytes: 16 * 1024 ** 3, memory_type: 'unified', gpus: [{ name: 'Synthetic GPU', memory_bytes: null, cores: 8 }], gpu_count: 1, source: 'detected' }, settings: { tokens: 256, repetitions: 5, temperatures: [1, 0], serial, context_tokens: 4096, managed: true, rank_count: 1 }, samples: [] }
const sample = (fixture_id, temperature, repeat) => ({ fixture_id, temperature, repeat, seed: 1234 + Math.max(0, repeat), status: 'ok', prompt_tokens: 24, completion_tokens: 256, cached_tokens: 0, delivery_seconds: 2.55, delivery_tps: 100, ttft_seconds: 0.1, end_to_end_seconds: 2.8, server_decode_tps: 110, server_decode_seconds: null, prefill_seconds: null, token_sha: 'd'.repeat(12), error_code: null })
const receipt = { schema_version: 1, suite: { id: 'community-v2', sha256: '51136f5d6775b2ff427834c6b1038b584de27e0a267cfc088ff2694ea069dcdc' }, run_id: '00000000-0000-4000-8000-000000000001', created_at: '2026-01-01T00:00:00Z', runtime: { tensorfold_version: scenario === 'mismatched-receipt' ? '1.0.12' : engineVersion, backend: 'mlx', python_version: 'none', platform: 'macos', dependencies: {} }, model: { repo_id: model, revision, family: 'qwen3_5', config_sha256: createHash('sha256').update(config).digest('hex'), tokenizer_sha256: null, quantization: 'mlx-4bit-g64', drafter_repo_id: null, local: false }, hardware: { cpu_model: 'Synthetic CPU', system_memory_bytes: 16 * 1024 ** 3, memory_type: 'unified', gpus: [{ name: 'Synthetic GPU', memory_bytes: null, cores: 8 }], gpu_count: 1, source: 'detected' }, settings: { tokens: 256, repetitions: 5, temperatures: [1, 0], serial, context_tokens: 4096, managed: true, rank_count: 1, kv_cache: 'bf16' }, samples: [] }
const sample = (fixture_id, temperature, repeat) => ({ fixture_id, temperature, repeat, seed: 1234 + Math.max(0, repeat), status: 'ok', prompt_tokens: 24, completion_tokens: 256, cached_tokens: 0, delivery_seconds: 2.55, delivery_tps: 100, ttft_seconds: 0.1, end_to_end_seconds: 2.8, server_decode_tps: 110, server_decode_seconds: null, prefill_seconds: null, token_sha: 'd'.repeat(12), error_code: null, finish_reason: 'length', route: fixture_id === 'chat' ? '/v1/chat/completions' : '/v1/completions' })
const save = () => writeFileSync(output, JSON.stringify(receipt), { mode: 0o600, flag: 'wx' })
const say = text => scenario === 'stderr' ? console.error(text) : console.log(text)
if (scenario === 'missing') process.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion app/electron/agent/engine/benchmark/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { BENCHMARK_ENGINE_VERSION } from './version'

/** Synthetic receipt factory for regression tests, with no user or model output. */
export function syntheticBenchmarkReceipt(model = 'example-org/synthetic-model'): ModelBenchmarkReceipt {
return { schema_version: 1, suite: { id: 'community-v1', sha256: BENCHMARK_SUITE_SHA }, run_id: '00000000-0000-4000-8000-000000000001', created_at: '2026-01-01T00:00:00Z', runtime: { tensorfold_version: BENCHMARK_ENGINE_VERSION, backend: 'mlx', python_version: 'none', platform: 'macos', dependencies: {} }, model: { repo_id: model, revision: 'a'.repeat(40), family: 'qwen3_5', config_sha256: 'b'.repeat(64), tokenizer_sha256: 'c'.repeat(64), quantization: 'mlx-affine-4bit-g64', drafter_repo_id: null, local: false }, hardware: { cpu_model: 'Synthetic CPU', system_memory_bytes: 16 * 1024 ** 3, memory_type: 'unified', gpus: [{ name: 'Synthetic GPU', memory_bytes: null, cores: 8 }], gpu_count: 1, source: 'detected' }, settings: { tokens: 256, repetitions: 5, temperatures: [1, 0], serial: false, context_tokens: 4096, managed: true, rank_count: 1 }, samples: [1, 0].flatMap(temperature => (['code', 'chat'] as const).flatMap(fixture_id => Array.from({ length: 5 }, (_, repeat) => ({ fixture_id, temperature, repeat, seed: 1234 + repeat, status: 'ok' as const, prompt_tokens: 24, completion_tokens: 256, cached_tokens: 0, delivery_seconds: 2.55, delivery_tps: 100, ttft_seconds: 0.1 + repeat * 0.1, end_to_end_seconds: 2.8, server_decode_tps: 110, server_decode_seconds: null, prefill_seconds: null, token_sha: 'd'.repeat(12), error_code: null })))) }
return { schema_version: 1, suite: { id: 'community-v2', sha256: BENCHMARK_SUITE_SHA }, run_id: '00000000-0000-4000-8000-000000000001', created_at: '2026-01-01T00:00:00Z', runtime: { tensorfold_version: BENCHMARK_ENGINE_VERSION, backend: 'mlx', python_version: 'none', platform: 'macos', dependencies: {} }, model: { repo_id: model, revision: 'a'.repeat(40), family: 'qwen3_5', config_sha256: 'b'.repeat(64), tokenizer_sha256: 'c'.repeat(64), quantization: 'mlx-affine-4bit-g64', drafter_repo_id: null, local: false }, hardware: { cpu_model: 'Synthetic CPU', system_memory_bytes: 16 * 1024 ** 3, memory_type: 'unified', gpus: [{ name: 'Synthetic GPU', memory_bytes: null, cores: 8 }], gpu_count: 1, source: 'detected' }, settings: { tokens: 256, repetitions: 5, temperatures: [1, 0], serial: false, context_tokens: 4096, managed: true, rank_count: 1, kv_cache: 'bf16' }, samples: [1, 0].flatMap(temperature => (['code', 'chat'] as const).flatMap(fixture_id => Array.from({ length: 5 }, (_, repeat) => ({ fixture_id, temperature, repeat, seed: 1234 + repeat, status: 'ok' as const, prompt_tokens: 24, completion_tokens: 256, cached_tokens: 0, delivery_seconds: 2.55, delivery_tps: 100, ttft_seconds: 0.1 + repeat * 0.1, end_to_end_seconds: 2.8, server_decode_tps: 110, server_decode_seconds: null, prefill_seconds: null, token_sha: 'd'.repeat(12), error_code: null, finish_reason: 'length' as const, route: fixture_id === 'chat' ? '/v1/chat/completions' as const : '/v1/completions' as const })))) }
}
43 changes: 37 additions & 6 deletions app/electron/agent/engine/benchmark/receipt.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'node:assert/strict'
import { syntheticBenchmarkReceipt } from './fixtures'
import { parseBenchmarkReceipt, benchmarkCells, benchmarkProtocolComplete } from './receipt'
import { parseBenchmarkReceipt, benchmarkCells, benchmarkProtocolComplete, LEGACY_BENCHMARK_SUITE_SHA } from './receipt'
import { assertBundledBenchmarkVersion, BENCHMARK_ENGINE_VERSION } from './version'

const receipt = syntheticBenchmarkReceipt()
Expand All @@ -12,11 +12,28 @@ assert.equal(benchmarkCells(parsed)[0].successful, 5)
assert.equal(benchmarkCells(parsed)[0].deliveryTokensPerSecond?.median, 100)
assert.equal(benchmarkCells(parsed)[0].firstTextSeconds?.median, 0.30000000000000004)
assert.equal(parsed.samples[0].server_decode_seconds, null, 'missing engine duration stays unknown')
const current = structuredClone(receipt); current.runtime.tensorfold_version = '1.1.0'
assert.equal(parseBenchmarkReceipt(JSON.stringify(current), { model: current.model.repo_id, serial: false, engineVersion: '1.1.0' }).runtime.tensorfold_version, '1.1.0')
const historical = structuredClone(receipt); historical.runtime.tensorfold_version = '1.0.12'
assert.equal(parseBenchmarkReceipt(JSON.stringify(historical)).runtime.tensorfold_version, '1.0.12', 'reviewed historical receipts remain readable after the engine update')
assert.throws(() => parseBenchmarkReceipt(JSON.stringify(historical), { model: historical.model.repo_id, serial: false, engineVersion: '1.1.0' }), /invalid|unsupported/, 'a historical receipt cannot substitute for a live run on the new engine')
assert.equal(parseBenchmarkReceipt(JSON.stringify(receipt), { model: receipt.model.repo_id, serial: false, engineVersion: BENCHMARK_ENGINE_VERSION }).suite.id, 'community-v2')
for (const version of ['1.0.12', '1.1.0']) {
const historical = structuredClone(receipt)
historical.runtime.tensorfold_version = version
historical.suite = { id: 'community-v1', sha256: LEGACY_BENCHMARK_SUITE_SHA }
delete historical.settings.kv_cache
for (const sample of historical.samples) { delete sample.finish_reason; delete sample.route }
assert.equal(benchmarkProtocolComplete(parseBenchmarkReceipt(JSON.stringify(historical))), true, 'reviewed historical receipts remain readable after the engine update')
assert.throws(() => parseBenchmarkReceipt(JSON.stringify(historical), { model: historical.model.repo_id, serial: false, engineVersion: BENCHMARK_ENGINE_VERSION }), /invalid|unsupported/, 'a historical receipt cannot substitute for a live run on the new engine')
historical.runtime.tensorfold_version = BENCHMARK_ENGINE_VERSION
assert.throws(() => parseBenchmarkReceipt(JSON.stringify(historical)), /invalid|unsupported/, 'the current engine must emit its reviewed v2 schema')
}
for (const count of [128, 200, 255]) {
const natural = structuredClone(receipt)
Object.assign(natural.samples[0], { finish_reason: 'stop', completion_tokens: count, delivery_seconds: (count - 1) / 100 })
assert.equal(benchmarkProtocolComplete(parseBenchmarkReceipt(JSON.stringify(natural))), true, 'v2 permits sampled natural stops from 128 tokens')
}
const chatOnly = structuredClone(receipt)
for (const sample of chatOnly.samples) sample.route = '/v1/chat/completions'
assert.equal(benchmarkProtocolComplete(parseBenchmarkReceipt(JSON.stringify(chatOnly))), true, 'chat-only models may consistently use the chat route for code')
const fp8 = structuredClone(receipt); fp8.settings.kv_cache = 'fp8'
assert.equal(parseBenchmarkReceipt(JSON.stringify(fp8)).settings.kv_cache, 'fp8')
for (const mutate of [
(value: any) => { value.prompt = 'SYNTHETIC_PRIVATE_PROMPT' },
(value: any) => { value.model.repo_id = '/private/operator/model' },
Expand All @@ -32,6 +49,20 @@ for (const mutate of [
(value: any) => { value.runtime.dependencies.private_path = '/private/operator' },
(value: any) => { value.runtime.tensorfold_version = '9.9.9' },
(value: any) => { value.runtime.tensorfold_version = '1.1.0-preview' },
(value: any) => { value.runtime.tensorfold_version = '1.1.0' },
(value: any) => { delete value.settings.kv_cache },
(value: any) => { value.settings.kv_cache = null },
(value: any) => { value.settings.kv_cache = 'fp16' },
(value: any) => { delete value.samples[0].route },
(value: any) => { value.samples[0].route = '/private/path' },
(value: any) => { value.samples[5].route = '/v1/completions' },
(value: any) => { value.samples[1].route = '/v1/chat/completions' },
(value: any) => { delete value.samples[0].finish_reason },
(value: any) => { value.samples[0].finish_reason = null },
(value: any) => { value.samples[0].finish_reason = 'unknown' },
(value: any) => { Object.assign(value.samples[0], { finish_reason: 'stop', completion_tokens: 127, delivery_seconds: 1.26 }) },
(value: any) => { Object.assign(value.samples[0], { finish_reason: 'length', completion_tokens: 128, delivery_seconds: 1.27 }) },
(value: any) => { Object.assign(value.samples[10], { finish_reason: 'stop', completion_tokens: 128, delivery_seconds: 1.27 }) },
]) {
const invalid = structuredClone(receipt); mutate(invalid)
assert.throws(() => parseBenchmarkReceipt(JSON.stringify(invalid)), /invalid|unsupported/)
Expand Down
Loading
Loading