@threadcrumbs/common 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +34 -0
- package/NOTICES.md +33 -0
- package/README.md +109 -3
- package/harnesses/README.md +213 -0
- package/harnesses/antigravity.mjs +269 -0
- package/harnesses/claude-code.mjs +578 -0
- package/harnesses/codex.mjs +419 -0
- package/harnesses/cursor.mjs +199 -0
- package/harnesses/hermes.mjs +211 -0
- package/harnesses/index.mjs +36 -0
- package/harnesses/kilocode.mjs +361 -0
- package/harnesses/opencode.mjs +449 -0
- package/launch/index.mjs +163 -0
- package/launch/macos.mjs +21 -0
- package/launch/registry.mjs +52 -0
- package/launch/terminal.mjs +213 -0
- package/launch/win-terminal.mjs +87 -0
- package/launch/windows.mjs +96 -0
- package/launch/xdg.mjs +44 -0
- package/lib/anthropic-prices.mjs +70 -0
- package/lib/claude-desktop.mjs +208 -0
- package/lib/claude-transcript.mjs +462 -0
- package/lib/cursor-folder.mjs +107 -0
- package/lib/fsutil.mjs +191 -0
- package/lib/hermes-home.mjs +30 -0
- package/lib/jsonl-follower.mjs +45 -0
- package/lib/opencode-store.mjs +602 -0
- package/lib/sqlite.mjs +29 -0
- package/lib/telemetry-fields.mjs +245 -0
- package/license/index.mjs +102 -0
- package/license/store.mjs +155 -0
- package/orgs/index.mjs +157 -0
- package/package.json +40 -4
- package/telemetry/README.md +148 -0
- package/telemetry/antigravity.mjs +268 -0
- package/telemetry/claude-code.mjs +370 -0
- package/telemetry/codex.mjs +556 -0
- package/telemetry/cursor.mjs +276 -0
- package/telemetry/hermes.mjs +404 -0
- package/telemetry/index.mjs +9 -0
- package/telemetry/kilocode.mjs +31 -0
- package/telemetry/opencode.mjs +36 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import os from 'node:os'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { exists } from '../lib/fsutil.mjs'
|
|
4
|
+
import { opencodeStore } from '../lib/opencode-store.mjs'
|
|
5
|
+
|
|
6
|
+
export function kilocode({ home = os.homedir(), env = process.env, now } = {}) {
|
|
7
|
+
const dataDirs = [env.XDG_DATA_HOME && path.join(env.XDG_DATA_HOME, 'kilo'), path.join(home, '.local', 'share', 'kilo')].filter(Boolean)
|
|
8
|
+
const cacheDir = env.XDG_CACHE_HOME ? path.join(env.XDG_CACHE_HOME, 'kilo') : path.join(home, '.cache', 'kilo')
|
|
9
|
+
|
|
10
|
+
async function dbPath() {
|
|
11
|
+
if (env.KILO_DB) return (await exists(env.KILO_DB)) ? env.KILO_DB : ''
|
|
12
|
+
for (const dir of dataDirs) {
|
|
13
|
+
const file = path.join(dir, 'kilo.db')
|
|
14
|
+
if (await exists(file)) return file
|
|
15
|
+
}
|
|
16
|
+
return ''
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return opencodeStore({
|
|
20
|
+
id: 'kilocode',
|
|
21
|
+
name: 'Kilo Code',
|
|
22
|
+
dbPath,
|
|
23
|
+
watchDirs: env.KILO_DB ? [path.dirname(env.KILO_DB)] : dataDirs,
|
|
24
|
+
limitsFile: async () => path.join(cacheDir, 'models.json'),
|
|
25
|
+
continuing: ['tool-calls'],
|
|
26
|
+
liveSummary: true,
|
|
27
|
+
now,
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default kilocode()
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import os from 'node:os'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { exists } from '../lib/fsutil.mjs'
|
|
4
|
+
import { opencodeStore } from '../lib/opencode-store.mjs'
|
|
5
|
+
|
|
6
|
+
export function opencode({ home = os.homedir(), env = process.env, platform = process.platform, now } = {}) {
|
|
7
|
+
const dataDirs = [
|
|
8
|
+
env.XDG_DATA_HOME && path.join(env.XDG_DATA_HOME, 'opencode'),
|
|
9
|
+
path.join(home, '.local', 'share', 'opencode'),
|
|
10
|
+
platform === 'darwin' && path.join(home, 'Library', 'Application Support', 'opencode'),
|
|
11
|
+
].filter(Boolean)
|
|
12
|
+
const cacheDir = env.XDG_CACHE_HOME ? path.join(env.XDG_CACHE_HOME, 'opencode') : path.join(home, '.cache', 'opencode')
|
|
13
|
+
|
|
14
|
+
const override = env.OPENCODE_DB ? (path.isAbsolute(env.OPENCODE_DB) ? env.OPENCODE_DB : path.join(dataDirs[0], env.OPENCODE_DB)) : ''
|
|
15
|
+
|
|
16
|
+
async function dbPath() {
|
|
17
|
+
if (override) return (await exists(override)) ? override : ''
|
|
18
|
+
for (const dir of dataDirs) {
|
|
19
|
+
const file = path.join(dir, 'opencode.db')
|
|
20
|
+
if (await exists(file)) return file
|
|
21
|
+
}
|
|
22
|
+
return ''
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return opencodeStore({
|
|
26
|
+
id: 'opencode',
|
|
27
|
+
name: 'OpenCode',
|
|
28
|
+
dbPath,
|
|
29
|
+
watchDirs: override ? [path.dirname(override)] : dataDirs,
|
|
30
|
+
limitsFile: async () => env.OPENCODE_MODELS_PATH || path.join(cacheDir, 'models.json'),
|
|
31
|
+
continuing: ['tool-calls', 'unknown'],
|
|
32
|
+
now,
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default opencode()
|