Files
oc/src/session.js
T
only-cli dcc0531ef3 only-cli v0.1: turn websites into a compact CLI for AI agents
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.
2026-08-18 09:01:41 -04:00

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`);