mirror of
https://github.com/only-cli/oc.git
synced 2026-09-15 10:40:56 +02:00
Generic distillation engine (no per-site adapters): fetch via impers impersonating Chrome with a firefox-fingerprint retry, distill to an interaction tree, render under a hard token budget with numbered action handles. Raw mode emits markdown via turndown or cleaned HTML. Per-site CLI definitions for HN, Reddit, Bing, DuckDuckGo. Offline test suite, agent skill, OIDC publish workflow.
17 lines
499 B
JavaScript
17 lines
499 B
JavaScript
/**
|
|
* Sessions are plain JSON files on disk, one per name: current URL, cookies,
|
|
* the last distilled page so actions can resolve handles, and history. No
|
|
* daemon, no background process. Read/write lands in v0.2 with act.js.
|
|
*/
|
|
|
|
import { homedir } from 'node:os';
|
|
import { join } from 'node:path';
|
|
|
|
export const SESSION_DIR = join(homedir(), '.only-cli', 'sessions');
|
|
|
|
/**
|
|
* @param {string} name
|
|
* @returns {string}
|
|
*/
|
|
export const sessionPath = (name) => join(SESSION_DIR, `${name}.json`);
|