homegraph 1.5.0 → 1.5.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 +21 -21
- package/README.md +305 -305
- package/dist/bin/command-supervision.d.ts.map +1 -1
- package/dist/bin/command-supervision.js +7 -4
- package/dist/bin/command-supervision.js.map +1 -1
- package/dist/bin/homegraph.js +9 -9
- package/dist/db/index.js +36 -36
- package/dist/db/migrations.js +37 -37
- package/dist/db/queries.js +156 -156
- package/dist/db/schema.sql +203 -203
- package/dist/directory.js +5 -5
- package/dist/extraction/languages/arkts-viewtree.d.ts +2 -4
- package/dist/extraction/languages/arkts-viewtree.d.ts.map +1 -1
- package/dist/extraction/languages/arkts-viewtree.js +6 -21
- package/dist/extraction/languages/arkts-viewtree.js.map +1 -1
- package/dist/extraction/languages/arkts.d.ts +16 -6
- package/dist/extraction/languages/arkts.d.ts.map +1 -1
- package/dist/extraction/languages/arkts.js +174 -21
- package/dist/extraction/languages/arkts.js.map +1 -1
- package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/dist/installer/instructions-template.js +9 -9
- package/dist/mcp/liveness-watchdog.d.ts +18 -0
- package/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/dist/mcp/liveness-watchdog.js +185 -73
- package/dist/mcp/liveness-watchdog.js.map +1 -1
- package/dist/mcp/server-instructions.js +47 -47
- package/dist/reasoning/reasoner.js +32 -32
- package/dist/spec/db/commit-node.js +4 -4
- package/dist/spec/db/fragment-node.js +10 -10
- package/dist/spec/db/fts.js +8 -8
- package/dist/spec/db/relations.js +88 -88
- package/dist/spec/db/schema.js +6 -6
- package/dist/spec/db/schema.sql +121 -121
- package/dist/spec/db/spec-node.js +4 -4
- package/dist/spec/llm/prompts.js +53 -53
- package/dist/spec/utils.d.ts +16 -4
- package/dist/spec/utils.d.ts.map +1 -1
- package/dist/spec/utils.js +58 -6
- package/dist/spec/utils.js.map +1 -1
- package/package.json +62 -62
- package/scripts/_tmp-cfwk-resolve.log +0 -0
- package/scripts/_tmp-cfwk-sig.log +0 -0
- package/scripts/_tmp-cfwk-vt.log +0 -0
- package/scripts/add-lang/bench.sh +60 -60
- package/scripts/add-lang/check-grammar.mjs +75 -75
- package/scripts/add-lang/dump-ast.mjs +103 -103
- package/scripts/add-lang/verify-extraction.mjs +70 -70
- package/scripts/agent-eval/ab-adoption.sh +91 -91
- package/scripts/agent-eval/ab-hook.sh +86 -86
- package/scripts/agent-eval/ab-impl.sh +78 -78
- package/scripts/agent-eval/ab-new-vs-baseline.sh +102 -102
- package/scripts/agent-eval/ab-sufficiency.sh +78 -78
- package/scripts/agent-eval/arms-F.sh +21 -21
- package/scripts/agent-eval/arms-matrix.sh +37 -37
- package/scripts/agent-eval/audit.sh +68 -68
- package/scripts/agent-eval/bench-readme.sh +28 -28
- package/scripts/agent-eval/bench-why-repo.sh +22 -22
- package/scripts/agent-eval/block-read-hook.sh +19 -19
- package/scripts/agent-eval/hook-settings.json +15 -15
- package/scripts/agent-eval/itrun.sh +120 -120
- package/scripts/agent-eval/offload-eval-3arm.sh +72 -72
- package/scripts/agent-eval/offload-eval-cost.mjs +133 -133
- package/scripts/agent-eval/offload-eval-effort.mjs +108 -108
- package/scripts/agent-eval/offload-eval-frontload-matrix.sh +25 -25
- package/scripts/agent-eval/offload-eval-frontload.sh +47 -47
- package/scripts/agent-eval/offload-eval-ground-truth.json +18 -18
- package/scripts/agent-eval/offload-eval-hook.mjs +84 -84
- package/scripts/agent-eval/offload-eval-judge.mjs +103 -103
- package/scripts/agent-eval/offload-eval-matrix.sh +20 -20
- package/scripts/agent-eval/offload-eval-metrics.mjs +94 -94
- package/scripts/agent-eval/offload-eval-refs1.sh +50 -50
- package/scripts/agent-eval/offload-eval-setup.sh +24 -24
- package/scripts/agent-eval/offload-eval-styles.sh +71 -71
- package/scripts/agent-eval/offload-eval-summarize.mjs +68 -68
- package/scripts/agent-eval/offload-eval.md +76 -76
- package/scripts/agent-eval/parse-arms.mjs +116 -116
- package/scripts/agent-eval/parse-bench-readme.mjs +84 -84
- package/scripts/agent-eval/parse-run.mjs +45 -45
- package/scripts/agent-eval/parse-session.mjs +93 -93
- package/scripts/agent-eval/probe-context.mjs +21 -21
- package/scripts/agent-eval/probe-explore.mjs +40 -40
- package/scripts/agent-eval/probe-node.mjs +20 -20
- package/scripts/agent-eval/probe-sweep.mjs +119 -119
- package/scripts/agent-eval/probe-trace.mjs +20 -20
- package/scripts/agent-eval/redirect-read-hook.sh +38 -38
- package/scripts/agent-eval/repro-concurrent-explore.mjs +119 -119
- package/scripts/agent-eval/repro-daemon-clients.mjs +125 -125
- package/scripts/agent-eval/run-agent.sh +34 -34
- package/scripts/agent-eval/run-all.sh +75 -75
- package/scripts/agent-eval/run-arms.sh +56 -56
- package/scripts/agent-eval/seq-matrix.mjs +137 -137
- package/scripts/bench-arkts-init-rss.log +0 -0
- package/scripts/build-bundle.sh +123 -123
- package/scripts/exp_boundary_eval/README.md +247 -247
- package/scripts/exp_boundary_eval/__pycache__/_utils.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/_utils.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/analyze.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/analyze.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/deveco_arm.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_all.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_all.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_one.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_one.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_session.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_session.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/setup.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/setup.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/win_mcp_launcher.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/_test_mcp_chain.py +78 -78
- package/scripts/exp_boundary_eval/_test_stdin.py +8 -8
- package/scripts/exp_boundary_eval/_utils.py +1116 -1116
- package/scripts/exp_boundary_eval/analyze.py +1313 -1313
- package/scripts/exp_boundary_eval/deveco_arm.py +519 -519
- package/scripts/exp_boundary_eval/run_all.py +378 -378
- package/scripts/exp_boundary_eval/run_one.py +165 -165
- package/scripts/exp_boundary_eval/run_session.py +158 -158
- package/scripts/exp_boundary_eval/setup.py +120 -120
- package/scripts/exp_boundary_eval/win_mcp_launcher.py +73 -73
- package/scripts/exp_boundary_eval/win_mcp_stdio_wrap.js +36 -36
- package/scripts/exp_boundary_eval/win_node_launcher.py +24 -24
- package/scripts/extract-release-notes.mjs +130 -130
- package/scripts/local-install.sh +41 -41
- package/scripts/npm-sdk.js +75 -75
- package/scripts/npm-shim.js +275 -275
- package/scripts/ohos-sdk-publish.mjs +133 -133
- package/scripts/pack-npm.sh +119 -119
- package/scripts/prepare-release.mjs +270 -270
- package/scripts/probe-arkts-mem-why-run.log +0 -0
- package/scripts/probe-banner-livecard-ir.log +0 -0
- package/scripts/probe-cfwk-ast.stderr.log +0 -0
- package/scripts/probe-cfwk-ast.stdout.log +0 -0
- package/scripts/probe-cfwk-attr-shape.log +0 -0
- package/scripts/probe-cfwk-cfgdump.stderr.log +0 -0
- package/scripts/probe-cfwk-cfgdump.stdout.log +0 -0
- package/scripts/probe-cfwk-cvc.stderr.log +0 -0
- package/scripts/probe-cfwk-cvc.stdout.log +0 -0
- package/scripts/probe-cfwk-diag2.log +0 -0
- package/scripts/probe-cfwk-diag3.log +0 -0
- package/scripts/probe-cfwk-fedbg.stderr.log +0 -0
- package/scripts/probe-cfwk-fedbg.stdout.log +0 -0
- package/scripts/probe-cfwk-fileresult.log +0 -0
- package/scripts/probe-cfwk-fix.stderr.log +0 -0
- package/scripts/probe-cfwk-fix.stdout.log +0 -0
- package/scripts/probe-cfwk-fix2.stderr.log +0 -0
- package/scripts/probe-cfwk-fix2.stdout.log +0 -0
- package/scripts/probe-cfwk-fix3.stderr.log +0 -0
- package/scripts/probe-cfwk-fix3.stdout.log +0 -0
- package/scripts/probe-cfwk-foreach.log +0 -0
- package/scripts/probe-cfwk-getmethod-throw.log +0 -0
- package/scripts/probe-cfwk-hg-extract.log +0 -0
- package/scripts/probe-cfwk-pr1003-noprior.stderr.log +0 -0
- package/scripts/probe-cfwk-pr1003-noprior.stdout.log +0 -0
- package/scripts/probe-cfwk-pr1003.stderr.log +0 -0
- package/scripts/probe-cfwk-pr1003.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-noprior.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-noprior.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-prior.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-prior.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-skipstate.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-skipstate.stdout.log +0 -0
- package/scripts/probe-cfwk-resolve-sim.log +0 -0
- package/scripts/probe-cfwk-tree-shape.log +0 -0
- package/scripts/probe-cfwk-walk-abort.log +0 -0
- package/scripts/probe-cfwk.log +0 -0
- package/scripts/probe-force-index.log +0 -0
- package/scripts/probe-no-force-index.log +0 -0
- package/scripts/probe-samefile-ir.stderr.log +0 -0
- package/scripts/probe-samefile-ir.stdout.log +224 -0
- package/scripts/probe-sdk-vs-project.log +0 -0
- package/scripts/probe-viewtree-downgrade.log +0 -0
- package/dist/arkts/ohos-api-index.d.ts +0 -15
- package/dist/arkts/ohos-api-index.d.ts.map +0 -1
- package/dist/arkts/ohos-api-index.js +0 -190
- package/dist/arkts/ohos-api-index.js.map +0 -1
- package/dist/arkts/ohos-sdk-input.d.ts +0 -36
- package/dist/arkts/ohos-sdk-input.d.ts.map +0 -1
- package/dist/arkts/ohos-sdk-input.js +0 -214
- package/dist/arkts/ohos-sdk-input.js.map +0 -1
- package/dist/extraction/languages/arkts-state-decorators.d.ts +0 -13
- package/dist/extraction/languages/arkts-state-decorators.d.ts.map +0 -1
- package/dist/extraction/languages/arkts-state-decorators.js +0 -26
- package/dist/extraction/languages/arkts-state-decorators.js.map +0 -1
- package/dist/extraction/languages/ohos-api-consumer.d.ts +0 -34
- package/dist/extraction/languages/ohos-api-consumer.d.ts.map +0 -1
- package/dist/extraction/languages/ohos-api-consumer.js +0 -283
- package/dist/extraction/languages/ohos-api-consumer.js.map +0 -1
- package/dist/spec/build/git-scanner.d.ts +0 -93
- package/dist/spec/build/git-scanner.d.ts.map +0 -1
- package/dist/spec/build/git-scanner.js +0 -254
- package/dist/spec/build/git-scanner.js.map +0 -1
- package/dist/spec/git-utils.d.ts +0 -8
- package/dist/spec/git-utils.d.ts.map +0 -1
- package/dist/spec/git-utils.js +0 -14
- package/dist/spec/git-utils.js.map +0 -1
- package/dist/spec/mine/clusterer.d.ts +0 -63
- package/dist/spec/mine/clusterer.d.ts.map +0 -1
- package/dist/spec/mine/clusterer.js +0 -904
- package/dist/spec/mine/clusterer.js.map +0 -1
- package/dist/spec/mine/progress-handler.d.ts +0 -22
- package/dist/spec/mine/progress-handler.d.ts.map +0 -1
- package/dist/spec/mine/progress-handler.js +0 -108
- package/dist/spec/mine/progress-handler.js.map +0 -1
- package/dist/spec/mine/progress.d.ts +0 -23
- package/dist/spec/mine/progress.d.ts.map +0 -1
- package/dist/spec/mine/progress.js +0 -12
- package/dist/spec/mine/progress.js.map +0 -1
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Quick stdio test for win_mcp_launcher chain."""
|
|
3
|
-
import json
|
|
4
|
-
import subprocess
|
|
5
|
-
import sys
|
|
6
|
-
import threading
|
|
7
|
-
import time
|
|
8
|
-
from pathlib import Path
|
|
9
|
-
|
|
10
|
-
LAUNCHER = Path(__file__).with_name("win_mcp_launcher.py")
|
|
11
|
-
HG = Path(__file__).resolve().parents[2] / "dist" / "bin" / "homegraph.js"
|
|
12
|
-
REPO = Path(r"D:\code\applications_photos")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def run_chain(python: str) -> None:
|
|
16
|
-
cmd = [
|
|
17
|
-
python,
|
|
18
|
-
str(LAUNCHER),
|
|
19
|
-
"--liftoff-only",
|
|
20
|
-
"--stack-size=32768",
|
|
21
|
-
str(HG),
|
|
22
|
-
"serve",
|
|
23
|
-
"--mcp",
|
|
24
|
-
"--path",
|
|
25
|
-
str(REPO),
|
|
26
|
-
]
|
|
27
|
-
proc = subprocess.Popen(
|
|
28
|
-
cmd,
|
|
29
|
-
stdin=subprocess.PIPE,
|
|
30
|
-
stdout=subprocess.PIPE,
|
|
31
|
-
stderr=subprocess.PIPE,
|
|
32
|
-
)
|
|
33
|
-
req = {
|
|
34
|
-
"jsonrpc": "2.0",
|
|
35
|
-
"id": 1,
|
|
36
|
-
"method": "initialize",
|
|
37
|
-
"params": {
|
|
38
|
-
"protocolVersion": "2024-11-05",
|
|
39
|
-
"capabilities": {},
|
|
40
|
-
"clientInfo": {"name": "t", "version": "0"},
|
|
41
|
-
},
|
|
42
|
-
}
|
|
43
|
-
proc.stdin.write((json.dumps(req) + "\n").encode())
|
|
44
|
-
proc.stdin.flush()
|
|
45
|
-
|
|
46
|
-
chunks: list[bytes] = []
|
|
47
|
-
|
|
48
|
-
def read_stdout() -> None:
|
|
49
|
-
while True:
|
|
50
|
-
block = proc.stdout.read(4096)
|
|
51
|
-
if not block:
|
|
52
|
-
break
|
|
53
|
-
chunks.append(block)
|
|
54
|
-
|
|
55
|
-
threading.Thread(target=read_stdout, daemon=True).start()
|
|
56
|
-
time.sleep(20)
|
|
57
|
-
alive = proc.poll() is None
|
|
58
|
-
if alive:
|
|
59
|
-
proc.kill()
|
|
60
|
-
proc.wait(timeout=5)
|
|
61
|
-
out = b"".join(chunks)
|
|
62
|
-
err = proc.stderr.read()
|
|
63
|
-
print(
|
|
64
|
-
f"{Path(python).name}: alive={alive} rc={proc.returncode} "
|
|
65
|
-
f"out={len(out)} err={len(err)} result={'result' in out.decode('utf-8', 'replace')}"
|
|
66
|
-
)
|
|
67
|
-
if err:
|
|
68
|
-
print(" stderr:", err[:400].decode("utf-8", "replace"))
|
|
69
|
-
if out:
|
|
70
|
-
print(" stdout:", out[:200].decode("utf-8", "replace"))
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if __name__ == "__main__":
|
|
74
|
-
py_dir = Path(sys.executable).parent
|
|
75
|
-
for name in ("python.exe", "pythonw.exe"):
|
|
76
|
-
candidate = py_dir / name
|
|
77
|
-
if candidate.is_file():
|
|
78
|
-
run_chain(str(candidate))
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Quick stdio test for win_mcp_launcher chain."""
|
|
3
|
+
import json
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
import threading
|
|
7
|
+
import time
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
LAUNCHER = Path(__file__).with_name("win_mcp_launcher.py")
|
|
11
|
+
HG = Path(__file__).resolve().parents[2] / "dist" / "bin" / "homegraph.js"
|
|
12
|
+
REPO = Path(r"D:\code\applications_photos")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def run_chain(python: str) -> None:
|
|
16
|
+
cmd = [
|
|
17
|
+
python,
|
|
18
|
+
str(LAUNCHER),
|
|
19
|
+
"--liftoff-only",
|
|
20
|
+
"--stack-size=32768",
|
|
21
|
+
str(HG),
|
|
22
|
+
"serve",
|
|
23
|
+
"--mcp",
|
|
24
|
+
"--path",
|
|
25
|
+
str(REPO),
|
|
26
|
+
]
|
|
27
|
+
proc = subprocess.Popen(
|
|
28
|
+
cmd,
|
|
29
|
+
stdin=subprocess.PIPE,
|
|
30
|
+
stdout=subprocess.PIPE,
|
|
31
|
+
stderr=subprocess.PIPE,
|
|
32
|
+
)
|
|
33
|
+
req = {
|
|
34
|
+
"jsonrpc": "2.0",
|
|
35
|
+
"id": 1,
|
|
36
|
+
"method": "initialize",
|
|
37
|
+
"params": {
|
|
38
|
+
"protocolVersion": "2024-11-05",
|
|
39
|
+
"capabilities": {},
|
|
40
|
+
"clientInfo": {"name": "t", "version": "0"},
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
proc.stdin.write((json.dumps(req) + "\n").encode())
|
|
44
|
+
proc.stdin.flush()
|
|
45
|
+
|
|
46
|
+
chunks: list[bytes] = []
|
|
47
|
+
|
|
48
|
+
def read_stdout() -> None:
|
|
49
|
+
while True:
|
|
50
|
+
block = proc.stdout.read(4096)
|
|
51
|
+
if not block:
|
|
52
|
+
break
|
|
53
|
+
chunks.append(block)
|
|
54
|
+
|
|
55
|
+
threading.Thread(target=read_stdout, daemon=True).start()
|
|
56
|
+
time.sleep(20)
|
|
57
|
+
alive = proc.poll() is None
|
|
58
|
+
if alive:
|
|
59
|
+
proc.kill()
|
|
60
|
+
proc.wait(timeout=5)
|
|
61
|
+
out = b"".join(chunks)
|
|
62
|
+
err = proc.stderr.read()
|
|
63
|
+
print(
|
|
64
|
+
f"{Path(python).name}: alive={alive} rc={proc.returncode} "
|
|
65
|
+
f"out={len(out)} err={len(err)} result={'result' in out.decode('utf-8', 'replace')}"
|
|
66
|
+
)
|
|
67
|
+
if err:
|
|
68
|
+
print(" stderr:", err[:400].decode("utf-8", "replace"))
|
|
69
|
+
if out:
|
|
70
|
+
print(" stdout:", out[:200].decode("utf-8", "replace"))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
if __name__ == "__main__":
|
|
74
|
+
py_dir = Path(sys.executable).parent
|
|
75
|
+
for name in ("python.exe", "pythonw.exe"):
|
|
76
|
+
candidate = py_dir / name
|
|
77
|
+
if candidate.is_file():
|
|
78
|
+
run_chain(str(candidate))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import subprocess
|
|
2
|
-
import sys
|
|
3
|
-
|
|
4
|
-
print("middle start", file=sys.stderr, flush=True)
|
|
5
|
-
rc = subprocess.call(
|
|
6
|
-
[sys.executable, "-c", "import sys; print('child got stdin', sys.stdin.read(10)); sys.exit(0)"],
|
|
7
|
-
)
|
|
8
|
-
print("middle rc", rc, file=sys.stderr, flush=True)
|
|
1
|
+
import subprocess
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
print("middle start", file=sys.stderr, flush=True)
|
|
5
|
+
rc = subprocess.call(
|
|
6
|
+
[sys.executable, "-c", "import sys; print('child got stdin', sys.stdin.read(10)); sys.exit(0)"],
|
|
7
|
+
)
|
|
8
|
+
print("middle rc", rc, file=sys.stderr, flush=True)
|