var InvertedRepoTemplate = { templates: { 'agent': { description: 'Agent Repo — Apple II Universal Machine inverted agent capsule', files: [ { path: 'README.md', content: function() { return '# Agent Repo\n\nCreated by Apple II Universal Machine.\n\nThis is an inverted repo — the repo IS the runtime manifest, proof source, capsule source, and cold-boot source.\n\n## Quick Start\n- Open `index.html` for the cockpit\n- Run `ColdBoot;` to restore state\n- Run `StapleRepo;` to generate manifest\n\n## Not Model Training\nThis repo packages and verifies agent capsules. No real model training occurs here.\n\n---\n*Generated by Apple II Universal Machine*'; }}, { path: 'TRUST_DEED.md', content: function() { return '# Trust Deed\n\n1. LOCAL_ONLY — No remote execution\n2. NON_DESTRUCTIVE — No data destruction\n3. AUDITABLE — Every action logged\n4. SEALABLE — SHA-256 integrity\n5. RECOVERABLE — State can be restored\n6. CONSENT — User confirmation required\n7. TRANSPARENCY — All operations visible\n8. REVERSIBLE — Actions can be undone'; }}, { path: 'capsule.json', content: function() { return JSON.stringify({ name: 'agent-repo', type: 'agent', arch: 'transformer', model: 'ollama/llama3.2', runtime: 'ollama', createdAt: new Date().toISOString(), seal: 'pending' }, null, 2); }}, { path: 'woz-staple.json', content: function() { return JSON.stringify({ repo: 'agent-repo', version: '1.0.0', buildTimestamp: new Date().toISOString(), verified: true }, null, 2); }}, { path: 'index.html', content: function() { return '
APPLE II UNIVERSAL MACHINE — AGENT REPO\n\nColdBoot; to restore state.\nStapleRepo; to generate manifest.'; }}, { path: '.github/workflows/pages.yml', content: function() { return 'name: Deploy Pages\non:\n push:\n branches: [main, master]\njobs:\n deploy:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/configure-pages@v5\n - uses: actions/upload-pages-artifact@v3\n with:\n path: \'.\'\n - uses: actions/deploy-pages@v4'; }}, { path: '.github/workflows/capsule-verify.yml', content: function() { return 'name: Capsule Verify\non:\n push:\n paths: [\'capsule.json\']\njobs:\n verify:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - run: echo "Verifying capsule..."\n - run: cat capsule.json | python3 -c "import json,sys; d=json.load(sys.stdin); assert d.get(\'name\'), \'Missing name\'"'; }} ] }, 'twin': { description: 'Digital Twin Repo — Apple II Universal Machine inverted twin capsule', files: [ { path: 'README.md', content: function() { return '# Digital Twin Repo\n\nCreated by Apple II Universal Machine.\n\nThis is an inverted twin repo.\n\n---\n*Generated by Apple II Universal Machine*'; }}, { path: 'TRUST_DEED.md', content: function() { return '# Trust Deed\n\n1. LOCAL_ONLY\n2. NON_DESTRUCTIVE\n3. AUDITABLE\n4. SEALABLE\n5. RECOVERABLE'; }}, { path: 'capsule.json', content: function() { return JSON.stringify({ name: 'twin-repo', type: 'twin', createdAt: new Date().toISOString() }, null, 2); }}, { path: 'index.html', content: function() { return '
TWIN REPO'; }} ] }, 'vacuum': { description: 'Data Vacuum Repo — Apple II Universal Machine inverted data ingestion', files: [ { path: 'README.md', content: function() { return '# Data Vacuum Repo\n\nCreated by Apple II Universal Machine.\n\nThis is an inverted data vacuum repo.\n\n---\n*Generated by Apple II Universal Machine*'; }}, { path: 'TRUST_DEED.md', content: function() { return '# Trust Deed\n\n1. LOCAL_ONLY\n2. NO_REMOTE_CRAWL\n3. AUDITABLE\n4. SEALABLE'; }}, { path: 'capsule.json', content: function() { return JSON.stringify({ name: 'vacuum-repo', type: 'vacuum', createdAt: new Date().toISOString() }, null, 2); }}, { path: 'index.html', content: function() { return '
VACUUM REPO'; }} ] }, 'vm': { description: 'VM Lab Repo — Apple II Universal Machine heterogeneous VM lab', files: [ { path: 'README.md', content: function() { return '# VM Lab Repo\n\nCreated by Apple II Universal Machine.\n\nThis is an inverted VM lab repo.\n\n---\n*Generated by Apple II Universal Machine*'; }}, { path: 'TRUST_DEED.md', content: function() { return '# Trust Deed\n\n1. LOCAL_ONLY\n2. SANDBOXED\n3. AUDITABLE\n4. SEALABLE'; }}, { path: 'capsule.json', content: function() { return JSON.stringify({ name: 'vm-repo', type: 'vm', createdAt: new Date().toISOString() }, null, 2); }}, { path: 'index.html', content: function() { return '
VM LAB REPO'; }} ] } }, getTemplate: function(type) { return this.templates[type] || this.templates['agent']; }, listTypes: function() { return Object.keys(this.templates).map(function(k) { return { key: k, desc: InvertedRepoTemplate.templates[k].description }; }); } };