spexcode 0.6.7 → 0.7.0-next.0
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/README.md +12 -7
- package/node_modules/@spexcode/session-application/dist/index.d.ts +17 -0
- package/node_modules/@spexcode/session-application/dist/index.js +35 -0
- package/node_modules/@spexcode/session-application/dist/migration.d.ts +51 -0
- package/node_modules/@spexcode/session-application/dist/migration.js +694 -0
- package/node_modules/@spexcode/session-application/dist/production.d.ts +109 -0
- package/node_modules/@spexcode/session-application/dist/production.js +438 -0
- package/node_modules/@spexcode/session-application/dist/schema.d.ts +2 -0
- package/node_modules/@spexcode/session-application/dist/schema.js +39 -0
- package/node_modules/@spexcode/session-application/package.json +29 -0
- package/node_modules/@spexcode/session-events/dist/errors.d.ts +6 -0
- package/node_modules/@spexcode/session-events/dist/errors.js +11 -0
- package/node_modules/@spexcode/session-events/dist/index.d.ts +46 -0
- package/node_modules/@spexcode/session-events/dist/index.js +245 -0
- package/node_modules/@spexcode/session-events/dist/schema.d.ts +3 -0
- package/node_modules/@spexcode/session-events/dist/schema.js +44 -0
- package/node_modules/@spexcode/session-events/package.json +24 -0
- package/node_modules/@spexcode/session-protocol/dist/canonical.d.ts +36 -0
- package/node_modules/@spexcode/session-protocol/dist/canonical.js +139 -0
- package/node_modules/@spexcode/session-protocol/dist/engine.d.ts +22 -0
- package/node_modules/@spexcode/session-protocol/dist/engine.js +478 -0
- package/node_modules/@spexcode/session-protocol/dist/errors.d.ts +8 -0
- package/node_modules/@spexcode/session-protocol/dist/errors.js +39 -0
- package/node_modules/@spexcode/session-protocol/dist/index.d.ts +60 -0
- package/node_modules/@spexcode/session-protocol/dist/index.js +4 -0
- package/node_modules/@spexcode/session-protocol/dist/schema.d.ts +36 -0
- package/node_modules/@spexcode/session-protocol/dist/schema.js +192 -0
- package/node_modules/@spexcode/{session-core → session-protocol}/package.json +4 -8
- package/node_modules/@spexcode/session-runtime/dist/errors.d.ts +6 -0
- package/node_modules/@spexcode/session-runtime/dist/errors.js +11 -0
- package/node_modules/@spexcode/session-runtime/dist/index.d.ts +33 -0
- package/node_modules/@spexcode/session-runtime/dist/index.js +193 -0
- package/node_modules/@spexcode/session-runtime/dist/schema.d.ts +2 -0
- package/node_modules/@spexcode/session-runtime/dist/schema.js +37 -0
- package/node_modules/@spexcode/session-runtime/package.json +24 -0
- package/node_modules/@spexcode/session-selflaunch/bin/spex-session.mjs +4 -0
- package/node_modules/@spexcode/session-selflaunch/dist/cli.d.ts +25 -0
- package/node_modules/@spexcode/session-selflaunch/dist/cli.js +156 -0
- package/node_modules/@spexcode/session-selflaunch/dist/index.d.ts +28 -0
- package/node_modules/@spexcode/session-selflaunch/dist/index.js +25 -0
- package/node_modules/@spexcode/session-selflaunch/dist/locality.d.ts +31 -0
- package/node_modules/@spexcode/session-selflaunch/dist/locality.js +135 -0
- package/node_modules/@spexcode/session-selflaunch/dist/path.d.ts +13 -0
- package/node_modules/@spexcode/session-selflaunch/dist/path.js +45 -0
- package/node_modules/@spexcode/session-selflaunch/package.json +35 -0
- package/node_modules/@spexcode/session-topology/dist/errors.d.ts +6 -0
- package/node_modules/@spexcode/session-topology/dist/errors.js +11 -0
- package/node_modules/@spexcode/session-topology/dist/index.d.ts +24 -0
- package/node_modules/@spexcode/session-topology/dist/index.js +173 -0
- package/node_modules/@spexcode/session-topology/dist/schema.d.ts +3 -0
- package/node_modules/@spexcode/session-topology/dist/schema.js +27 -0
- package/node_modules/@spexcode/session-topology/package.json +24 -0
- package/node_modules/@spexcode/spec-cli/bin/spex.mjs +175 -21
- package/node_modules/@spexcode/spec-cli/dist/cli.js +121 -59
- package/node_modules/@spexcode/spec-cli/dist/client.d.ts +1 -3
- package/node_modules/@spexcode/spec-cli/dist/client.js +49 -30
- package/node_modules/@spexcode/spec-cli/dist/codex-runtime-generations.d.ts +11 -0
- package/node_modules/@spexcode/spec-cli/dist/codex-runtime-generations.js +46 -9
- package/node_modules/@spexcode/spec-cli/dist/delivery-lock.d.ts +2 -0
- package/node_modules/@spexcode/spec-cli/dist/delivery-lock.js +58 -0
- package/node_modules/@spexcode/spec-cli/dist/doctor.js +53 -11
- package/node_modules/@spexcode/spec-cli/dist/file-write.js +14 -2
- package/node_modules/@spexcode/spec-cli/dist/gateway-hub.js +2 -1
- package/node_modules/@spexcode/spec-cli/dist/gateway.js +6 -3
- package/node_modules/@spexcode/spec-cli/dist/graphCache.js +32 -2
- package/node_modules/@spexcode/spec-cli/dist/graphSnapshot.js +57 -2
- package/node_modules/@spexcode/spec-cli/dist/graphStream.d.ts +2 -0
- package/node_modules/@spexcode/spec-cli/dist/graphStream.js +83 -3
- package/node_modules/@spexcode/spec-cli/dist/guide.js +29 -18
- package/node_modules/@spexcode/spec-cli/dist/harness-select.js +16 -3
- package/node_modules/@spexcode/spec-cli/dist/harness.d.ts +24 -6
- package/node_modules/@spexcode/spec-cli/dist/harness.js +510 -72
- package/node_modules/@spexcode/spec-cli/dist/help.js +11 -8
- package/node_modules/@spexcode/spec-cli/dist/hook-prompts.js +8 -0
- package/node_modules/@spexcode/spec-cli/dist/host-resources.js +29 -8
- package/node_modules/@spexcode/spec-cli/dist/host.d.ts +7 -0
- package/node_modules/@spexcode/spec-cli/dist/host.js +98 -1
- package/node_modules/@spexcode/spec-cli/dist/index.js +294 -36
- package/node_modules/@spexcode/spec-cli/dist/init.js +1 -1
- package/node_modules/@spexcode/spec-cli/dist/lint.js +70 -35
- package/node_modules/@spexcode/spec-cli/dist/listen.d.ts +3 -2
- package/node_modules/@spexcode/spec-cli/dist/listen.js +14 -2
- package/node_modules/@spexcode/spec-cli/dist/machine-peer.d.ts +2 -1
- package/node_modules/@spexcode/spec-cli/dist/machine-peer.js +46 -15
- package/node_modules/@spexcode/spec-cli/dist/materialize.d.ts +2 -2
- package/node_modules/@spexcode/spec-cli/dist/materialize.js +176 -35
- package/node_modules/@spexcode/spec-cli/dist/opencode.js +10 -2
- package/node_modules/@spexcode/spec-cli/dist/pi-harness.js +18 -5
- package/node_modules/@spexcode/spec-cli/dist/pi-headless.d.ts +2 -0
- package/node_modules/@spexcode/spec-cli/dist/pi-headless.js +27 -0
- package/node_modules/@spexcode/spec-cli/dist/pty-bridge.js +14 -14
- package/node_modules/@spexcode/spec-cli/dist/reviews.js +12 -7
- package/node_modules/@spexcode/spec-cli/dist/runtime-ownership.d.ts +11 -0
- package/node_modules/@spexcode/spec-cli/dist/runtime-ownership.js +79 -1
- package/node_modules/@spexcode/spec-cli/dist/session-application.d.ts +23 -0
- package/node_modules/@spexcode/spec-cli/dist/session-application.js +189 -0
- package/node_modules/@spexcode/spec-cli/dist/session-declarations.js +13 -1
- package/node_modules/@spexcode/spec-cli/dist/session-files.d.ts +6 -0
- package/node_modules/@spexcode/spec-cli/dist/session-files.js +13 -1
- package/node_modules/@spexcode/spec-cli/dist/session-follow.js +39 -22
- package/node_modules/@spexcode/{session-core/dist/record-lock.d.ts → spec-cli/dist/session-record-lock.d.ts} +0 -4
- package/node_modules/@spexcode/spec-cli/dist/session-record-lock.js +94 -0
- package/node_modules/@spexcode/spec-cli/dist/session-runtime-adapter.d.ts +44 -0
- package/node_modules/@spexcode/spec-cli/dist/session-runtime-adapter.js +37 -0
- package/node_modules/@spexcode/spec-cli/dist/session-timeline.d.ts +25 -2
- package/node_modules/@spexcode/spec-cli/dist/session-timeline.js +68 -11
- package/node_modules/@spexcode/spec-cli/dist/session-transcript.d.ts +57 -0
- package/node_modules/@spexcode/spec-cli/dist/session-transcript.js +137 -0
- package/node_modules/@spexcode/spec-cli/dist/session-web.js +4 -4
- package/node_modules/@spexcode/spec-cli/dist/sessions.d.ts +112 -15
- package/node_modules/@spexcode/spec-cli/dist/sessions.js +1553 -764
- package/node_modules/@spexcode/spec-cli/dist/shim-runtime.js +14 -0
- package/node_modules/@spexcode/spec-cli/dist/source-list.d.ts +13 -0
- package/node_modules/@spexcode/spec-cli/dist/source-list.js +99 -0
- package/node_modules/@spexcode/spec-cli/dist/source-read.d.ts +16 -0
- package/node_modules/@spexcode/spec-cli/dist/source-read.js +84 -0
- package/node_modules/@spexcode/spec-cli/dist/spec-attachments.d.ts +7 -0
- package/node_modules/@spexcode/spec-cli/dist/spec-attachments.js +89 -0
- package/node_modules/@spexcode/spec-cli/dist/spec-body-edit.d.ts +23 -0
- package/node_modules/@spexcode/spec-cli/dist/spec-body-edit.js +138 -0
- package/node_modules/@spexcode/spec-cli/dist/supervise.js +15 -6
- package/node_modules/@spexcode/spec-cli/hooks/dispatch.sh +19 -31
- package/node_modules/@spexcode/spec-cli/hooks/harness.sh +6 -6
- package/node_modules/@spexcode/spec-cli/package.json +8 -6
- package/node_modules/@spexcode/spec-cli/templates/hooks/post-checkout +4 -2
- package/node_modules/@spexcode/spec-cli/templates/hooks/post-merge +2 -1
- package/node_modules/@spexcode/spec-cli/templates/hooks/pre-commit +5 -3
- package/node_modules/@spexcode/spec-cli/templates/hooks/reference-transaction +5 -3
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/commands/spec.md +2 -7
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/idle/idle.sh +4 -10
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/idle/spec.md +1 -1
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/mark-active/mark-active.sh +22 -24
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/mark-active/spec.md +10 -2
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/session-fail/fail.sh +8 -7
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/session-fail/spec.md +3 -1
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/session-listen/session-listen.sh +133 -0
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/session-listen/spec.md +36 -0
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/spec.md +2 -0
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/stop-gate/spec.md +1 -1
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/stop-gate/stop-gate.sh +17 -20
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/skills/merge/spec.md +33 -0
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/skills/spec.md +2 -6
- package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/spec.md +7 -0
- package/node_modules/@spexcode/spec-core/dist/anchors.d.ts +13 -2
- package/node_modules/@spexcode/spec-core/dist/anchors.js +311 -15
- package/node_modules/@spexcode/spec-core/dist/git.d.ts +4 -0
- package/node_modules/@spexcode/spec-core/dist/git.js +9 -9
- package/node_modules/@spexcode/spec-core/dist/layout.d.ts +12 -1
- package/node_modules/@spexcode/spec-core/dist/layout.js +4 -2
- package/node_modules/@spexcode/spec-core/dist/resilience.d.ts +1 -0
- package/node_modules/@spexcode/spec-core/dist/resilience.js +8 -0
- package/node_modules/@spexcode/spec-core/dist/review/reviewFilters.d.ts +1 -0
- package/node_modules/@spexcode/spec-core/dist/review/reviewFilters.js +7 -3
- package/node_modules/@spexcode/spec-core/dist/review/reviewQuery.d.ts +1 -0
- package/node_modules/@spexcode/spec-core/dist/review/reviewQuery.js +4 -0
- package/node_modules/@spexcode/spec-core/dist/specs.d.ts +2 -0
- package/node_modules/@spexcode/spec-core/dist/specs.js +30 -0
- package/node_modules/@spexcode/spec-core/package.json +4 -1
- package/node_modules/@spexcode/spec-core/templates/spexcode.json +36 -13
- package/node_modules/@spexcode/spec-eval/dist/cli.js +1 -1
- package/node_modules/@spexcode/spec-eval/dist/evaltab.d.ts +1 -0
- package/node_modules/@spexcode/spec-eval/dist/evaltab.js +6 -1
- package/node_modules/@spexcode/spec-eval/dist/freshness.d.ts +1 -1
- package/node_modules/@spexcode/spec-eval/dist/freshness.js +12 -12
- package/node_modules/@spexcode/spec-eval/dist/host.d.ts +2 -1
- package/node_modules/@spexcode/spec-eval/dist/sessioneval.d.ts +2 -1
- package/node_modules/@spexcode/spec-eval/dist/sessioneval.js +20 -3
- package/node_modules/@spexcode/spec-eval/package.json +2 -2
- package/node_modules/@spexcode/spec-forge/package.json +2 -2
- package/node_modules/@spexcode/transcript/dist/frames.d.ts +44 -0
- package/node_modules/@spexcode/transcript/dist/frames.js +85 -0
- package/node_modules/@spexcode/transcript/dist/index.d.ts +5 -0
- package/node_modules/@spexcode/transcript/dist/index.js +5 -0
- package/node_modules/@spexcode/transcript/dist/live.d.ts +16 -0
- package/node_modules/@spexcode/transcript/dist/live.js +65 -0
- package/node_modules/@spexcode/transcript/dist/parsers.d.ts +47 -0
- package/node_modules/@spexcode/transcript/dist/parsers.js +285 -0
- package/node_modules/@spexcode/transcript/dist/readers.d.ts +10 -0
- package/node_modules/@spexcode/transcript/dist/readers.js +296 -0
- package/node_modules/@spexcode/transcript/dist/turns.d.ts +42 -0
- package/node_modules/@spexcode/transcript/dist/turns.js +11 -0
- package/node_modules/@spexcode/transcript/package.json +30 -0
- package/node_modules/@vscode/tree-sitter-wasm/LICENSE +21 -0
- package/node_modules/@vscode/tree-sitter-wasm/README.md +36 -0
- package/node_modules/@vscode/tree-sitter-wasm/SECURITY.md +41 -0
- package/node_modules/@vscode/tree-sitter-wasm/cgmanifest.json +16 -0
- package/node_modules/@vscode/tree-sitter-wasm/package.json +42 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-bash.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-c-sharp.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-cpp.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-css.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-go.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-ini.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-java.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-javascript.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-php.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-powershell.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-python.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-regex.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-ruby.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-rust.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-tsx.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-typescript.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter.js +4075 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter.wasm +0 -0
- package/node_modules/@vscode/tree-sitter-wasm/wasm/web-tree-sitter.d.ts +1027 -0
- package/node_modules/smol-toml/LICENSE +24 -0
- package/node_modules/smol-toml/README.md +418 -0
- package/node_modules/smol-toml/dist/date.d.ts +41 -0
- package/node_modules/smol-toml/dist/date.js +127 -0
- package/node_modules/smol-toml/dist/error.d.ts +38 -0
- package/node_modules/smol-toml/dist/error.js +63 -0
- package/node_modules/smol-toml/dist/extract.js +69 -0
- package/node_modules/smol-toml/dist/index.cjs +734 -0
- package/node_modules/smol-toml/dist/index.d.ts +43 -0
- package/node_modules/smol-toml/dist/index.js +33 -0
- package/node_modules/smol-toml/dist/parse.d.ts +36 -0
- package/node_modules/smol-toml/dist/parse.js +149 -0
- package/node_modules/smol-toml/dist/primitive.js +238 -0
- package/node_modules/smol-toml/dist/stringify.d.ts +31 -0
- package/node_modules/smol-toml/dist/stringify.js +181 -0
- package/node_modules/smol-toml/dist/struct.js +179 -0
- package/node_modules/smol-toml/dist/util.d.ts +38 -0
- package/node_modules/smol-toml/dist/util.js +89 -0
- package/node_modules/smol-toml/package.json +68 -0
- package/package.json +9 -3
- package/node_modules/@spexcode/session-core/dist/delivery-queue.d.ts +0 -24
- package/node_modules/@spexcode/session-core/dist/delivery-queue.js +0 -206
- package/node_modules/@spexcode/session-core/dist/index.d.ts +0 -5
- package/node_modules/@spexcode/session-core/dist/index.js +0 -5
- package/node_modules/@spexcode/session-core/dist/internal.d.ts +0 -3
- package/node_modules/@spexcode/session-core/dist/internal.js +0 -3
- package/node_modules/@spexcode/session-core/dist/message.d.ts +0 -22
- package/node_modules/@spexcode/session-core/dist/message.js +0 -53
- package/node_modules/@spexcode/session-core/dist/record-lock.js +0 -152
- package/node_modules/@spexcode/session-core/dist/runtime-session.d.ts +0 -62
- package/node_modules/@spexcode/session-core/dist/runtime-session.js +0 -326
- package/node_modules/@spexcode/session-core/dist/session-cursors.d.ts +0 -14
- package/node_modules/@spexcode/session-core/dist/session-cursors.js +0 -82
- package/node_modules/@spexcode/session-core/dist/session-timeline.d.ts +0 -47
- package/node_modules/@spexcode/session-core/dist/session-timeline.js +0 -216
- package/node_modules/@spexcode/spec-cli/dist/execution-trace.d.ts +0 -26
- package/node_modules/@spexcode/spec-cli/dist/execution-trace.js +0 -475
- package/node_modules/@spexcode/spec-cli/dist/session-execution.d.ts +0 -10
- package/node_modules/@spexcode/spec-cli/dist/session-execution.js +0 -70
- package/node_modules/@spexcode/spec-cli/hooks/compat/mark-active-0.5.2-eef1.fixture +0 -53
- package/node_modules/@spexcode/spec-cli/hooks/compat/mark-active-sed-v0.fixture +0 -46
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { closeSync, openSync, readFileSync, readSync, readdirSync, statSync } from 'node:fs';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { TranscriptReadError } from './turns.js';
|
|
6
|
+
import { IntervalCollector, claudeEvent, codexEvent, opencodeEvents, piEvent } from './parsers.js';
|
|
7
|
+
// THE NATIVE-THREAD READERS. Each harness keeps its conversation somewhere private — Claude's project JSONL,
|
|
8
|
+
// Codex's rollout, pi's session JSONL, OpenCode's store behind `opencode export` — and this module is the only
|
|
9
|
+
// place that knows where. It answers exactly one question for every harness: "what happened in this thread
|
|
10
|
+
// between `from` and `to`?", as normalized turns, through the three reader verbs of [[transcript]].
|
|
11
|
+
const POST_RANGE_LOOKAHEAD_LINES = 256;
|
|
12
|
+
const children = (dir) => { try {
|
|
13
|
+
return readdirSync(dir).sort().reverse();
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return [];
|
|
17
|
+
} };
|
|
18
|
+
// --- where each harness keeps the thread ------------------------------------------------------------------
|
|
19
|
+
const projectTranscriptRoot = () => join(process.env.CLAUDE_CONFIG_DIR || join(homedir(), '.claude'), 'projects');
|
|
20
|
+
export function claudeTranscriptPath(threadId, root = projectTranscriptRoot()) {
|
|
21
|
+
for (const project of children(root)) {
|
|
22
|
+
const path = join(root, project, `${threadId}.jsonl`);
|
|
23
|
+
try {
|
|
24
|
+
if (statSync(path).isFile())
|
|
25
|
+
return path;
|
|
26
|
+
}
|
|
27
|
+
catch { /* try next */ }
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const codexSessionsDir = () => join(process.env.CODEX_HOME || join(homedir(), '.codex'), 'sessions');
|
|
32
|
+
// Walk newest day first and return on the first hit; the walk is exhaustive rather than capped, because
|
|
33
|
+
// future-dated junk under sessions/ sorts above every real day and a cap once masked every real rollout.
|
|
34
|
+
export function codexRolloutPath(threadId, root = codexSessionsDir()) {
|
|
35
|
+
for (const year of children(root))
|
|
36
|
+
for (const month of children(join(root, year)))
|
|
37
|
+
for (const day of children(join(root, year, month))) {
|
|
38
|
+
const dir = join(root, year, month, day);
|
|
39
|
+
const file = children(dir).find((name) => name.includes(threadId));
|
|
40
|
+
if (file)
|
|
41
|
+
return join(dir, file);
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const piSessionsRoot = () => join(process.env.SPEXCODE_PI_AGENT_DIR || join(homedir(), '.pi', 'agent'), 'sessions');
|
|
46
|
+
const piSessionPaths = new Map();
|
|
47
|
+
export function piSessionPath(threadId, root = piSessionsRoot()) {
|
|
48
|
+
const key = `${root}:${threadId}`;
|
|
49
|
+
const cached = piSessionPaths.get(key);
|
|
50
|
+
if (cached) {
|
|
51
|
+
try {
|
|
52
|
+
if (statSync(cached).isFile())
|
|
53
|
+
return cached;
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
piSessionPaths.delete(key);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
for (const directory of children(root))
|
|
60
|
+
for (const file of children(join(root, directory))) {
|
|
61
|
+
if (!file.endsWith('.jsonl'))
|
|
62
|
+
continue;
|
|
63
|
+
const path = join(root, directory, file);
|
|
64
|
+
try {
|
|
65
|
+
const header = JSON.parse(readFileSync(path, 'utf8').split('\n', 1)[0]);
|
|
66
|
+
if (header && typeof header === 'object' && header.type === 'session' && header.id === threadId) {
|
|
67
|
+
piSessionPaths.set(key, path);
|
|
68
|
+
return path;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch { /* unreadable entries are not a match */ }
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
const opencodeStoreRoot = () => process.env.SPEXCODE_OPENCODE_DATA_DIR
|
|
76
|
+
|| join(process.env.XDG_DATA_HOME || join(homedir(), '.local', 'share'), 'opencode');
|
|
77
|
+
function opencodeStoreRevision(root) {
|
|
78
|
+
try {
|
|
79
|
+
const database = statSync(join(root, 'opencode.db'));
|
|
80
|
+
let writeAheadLog = '0:0';
|
|
81
|
+
try {
|
|
82
|
+
const stat = statSync(join(root, 'opencode.db-wal'));
|
|
83
|
+
writeAheadLog = `${stat.size}:${Math.floor(stat.mtimeMs)}`;
|
|
84
|
+
}
|
|
85
|
+
catch { /* a checkpointed database has no separate write-ahead log */ }
|
|
86
|
+
return `${database.size}:${Math.floor(database.mtimeMs)}:${writeAheadLog}`;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// The export is read RAW: `--sanitize` replaces every prose and tool-output part with a `[redacted:…]` token,
|
|
93
|
+
// which made the whole conversation unreadable; the reader hands over the same local bytes the other harnesses'
|
|
94
|
+
// files hold, and nothing here leaves the machine that ran the thread.
|
|
95
|
+
function opencodeExport(threadId) {
|
|
96
|
+
return execFileSync(process.env.SPEXCODE_OPENCODE_CMD || 'opencode', ['export', threadId], {
|
|
97
|
+
encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'],
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
const fileRevision = (path) => {
|
|
101
|
+
try {
|
|
102
|
+
const stat = statSync(path);
|
|
103
|
+
return `${stat.size}:${Math.floor(stat.mtimeMs)}`;
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
// @@@interval-seek - a native file is append-only, so the byte where an interval's first event sits never
|
|
110
|
+
// moves. The open tail re-reads its interval on every change; remembering that offset per (file, from) turns
|
|
111
|
+
// each re-read into "parse the current stretch" instead of "parse the whole thread again".
|
|
112
|
+
const intervalOffsets = new Map();
|
|
113
|
+
// One pass over the bytes from `scan.position` to the end of the file. Every complete line is parsed as JSON
|
|
114
|
+
// and handed to `onLine` with its byte offset; `onLine` returning true stops the scan early (a bounded
|
|
115
|
+
// lookahead), which abandons the rest — only a one-shot read does that.
|
|
116
|
+
function scanLines(harness, fd, scan, onLine) {
|
|
117
|
+
const chunk = Buffer.allocUnsafe(64 * 1024);
|
|
118
|
+
let { position, carry } = scan;
|
|
119
|
+
let lineStart = position - carry.length;
|
|
120
|
+
while (true) {
|
|
121
|
+
const read = readSync(fd, chunk, 0, chunk.length, position);
|
|
122
|
+
if (read <= 0)
|
|
123
|
+
break;
|
|
124
|
+
position += read;
|
|
125
|
+
const buffer = carry.length ? Buffer.concat([carry, chunk.subarray(0, read)]) : Buffer.from(chunk.subarray(0, read));
|
|
126
|
+
let cut = 0;
|
|
127
|
+
for (let index = 0; index < buffer.length; index++) {
|
|
128
|
+
if (buffer[index] !== 10)
|
|
129
|
+
continue;
|
|
130
|
+
const line = buffer.subarray(cut, index).toString('utf8');
|
|
131
|
+
const lineOffset = lineStart;
|
|
132
|
+
lineStart += index - cut + 1;
|
|
133
|
+
cut = index + 1;
|
|
134
|
+
if (!line.trim())
|
|
135
|
+
continue;
|
|
136
|
+
let value;
|
|
137
|
+
try {
|
|
138
|
+
value = JSON.parse(line);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
throw new TranscriptReadError('invalid', `${harness} transcript cannot be parsed: ${error instanceof Error ? error.message : String(error)}`);
|
|
142
|
+
}
|
|
143
|
+
if (onLine(value, lineOffset))
|
|
144
|
+
return { position, carry: Buffer.alloc(0) };
|
|
145
|
+
}
|
|
146
|
+
carry = Buffer.from(buffer.subarray(cut));
|
|
147
|
+
}
|
|
148
|
+
return { position, carry };
|
|
149
|
+
}
|
|
150
|
+
// The cursor over one interval of one line file. A one-shot `read` is a cursor advanced once and dropped; the
|
|
151
|
+
// open interval's `tail` keeps it, so each advance parses only what the harness appended since the last one.
|
|
152
|
+
class LineFileCursor {
|
|
153
|
+
harness;
|
|
154
|
+
path;
|
|
155
|
+
parse;
|
|
156
|
+
from;
|
|
157
|
+
collector;
|
|
158
|
+
scan = { position: 0, carry: Buffer.alloc(0) };
|
|
159
|
+
started = false;
|
|
160
|
+
seekKey;
|
|
161
|
+
constructor(harness, path, parse, from) {
|
|
162
|
+
this.harness = harness;
|
|
163
|
+
this.path = path;
|
|
164
|
+
this.parse = parse;
|
|
165
|
+
this.from = from;
|
|
166
|
+
this.seekKey = `${path}\n${from}`;
|
|
167
|
+
this.collector = new IntervalCollector({ from, to: from });
|
|
168
|
+
}
|
|
169
|
+
restart(size) {
|
|
170
|
+
const seek = intervalOffsets.get(this.seekKey) ?? 0;
|
|
171
|
+
const start = seek > 0 && seek < size ? seek : 0;
|
|
172
|
+
this.collector = new IntervalCollector({ from: this.from, to: this.from });
|
|
173
|
+
// a seek lands on the interval's first event, so the timestamps before it are known to exist
|
|
174
|
+
if (start > 0)
|
|
175
|
+
this.collector.sawTimestamp = true;
|
|
176
|
+
this.scan = { position: start, carry: Buffer.alloc(0) };
|
|
177
|
+
}
|
|
178
|
+
advance(to, lookahead = Number.POSITIVE_INFINITY) {
|
|
179
|
+
let size = 0;
|
|
180
|
+
try {
|
|
181
|
+
size = statSync(this.path).size;
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
throw new TranscriptReadError('unreadable', `${this.harness} transcript is unreadable: ${error instanceof Error ? error.message : String(error)}`);
|
|
185
|
+
}
|
|
186
|
+
if (size <= 0)
|
|
187
|
+
throw new TranscriptReadError('unreadable', `${this.harness} transcript is unreadable: file is empty`);
|
|
188
|
+
// a source that shrank was rewritten underneath the cursor: forget the position and read the interval afresh
|
|
189
|
+
if (!this.started || size < this.scan.position) {
|
|
190
|
+
this.restart(size);
|
|
191
|
+
this.started = true;
|
|
192
|
+
}
|
|
193
|
+
this.collector.extend(to);
|
|
194
|
+
let fd = null;
|
|
195
|
+
try {
|
|
196
|
+
fd = openSync(this.path, 'r');
|
|
197
|
+
let postRangeLines = 0;
|
|
198
|
+
this.scan = scanLines(this.harness, fd, this.scan, (value, offset) => {
|
|
199
|
+
const event = this.parse(value);
|
|
200
|
+
if (!event)
|
|
201
|
+
return false;
|
|
202
|
+
const inRange = event.at !== null && event.at >= this.from && event.at <= to;
|
|
203
|
+
if (inRange && !intervalOffsets.has(this.seekKey))
|
|
204
|
+
intervalOffsets.set(this.seekKey, offset);
|
|
205
|
+
const pastRange = this.collector.add(event);
|
|
206
|
+
return pastRange && ++postRangeLines >= lookahead;
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
if (error instanceof TranscriptReadError)
|
|
211
|
+
throw error;
|
|
212
|
+
throw new TranscriptReadError('unreadable', `${this.harness} transcript could not be read: ${error instanceof Error ? error.message : String(error)}`);
|
|
213
|
+
}
|
|
214
|
+
finally {
|
|
215
|
+
if (fd !== null)
|
|
216
|
+
closeSync(fd);
|
|
217
|
+
}
|
|
218
|
+
return this.collector.finish(fileRevision(this.path) ?? `${size}`, this.harness);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
function lineFileReader(harness, locate, parse) {
|
|
222
|
+
const find = (threadId) => {
|
|
223
|
+
const path = locate(threadId);
|
|
224
|
+
if (!path)
|
|
225
|
+
throw new TranscriptReadError('missing', `${harness} transcript for ${threadId} is unavailable: file was not found`);
|
|
226
|
+
return path;
|
|
227
|
+
};
|
|
228
|
+
return {
|
|
229
|
+
revision: (threadId) => { const path = locate(threadId); return path ? fileRevision(path) : null; },
|
|
230
|
+
// after passing `to`, a one-shot read scans a fixed lookahead window for timestamp disorder before stopping
|
|
231
|
+
read: async (threadId, range) => new LineFileCursor(harness, find(threadId), parse, range.from).advance(range.to, POST_RANGE_LOOKAHEAD_LINES),
|
|
232
|
+
tail: (threadId, from) => {
|
|
233
|
+
let cursor = null;
|
|
234
|
+
return {
|
|
235
|
+
// the file is located on the first advance, so a tail opened before the thread exists fails as `missing`
|
|
236
|
+
// there rather than at construction
|
|
237
|
+
advance: async (to) => (cursor ??= new LineFileCursor(harness, find(threadId), parse, from)).advance(to),
|
|
238
|
+
close: () => { cursor = null; },
|
|
239
|
+
};
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
export const claudeTranscript = lineFileReader('claude', (threadId) => claudeTranscriptPath(threadId), claudeEvent);
|
|
244
|
+
export const codexTranscript = lineFileReader('codex', (threadId) => codexRolloutPath(threadId), codexEvent);
|
|
245
|
+
export const piTranscript = lineFileReader('pi', (threadId) => piSessionPath(threadId), piEvent);
|
|
246
|
+
// OpenCode has no per-thread file: the store's revision is the change token, and one export per
|
|
247
|
+
// revision is parsed and kept, so repeated interval reads of a quiet thread cost nothing new.
|
|
248
|
+
const opencodeExports = new Map();
|
|
249
|
+
export function opencodeTranscriptReader(root = opencodeStoreRoot(), load = opencodeExport) {
|
|
250
|
+
const reader = {
|
|
251
|
+
revision: () => opencodeStoreRevision(root),
|
|
252
|
+
read: async (threadId, range) => {
|
|
253
|
+
const revision = opencodeStoreRevision(root);
|
|
254
|
+
if (!revision)
|
|
255
|
+
throw new TranscriptReadError('missing', `opencode transcript for ${threadId} is unavailable: store was not found`);
|
|
256
|
+
const key = `${root}:${threadId}`;
|
|
257
|
+
let cached = opencodeExports.get(key);
|
|
258
|
+
if (!cached || cached.revision !== revision) {
|
|
259
|
+
let exported;
|
|
260
|
+
try {
|
|
261
|
+
exported = load(threadId);
|
|
262
|
+
}
|
|
263
|
+
catch (error) {
|
|
264
|
+
throw new TranscriptReadError('unreadable', `opencode transcript could not be exported: ${error instanceof Error ? error.message : String(error)}`);
|
|
265
|
+
}
|
|
266
|
+
let value;
|
|
267
|
+
try {
|
|
268
|
+
value = JSON.parse(exported);
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
throw new TranscriptReadError('invalid', `opencode transcript cannot be parsed: ${error instanceof Error ? error.message : String(error)}`);
|
|
272
|
+
}
|
|
273
|
+
cached = { revision, events: opencodeEvents(value) };
|
|
274
|
+
opencodeExports.set(key, cached);
|
|
275
|
+
}
|
|
276
|
+
const collector = new IntervalCollector(range);
|
|
277
|
+
for (const event of cached.events)
|
|
278
|
+
collector.add(event);
|
|
279
|
+
return collector.finish(revision, 'opencode');
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
return {
|
|
283
|
+
...reader,
|
|
284
|
+
// no file grows here: an open interval is re-collected from the cached export, which is one export per revision
|
|
285
|
+
tail: (threadId, from) => ({ advance: (to) => reader.read(threadId, { from, to }), close: () => { } }),
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
export const opencodeTranscript = opencodeTranscriptReader();
|
|
289
|
+
export function unsupportedTranscript(harness) {
|
|
290
|
+
const refuse = async () => { throw new TranscriptReadError('unsupported', `${harness} does not support transcript access`); };
|
|
291
|
+
return {
|
|
292
|
+
revision: () => null,
|
|
293
|
+
read: refuse,
|
|
294
|
+
tail: () => ({ advance: refuse, close: () => { } }),
|
|
295
|
+
};
|
|
296
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type TranscriptRange = Readonly<{
|
|
2
|
+
from: number;
|
|
3
|
+
to: number;
|
|
4
|
+
}>;
|
|
5
|
+
export type TranscriptTool = Readonly<{
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
input?: string;
|
|
9
|
+
output?: string;
|
|
10
|
+
outputLines: number;
|
|
11
|
+
outputBytes: number;
|
|
12
|
+
}>;
|
|
13
|
+
export type TranscriptTurn = Readonly<{
|
|
14
|
+
id: string;
|
|
15
|
+
at: number;
|
|
16
|
+
role: 'user' | 'assistant';
|
|
17
|
+
text?: string;
|
|
18
|
+
tools?: readonly TranscriptTool[];
|
|
19
|
+
}>;
|
|
20
|
+
export type TranscriptRead = Readonly<{
|
|
21
|
+
revision: string;
|
|
22
|
+
from: number;
|
|
23
|
+
to: number;
|
|
24
|
+
turns: readonly TranscriptTurn[];
|
|
25
|
+
truncated: boolean;
|
|
26
|
+
omittedTurns: number;
|
|
27
|
+
omittedBytes: number;
|
|
28
|
+
outOfOrderEvents: number;
|
|
29
|
+
}>;
|
|
30
|
+
export type TranscriptTail = Readonly<{
|
|
31
|
+
advance(to: number): Promise<TranscriptRead>;
|
|
32
|
+
close(): void;
|
|
33
|
+
}>;
|
|
34
|
+
export type TranscriptReader = Readonly<{
|
|
35
|
+
revision(threadId: string): string | null;
|
|
36
|
+
read(threadId: string, range: TranscriptRange): Promise<TranscriptRead>;
|
|
37
|
+
tail(threadId: string, from: number): TranscriptTail;
|
|
38
|
+
}>;
|
|
39
|
+
export declare class TranscriptReadError extends Error {
|
|
40
|
+
readonly reason: 'unsupported' | 'missing' | 'unreadable' | 'invalid';
|
|
41
|
+
constructor(reason: 'unsupported' | 'missing' | 'unreadable' | 'invalid', message: string);
|
|
42
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// THE NORMALIZED TRANSCRIPT. Every harness keeps its conversation in a private shape; this is the one shape
|
|
2
|
+
// every surface reads instead: user and assistant prose, tool calls with their input, and each call's output
|
|
3
|
+
// once the harness recorded it. Nothing here imports Node, so a browser renderer and a Node reader share it.
|
|
4
|
+
export class TranscriptReadError extends Error {
|
|
5
|
+
reason;
|
|
6
|
+
constructor(reason, message) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.reason = reason;
|
|
9
|
+
this.name = 'TranscriptReadError';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@spexcode/transcript",
|
|
3
|
+
"version": "0.7.0-next.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Normalized agent transcripts: one parser per harness, a bounded interval reader over a native thread file or an in-memory event stream, and the full/delta frame protocol every transport and renderer share.",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/index.js",
|
|
11
|
+
"./frames": "./dist/frames.js",
|
|
12
|
+
"./package.json": "./package.json"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "node ../../scripts/build-dist.mjs",
|
|
22
|
+
"prepublishOnly": "node ../../scripts/release-publish.mjs --from-package-publish",
|
|
23
|
+
"test": "npm run build && tsx --import ../../scripts/test-home.mjs --test src/*.test.ts"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^18.19.0",
|
|
27
|
+
"tsx": "^4.19.2",
|
|
28
|
+
"typescript": "^5.6.3"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Pre-built Tree-Sitter wasm files
|
|
2
|
+
|
|
3
|
+
This repository contains scripts and build pipelines for building the Tree-Sitter and Tree-Sitter grammar WebAssembly files used by VS Code.
|
|
4
|
+
|
|
5
|
+
## Contributing
|
|
6
|
+
|
|
7
|
+
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
|
8
|
+
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
|
9
|
+
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
|
|
10
|
+
|
|
11
|
+
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
|
|
12
|
+
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
|
|
13
|
+
provided by the bot. You will only need to do this once across all repos using our CLA.
|
|
14
|
+
|
|
15
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
|
16
|
+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
|
17
|
+
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
18
|
+
|
|
19
|
+
### Build steps
|
|
20
|
+
|
|
21
|
+
> Note: If you're using Windows, you'll need to use WSL. Ensure Docker integration for WSL is enabled before attempting to build. Without this integration, the build process may encounter errors.
|
|
22
|
+
|
|
23
|
+
First, install all of the dependencies using `npm install`, use the `--force` flag if needed. You will also need to install [emscripten](https://emscripten.org/docs/getting_started/downloads.html).
|
|
24
|
+
|
|
25
|
+
Then, build the the wasm files using `npm run build-wasm`, which will do the following:
|
|
26
|
+
- Clone the tree-sitter repository
|
|
27
|
+
- Build the tree-sitter WebAssembly bindings
|
|
28
|
+
- Build the tree-sitter grammars listed in https://github.com/microsoft/vscode-tree-sitter-wasm/blob/alexr00/0.0.1/build/main.ts
|
|
29
|
+
|
|
30
|
+
## Trademarks
|
|
31
|
+
|
|
32
|
+
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
|
|
33
|
+
trademarks or logos is subject to and must follow
|
|
34
|
+
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
|
35
|
+
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
36
|
+
Any use of third-party trademarks or logos are subject to those third-party's policies.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
|
|
2
|
+
|
|
3
|
+
## Security
|
|
4
|
+
|
|
5
|
+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
|
|
6
|
+
|
|
7
|
+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
|
|
8
|
+
|
|
9
|
+
## Reporting Security Issues
|
|
10
|
+
|
|
11
|
+
**Please do not report security vulnerabilities through public GitHub issues.**
|
|
12
|
+
|
|
13
|
+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
|
|
14
|
+
|
|
15
|
+
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
|
|
16
|
+
|
|
17
|
+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
|
18
|
+
|
|
19
|
+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
|
20
|
+
|
|
21
|
+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
|
22
|
+
* Full paths of source file(s) related to the manifestation of the issue
|
|
23
|
+
* The location of the affected source code (tag/branch/commit or direct URL)
|
|
24
|
+
* Any special configuration required to reproduce the issue
|
|
25
|
+
* Step-by-step instructions to reproduce the issue
|
|
26
|
+
* Proof-of-concept or exploit code (if possible)
|
|
27
|
+
* Impact of the issue, including how an attacker might exploit the issue
|
|
28
|
+
|
|
29
|
+
This information will help us triage your report more quickly.
|
|
30
|
+
|
|
31
|
+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
|
|
32
|
+
|
|
33
|
+
## Preferred Languages
|
|
34
|
+
|
|
35
|
+
We prefer all communications to be in English.
|
|
36
|
+
|
|
37
|
+
## Policy
|
|
38
|
+
|
|
39
|
+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
|
|
40
|
+
|
|
41
|
+
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"registrations": [
|
|
3
|
+
{
|
|
4
|
+
"component": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"git": {
|
|
7
|
+
"name": "tree-sitter",
|
|
8
|
+
"repositoryUrl": "https://github.com/tree-sitter/tree-sitter",
|
|
9
|
+
"commitHash": "fc15f621334a262039ffaded5937e2844f88da61"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"version": "0.25.1"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vscode/tree-sitter-wasm",
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Pre-built WASM files for Tree-Sitter and Tree-Sitter languages that VS Code uses",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build-wasm": "ts-node ./build/main.ts",
|
|
7
|
+
"install-emsdk": "sudo rm -rf /opt/dev/emsdk && sudo ./build/setup-emsdk.sh"
|
|
8
|
+
},
|
|
9
|
+
"author": "Visual Studio Code Team",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"files": [
|
|
12
|
+
"wasm",
|
|
13
|
+
"LICENSE",
|
|
14
|
+
"README.md",
|
|
15
|
+
"SECURITY.md",
|
|
16
|
+
"cgmanifest.json"
|
|
17
|
+
],
|
|
18
|
+
"main": "wasm/tree-sitter.js",
|
|
19
|
+
"types": "wasm/web-tree-sitter.d.ts",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^20.14.6",
|
|
22
|
+
"tree-sitter-bash": "^0.25.0",
|
|
23
|
+
"tree-sitter-cli": "^0.25.10",
|
|
24
|
+
"tree-sitter-css": "^0.25.0",
|
|
25
|
+
"tree-sitter-go": "^0.25.0",
|
|
26
|
+
"tree-sitter-java": "^0.23.5",
|
|
27
|
+
"tree-sitter-javascript": "^0.25.0",
|
|
28
|
+
"tree-sitter-php": "0.24.2",
|
|
29
|
+
"tree-sitter-python": "^0.25.0",
|
|
30
|
+
"tree-sitter-regex": "^0.25.0",
|
|
31
|
+
"tree-sitter-ruby": "^0.23.1",
|
|
32
|
+
"tree-sitter-typescript": "^0.23.2",
|
|
33
|
+
"ts-node": "^10.9.2"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/Microsoft/vscode-tree-sitter-wasm.git"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/Microsoft/vscode-tree-sitter-wasm/issues"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|