Ferrell Synthetic Intelligence commited on
Commit ·
6f6633d
1
Parent(s): 839157e
Add local journalism CaseFile desk
Browse files- README.md +4 -0
- app.js +42 -1
- community/casefile-schema.json +25 -0
- community/journal-desk.md +16 -0
- index.html +7 -1
README.md
CHANGED
|
@@ -41,6 +41,10 @@ The original AIDE Developer's Credo, inspired by broad Mandalorian discipline th
|
|
| 41 |
|
| 42 |
`npm run veritas` executes the real local gate before a release or verified answer: compile checks, tests, Git whitespace checks, manifest validation, path boundaries, and secret scanning. It is intentionally allowlisted and does not execute arbitrary model-generated commands.
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
## Status
|
| 45 |
|
| 46 |
This is a pre-production engineering release. The Liquid checkpoint is not included until its exact artifact, license, checksum, and evaluation are confirmed. The Qwen weight is downloaded separately from its official repository and should be verified before offline use.
|
|
|
|
| 41 |
|
| 42 |
`npm run veritas` executes the real local gate before a release or verified answer: compile checks, tests, Git whitespace checks, manifest validation, path boundaries, and secret scanning. It is intentionally allowlisted and does not execute arbitrary model-generated commands.
|
| 43 |
|
| 44 |
+
## Journalism Desk
|
| 45 |
+
|
| 46 |
+
The local CaseFile workflow in the UI creates a private case, imports local evidence, records SHA-256 receipts, and extracts date anchors before model analysis. See `community/journal-desk.md` and `community/casefile-schema.json`.
|
| 47 |
+
|
| 48 |
## Status
|
| 49 |
|
| 50 |
This is a pre-production engineering release. The Liquid checkpoint is not included until its exact artifact, license, checksum, and evaluation are confirmed. The Qwen weight is downloaded separately from its official repository and should be verified before offline use.
|
app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
const state = { manifest: null, node: null, selected: null, files: {
|
| 2 |
'agent.ts': `import { ChatMessage, ModelAdapter } from './types';
|
| 3 |
import { LocalModelRouter } from './router';
|
| 4 |
|
|
@@ -155,6 +155,40 @@ function localNodeId() {
|
|
| 155 |
return id;
|
| 156 |
}
|
| 157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
function renderNode() {
|
| 159 |
if (!state.node) return;
|
| 160 |
const id = localStorage.getItem('aide.node.id');
|
|
@@ -185,6 +219,13 @@ async function boot() {
|
|
| 185 |
$('#connection-button').onclick = testRuntime;
|
| 186 |
$('#send-button').onclick = sendChat;
|
| 187 |
$('#node-button').onclick = () => { localNodeId(); renderNode(); appendLog('NODE', 'Local identity created. No network connection or private data was shared.'); };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
$('#input').onkeydown = event => { if (event.key === 'Enter') sendChat(); };
|
| 189 |
}
|
| 190 |
|
|
|
|
| 1 |
+
const state = { manifest: null, node: null, selected: null, casefile: null, files: {
|
| 2 |
'agent.ts': `import { ChatMessage, ModelAdapter } from './types';
|
| 3 |
import { LocalModelRouter } from './router';
|
| 4 |
|
|
|
|
| 155 |
return id;
|
| 156 |
}
|
| 157 |
|
| 158 |
+
function renderCasefile() {
|
| 159 |
+
const status = $('#case-status');
|
| 160 |
+
const list = $('#evidence-list');
|
| 161 |
+
if (!state.casefile) {
|
| 162 |
+
status.textContent = 'No case open.';
|
| 163 |
+
list.textContent = '';
|
| 164 |
+
return;
|
| 165 |
+
}
|
| 166 |
+
status.innerHTML = `<b>CASE ${esc(state.casefile.id)}</b><br>${state.casefile.evidence.length} evidence item(s)<br>Local-only provenance ledger`;
|
| 167 |
+
list.innerHTML = state.casefile.evidence.map(item => `<div style="border-left:2px solid #58c7ff;padding-left:5px;margin-top:6px"><b>${esc(item.name)}</b><br>${esc(item.bytes)} bytes | SHA-256 ${esc(item.hash.slice(0, 12))}...<br>dates: ${esc(item.dates.join(', ') || 'none detected')}</div>`).join('');
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
async function digestFile(file) {
|
| 171 |
+
const buffer = await file.arrayBuffer();
|
| 172 |
+
const digest = await crypto.subtle.digest('SHA-256', buffer);
|
| 173 |
+
const hash = [...new Uint8Array(digest)].map(byte => byte.toString(16).padStart(2, '0')).join('');
|
| 174 |
+
const text = new TextDecoder().decode(buffer);
|
| 175 |
+
const dates = [...new Set(text.match(/\b(?:19|20)\d{2}(?:[-/]\d{1,2}(?:[-/]\d{1,2})?)?\b/g) || [])].slice(0, 20);
|
| 176 |
+
return { name: file.name, bytes: file.size, hash, dates, imported_at: new Date().toISOString() };
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
async function importEvidence(event) {
|
| 180 |
+
if (!state.casefile) {
|
| 181 |
+
appendLog('CASEFILE', 'Create a case before importing evidence.', 'warning');
|
| 182 |
+
event.target.value = '';
|
| 183 |
+
return;
|
| 184 |
+
}
|
| 185 |
+
for (const file of event.target.files) state.casefile.evidence.push(await digestFile(file));
|
| 186 |
+
localStorage.setItem(`aide.case.${state.casefile.id}`, JSON.stringify(state.casefile));
|
| 187 |
+
renderCasefile();
|
| 188 |
+
appendLog('CASEFILE', `${event.target.files.length} evidence item(s) imported locally. Hashes and date anchors recorded; no network request made.`);
|
| 189 |
+
event.target.value = '';
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
function renderNode() {
|
| 193 |
if (!state.node) return;
|
| 194 |
const id = localStorage.getItem('aide.node.id');
|
|
|
|
| 219 |
$('#connection-button').onclick = testRuntime;
|
| 220 |
$('#send-button').onclick = sendChat;
|
| 221 |
$('#node-button').onclick = () => { localNodeId(); renderNode(); appendLog('NODE', 'Local identity created. No network connection or private data was shared.'); };
|
| 222 |
+
$('#case-button').onclick = () => {
|
| 223 |
+
state.casefile = { id: `AIDE-${new Date().toISOString().slice(0, 10)}-${crypto.randomUUID().slice(0, 8)}`, evidence: [], created_at: new Date().toISOString(), boundary: 'private' };
|
| 224 |
+
localStorage.setItem(`aide.case.${state.casefile.id}`, JSON.stringify(state.casefile));
|
| 225 |
+
renderCasefile();
|
| 226 |
+
appendLog('CASEFILE', `Created ${state.casefile.id}. Boundary: private. Evidence remains on this device.`);
|
| 227 |
+
};
|
| 228 |
+
$('#evidence-input').onchange = importEvidence;
|
| 229 |
$('#input').onkeydown = event => { if (event.key === 'Enter') sendChat(); };
|
| 230 |
}
|
| 231 |
|
community/casefile-schema.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 3 |
+
"title": "AIDE Local CaseFile",
|
| 4 |
+
"type": "object",
|
| 5 |
+
"required": ["id", "created_at", "boundary", "evidence"],
|
| 6 |
+
"properties": {
|
| 7 |
+
"id": {"type": "string"},
|
| 8 |
+
"created_at": {"type": "string", "format": "date-time"},
|
| 9 |
+
"boundary": {"enum": ["private", "group", "public", "marketplace"]},
|
| 10 |
+
"evidence": {
|
| 11 |
+
"type": "array",
|
| 12 |
+
"items": {
|
| 13 |
+
"type": "object",
|
| 14 |
+
"required": ["name", "bytes", "hash", "dates", "imported_at"],
|
| 15 |
+
"properties": {
|
| 16 |
+
"name": {"type": "string"},
|
| 17 |
+
"bytes": {"type": "integer", "minimum": 0},
|
| 18 |
+
"hash": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
|
| 19 |
+
"dates": {"type": "array", "items": {"type": "string"}},
|
| 20 |
+
"imported_at": {"type": "string", "format": "date-time"}
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
community/journal-desk.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AIDE Journal Desk
|
| 2 |
+
|
| 3 |
+
The Journal Desk is the first journalism workflow in the IDE. It works without a model or network connection.
|
| 4 |
+
|
| 5 |
+
## Local CaseFile Flow
|
| 6 |
+
|
| 7 |
+
1. Create a CaseFile with a private boundary.
|
| 8 |
+
2. Import local text evidence.
|
| 9 |
+
3. Compute a SHA-256 receipt for every file.
|
| 10 |
+
4. Extract date anchors for timeline work.
|
| 11 |
+
5. Preserve the provenance record before sending selected evidence to a model.
|
| 12 |
+
6. Later run the evidence through source-DNA, timeline, discrepancy, pattern, and editorial-review tools.
|
| 13 |
+
|
| 14 |
+
The browser prototype stores only the case metadata, hashes, and date anchors in local storage. It does not upload evidence. The production daemon will store encrypted CaseFiles outside the browser and will require an explicit boundary change before group or public replication.
|
| 15 |
+
|
| 16 |
+
This is not a truth guarantee. A hash proves which bytes were reviewed, not that the document is authentic or that its claims are true. Authenticity requires provenance, corroboration, signatures, and human judgment.
|
index.html
CHANGED
|
@@ -49,6 +49,12 @@
|
|
| 49 |
<div class="section-heading divider">LOCAL NODE</div>
|
| 50 |
<div id="node-status" class="node-status" style="border:1px solid #285344;background:#0d211c;color:#91c9aa;padding:9px;font:9px/1.7 ui-monospace,monospace">Loading node policy...</div>
|
| 51 |
<button id="node-button" class="secondary" style="width:100%;margin-top:8px;padding:7px">CREATE LOCAL NODE ID</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
</aside>
|
| 53 |
|
| 54 |
<section class="editor-column">
|
|
@@ -59,7 +65,7 @@
|
|
| 59 |
<pre id="code" contenteditable="true" spellcheck="false"></pre>
|
| 60 |
</div>
|
| 61 |
<div class="bottom-panel">
|
| 62 |
-
<div class="panel-tabs"><b>TERMINAL</b><span>PROBLEMS <em>0</em></span><span>OUTPUT</span><span>COLLABORATION</span><span>COMMUNITY</span></div>
|
| 63 |
<div id="terminal" class="terminal"><p><b>~/agent-kit $</b> aide runtime status</p><p class="muted">network: disabled | writes: approval required | coordinator: bounded</p><p class="ok">ready: model registry loaded; coding lane awaiting local checkpoint</p><p><b>~/agent-kit $</b> <span class="cursor"></span></p></div>
|
| 64 |
</div>
|
| 65 |
<footer class="statusbar"><span>LOCAL ONLY</span><span>GIT main*</span><span>UTF-8</span><span>TypeScript</span><b>READY</b></footer>
|
|
|
|
| 49 |
<div class="section-heading divider">LOCAL NODE</div>
|
| 50 |
<div id="node-status" class="node-status" style="border:1px solid #285344;background:#0d211c;color:#91c9aa;padding:9px;font:9px/1.7 ui-monospace,monospace">Loading node policy...</div>
|
| 51 |
<button id="node-button" class="secondary" style="width:100%;margin-top:8px;padding:7px">CREATE LOCAL NODE ID</button>
|
| 52 |
+
<div class="section-heading divider">JOURNAL DESK</div>
|
| 53 |
+
<button id="case-button" class="secondary" style="width:100%;padding:7px">CREATE LOCAL CASEFILE</button>
|
| 54 |
+
<label for="evidence-input" class="secondary" style="display:block;text-align:center;margin-top:7px;padding:7px;cursor:pointer">IMPORT EVIDENCE</label>
|
| 55 |
+
<input id="evidence-input" type="file" multiple accept=".txt,.md,.json,.csv,.html,.log,.xml" hidden>
|
| 56 |
+
<div id="case-status" style="color:#91c9aa;font:9px/1.7 ui-monospace,monospace;margin-top:8px">No case open.</div>
|
| 57 |
+
<div id="evidence-list" style="font:9px/1.5 ui-monospace,monospace;color:#9fb8ba;margin-top:5px"></div>
|
| 58 |
</aside>
|
| 59 |
|
| 60 |
<section class="editor-column">
|
|
|
|
| 65 |
<pre id="code" contenteditable="true" spellcheck="false"></pre>
|
| 66 |
</div>
|
| 67 |
<div class="bottom-panel">
|
| 68 |
+
<div class="panel-tabs"><b>TERMINAL</b><span>PROBLEMS <em>0</em></span><span>OUTPUT</span><span>COLLABORATION</span><span>CASEFILE</span><span>COMMUNITY</span></div>
|
| 69 |
<div id="terminal" class="terminal"><p><b>~/agent-kit $</b> aide runtime status</p><p class="muted">network: disabled | writes: approval required | coordinator: bounded</p><p class="ok">ready: model registry loaded; coding lane awaiting local checkpoint</p><p><b>~/agent-kit $</b> <span class="cursor"></span></p></div>
|
| 70 |
</div>
|
| 71 |
<footer class="statusbar"><span>LOCAL ONLY</span><span>GIT main*</span><span>UTF-8</span><span>TypeScript</span><b>READY</b></footer>
|