@codua/codeoutline-win32-x64 0.1.0 → 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/DISTRIBUTION.md CHANGED
@@ -37,7 +37,8 @@ packages explicitly. Neither installation path uses postinstall downloads.
37
37
 
38
38
  For native use, extract the `native/` directory and run `codeoutline.cmd` on
39
39
  Windows, or `./codeoutline` on Unix. On Unix, mark `codeoutline` and
40
- `xnet2lua/bin/xnet` executable before packing or archiving.
40
+ `bin/xnet` executable before packing or archiving. A package holds the runtime
41
+ as `bin/xnet` (`bin/xnet.exe`) and its HTTP codec as `lib/xhttp_codec.lua`.
41
42
 
42
43
  ## Platform validation and publication
43
44
 
package/README.md CHANGED
@@ -65,6 +65,8 @@ codeoutline doctor [--project PATH]
65
65
 
66
66
  `status`, `rebuild`, and `doctor` print JSON; a failed diagnostic exits nonzero. One-shot commands default to the current directory as the project.
67
67
 
68
+ The runtime logs only warnings and errors, to stderr, and writes no log files, so starting it in a project leaves nothing behind. For troubleshooting, set `CODEOUTLINE_LOG_LEVEL` (`DEBUG`, `INFO`, `WARN`, `ERROR`, ...) and `CODEOUTLINE_LOG_DIR` to write log files to that directory.
69
+
68
70
  ## MCP service details
69
71
 
70
72
  The protocol baseline is [MCP 2025-06-18](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports). Query budgets range from 256 to 262144 bytes (default 16000); truncated output stays valid UTF-8 and ends with a truncation notice. Paths always refer to the machine running the service.
package/README.zh-CN.md CHANGED
@@ -65,6 +65,8 @@ codeoutline doctor [--project PATH]
65
65
 
66
66
  `status`、`rebuild`、`doctor` 输出 JSON;诊断失败返回非零退出码。一次性命令的项目默认为当前目录。
67
67
 
68
+ 运行时只把警告和错误输出到 stderr,不写日志文件,在项目中启动不会留下任何文件。排查问题时可设置 `CODEOUTLINE_LOG_LEVEL`(`DEBUG`、`INFO`、`WARN`、`ERROR` 等)调整级别,设置 `CODEOUTLINE_LOG_DIR` 将日志文件写到该目录。
69
+
68
70
  ## MCP 服务细节
69
71
 
70
72
  协议基线为 [MCP 2025-06-18](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports)。查询预算为 256–262144 字节,默认 16000;超限输出保持 UTF-8 有效并附截断提示。路径均指服务所在机器。
Binary file
package/build-info.json CHANGED
@@ -1 +1 @@
1
- {"sha256":{"scripts/codeoutline/index_worker.lua":"afcc4751c7d12b3574eab3e617e8f855081690b2ade4c74da3a8c6a55edcd1b2","scripts/codeoutline/version.lua":"a3a170145d80f1ba5bce4976681bc3ff70709c88cf95e0f46a535cf991afbd1b","scripts/codeoutline/lang/csharp.lua":"36ac648b8691c85b8c75d5bcb146fcdfc87992a278e4798f3eb194124e3df2bb","licenses/rpmalloc.txt":"f6c10eb9ec349900767c3dcb8bc71fe4fba2aefea329f05e2608827188016c0f","scripts/codeoutline/lang/js.lua":"7a25a195356deeef7da3fdaf6e8a483b2a3a230cae3064e5dde2a3556fdcbda9","scripts/codeoutline/xscan.lua":"508d1fdccee4e856e0f198992bec45d7c8a9a3c191e0a5f71717741db9e00325","scripts/codeoutline/lang/go.lua":"f5717cbeabe6d30dad72c473fa445480d7fb6b5546bb262e5f4c46185f0959da","licenses/mbedtls.txt":"9b405ef4c89342f5eae1dd828882f931747f71001cfba7d114801039b52ad09b","scripts/codeoutline/lang/lua.lua":"33b038192425e4db29251674e30c73b7a1af849789c49ff6430ee409c062f812","README.zh-CN.md":"315519e4051bb90bd69575735ba3bab24cf1c99d98166eafea3c8f739f727be6","scripts/codeoutline/cli.lua":"ba996c3c3def65aab08ba60141a7a98a19dfcc1bbe004ab5d8ea14a7f9f9a08b","DISTRIBUTION.md":"ed05652387cf72ebffded83c55a92826d91fe91b08abbed451b8072002870dc0","scripts/codeoutline/lang/python.lua":"f7219c04914673ee6bae387c222b09acd433596c746237bdd6650a4f4087b17c","scripts/codeoutline/command.lua":"a2a0f1ce27f5fb3c2868e6517b85a06e314bb9314c59dcb3de671da7e29462ad","scripts/codeoutline/lang/rust.lua":"f7c21751b1ab08512a406f45bd53546dddfa98ff680b1374d29a4152ae110023","scripts/codeoutline/common.lua":"ee775ed5b2f7ada7a02851f44b51bd4008bceacbf9700576a474e6732e3c03c2","scripts/codeoutline/main.lua":"10e383634dea4f10189beec956be2c321883514981f8cb7895960e0c36947446","scripts/codeoutline/control.lua":"1dfbea9f1397d9fb3c321c48a8d8ee7fc7928e864588226e55247bd548255bb4","scripts/codeoutline/mcp.lua":"3a44ade52415e44b09bbcf9c02cbbf27f054de7936b932a2c26499c1795b14e4","scripts/codeoutline/explore.lua":"d9e4e0d0179d00205df96ad0e7442e7bbc87e27481e6d27eb772ca302b5f35d3","scripts/codeoutline/parse.lua":"ccda7a087dc90109fce7a1e64ebe1de0d7c7036990b81b3423ff14b4299bf38f","scripts/codeoutline/graph.lua":"1ef35f2e92e9db3bbe9b612bb0cb336a9b57b440c9a066e7ba3ef81574326834","scripts/codeoutline/path.lua":"595018dc46a51a5a19bd25694fd92913d2a3ade0c4abe67fb1a8d09b57ba7d23","THIRD_PARTY.md":"a70238f26ec05b7be4b813fa49c337cfb4d3cd64c36fcd27401d121e0e6e38df","README.md":"f831d9893f877c97c40d263114704316e15632ef2fad7ca3a6b293b899e466da","licenses/lua-cmsgpack.txt":"8edfdc5282278a1268d8a6ee52f9245f1a5fe3d1c8065be00330196b1de49873","scripts/codeoutline/service.lua":"597c435309abc0d8149b5e88095896c3bba6516146fd587d53b4b6fbf23a553c","scripts/codeoutline/http.lua":"33802130445b348ce607e9891d4a9789d34b18338bf5d296f56e0b3c7b0c5493","scripts/codeoutline/lang/c.lua":"1251352bcfac6b6d3704460e00b06cf4f41232144748b41b89db04a5ab594073","xnet2lua/scripts/core/share/xhttp_codec.lua":"a5b0f127105ba6dbd4a518a214ca55e22c7510e6b2fc8c25c325898d8346ef8c","xnet2lua/bin/xnet.exe":"f21338b3a20f57568936c292b541ce8c4865b34cb68ea94a8c73d730ce7ec658","licenses/xnet2lua.txt":"1aa8af3df70f60f1ebf2d23e14c27af1606057ad9c32a9a0d15fd76cff257532","scripts/codeoutline/lang/cpp.lua":"96aebcd8972d5272c11446257f37fe90c10f4130c3c1b5bb71c793d7c25456f4","licenses/libdeflate.txt":"41b60f2caab6bffdd5ba360687bd23ca653c0a1235c00380ecffc939b4cd8d75","scripts/codeoutline/text.lua":"75f9af87ff5ce62def74f69d8972a6b11ff660723fc5cf515369ee3012ff0675","LICENSE":"1b63179362acd482b4a9a07ca526b3fce6d9103dcded361de2159ade174568b6","scripts/codeoutline/index.lua":"08c585a7cb264962ac04beb3bf5bc8a9dd22b4f85644b6fdd6a4e527843fbee9","licenses/luajit.txt":"1b10a02c9474cb908da2d87bc908edd8798f9ad28d9a8c53fbd05c13227f7394","scripts/codeoutline/lang/java.lua":"435b6ddcd231679db9e705a604344a3fb6c00b84cc20b2ecd210423ee0b376a6"},"version":"0.1.0","runtimeCommit":"c9fbc0d099b0d82e632bb5d94b4822c69bdba28f","lua":"LuaJIT 2.1.1774896198","sourceCommit":"d524029ea5047d139de762c57273327e5211d209","target":"win32-x64","releaseReady":true,"note":"Release build from a clean checkout","sourceDirty":false}
1
+ {"version":"0.1.1","runtimeCommit":"f2c3ddfcbd3f04d7dd71543d0878d06e033519a0","lua":"LuaJIT 2.1.1774896198","target":"win32-x64","sourceDirty":false,"releaseReady":true,"note":"Release build from a clean checkout","sourceCommit":"9fc1127038549896ad723dcd0a88141e5111f5fd","sha256":{"scripts/codeoutline/cli.lua":"ba996c3c3def65aab08ba60141a7a98a19dfcc1bbe004ab5d8ea14a7f9f9a08b","scripts/codeoutline/mcp.lua":"3a44ade52415e44b09bbcf9c02cbbf27f054de7936b932a2c26499c1795b14e4","scripts/codeoutline/lang/c.lua":"1251352bcfac6b6d3704460e00b06cf4f41232144748b41b89db04a5ab594073","scripts/codeoutline/parse.lua":"ccda7a087dc90109fce7a1e64ebe1de0d7c7036990b81b3423ff14b4299bf38f","scripts/codeoutline/command.lua":"02e6096b9848a79577a6078f79264643e5631a79d6ce43ab4da1bb3b9116088c","scripts/codeoutline/lang/cpp.lua":"96aebcd8972d5272c11446257f37fe90c10f4130c3c1b5bb71c793d7c25456f4","scripts/codeoutline/path.lua":"595018dc46a51a5a19bd25694fd92913d2a3ade0c4abe67fb1a8d09b57ba7d23","scripts/codeoutline/common.lua":"ee775ed5b2f7ada7a02851f44b51bd4008bceacbf9700576a474e6732e3c03c2","lib/xhttp_codec.lua":"a5b0f127105ba6dbd4a518a214ca55e22c7510e6b2fc8c25c325898d8346ef8c","scripts/codeoutline/lang/csharp.lua":"36ac648b8691c85b8c75d5bcb146fcdfc87992a278e4798f3eb194124e3df2bb","licenses/xnet2lua.txt":"1aa8af3df70f60f1ebf2d23e14c27af1606057ad9c32a9a0d15fd76cff257532","scripts/codeoutline/service.lua":"597c435309abc0d8149b5e88095896c3bba6516146fd587d53b4b6fbf23a553c","licenses/libdeflate.txt":"41b60f2caab6bffdd5ba360687bd23ca653c0a1235c00380ecffc939b4cd8d75","LICENSE":"1b63179362acd482b4a9a07ca526b3fce6d9103dcded361de2159ade174568b6","scripts/codeoutline/lang/go.lua":"f5717cbeabe6d30dad72c473fa445480d7fb6b5546bb262e5f4c46185f0959da","licenses/luajit.txt":"1b10a02c9474cb908da2d87bc908edd8798f9ad28d9a8c53fbd05c13227f7394","scripts/codeoutline/text.lua":"75f9af87ff5ce62def74f69d8972a6b11ff660723fc5cf515369ee3012ff0675","scripts/codeoutline/explore.lua":"d9e4e0d0179d00205df96ad0e7442e7bbc87e27481e6d27eb772ca302b5f35d3","scripts/codeoutline/lang/java.lua":"435b6ddcd231679db9e705a604344a3fb6c00b84cc20b2ecd210423ee0b376a6","scripts/codeoutline/version.lua":"1686a082d18636d77ee04ae75e9f19e7248603b1ec996c1151222da6f8500189","scripts/codeoutline/graph.lua":"1ef35f2e92e9db3bbe9b612bb0cb336a9b57b440c9a066e7ba3ef81574326834","scripts/codeoutline/lang/js.lua":"7a25a195356deeef7da3fdaf6e8a483b2a3a230cae3064e5dde2a3556fdcbda9","scripts/codeoutline/xscan.lua":"508d1fdccee4e856e0f198992bec45d7c8a9a3c191e0a5f71717741db9e00325","scripts/codeoutline/http.lua":"33802130445b348ce607e9891d4a9789d34b18338bf5d296f56e0b3c7b0c5493","README.md":"02b878120b1edcb749c0934f6f7a454ed4455c924e101cafe53e6868ca54f368","scripts/codeoutline/lang/lua.lua":"33b038192425e4db29251674e30c73b7a1af849789c49ff6430ee409c062f812","DISTRIBUTION.md":"0de1a4699845a93c811a60bbb1dd3f7c1c4f39916c26e912fed5e621bcaf8b91","scripts/codeoutline/index.lua":"08c585a7cb264962ac04beb3bf5bc8a9dd22b4f85644b6fdd6a4e527843fbee9","THIRD_PARTY.md":"a70238f26ec05b7be4b813fa49c337cfb4d3cd64c36fcd27401d121e0e6e38df","scripts/codeoutline/lang/python.lua":"f7219c04914673ee6bae387c222b09acd433596c746237bdd6650a4f4087b17c","scripts/codeoutline/index_worker.lua":"afcc4751c7d12b3574eab3e617e8f855081690b2ade4c74da3a8c6a55edcd1b2","README.zh-CN.md":"9f2c9ec9fe64ecc688651be82146849656089ebcdce4a797122ba95d78986e85","scripts/codeoutline/lang/rust.lua":"f7c21751b1ab08512a406f45bd53546dddfa98ff680b1374d29a4152ae110023","licenses/mbedtls.txt":"9b405ef4c89342f5eae1dd828882f931747f71001cfba7d114801039b52ad09b","licenses/rpmalloc.txt":"f6c10eb9ec349900767c3dcb8bc71fe4fba2aefea329f05e2608827188016c0f","licenses/lua-cmsgpack.txt":"8edfdc5282278a1268d8a6ee52f9245f1a5fe3d1c8065be00330196b1de49873","bin/xnet.exe":"b275bdf69f07d45a0367ad92acbbbea025bf1a9df7e3700cd4fa82dd00454289","scripts/codeoutline/control.lua":"1dfbea9f1397d9fb3c321c48a8d8ee7fc7928e864588226e55247bd548255bb4","scripts/codeoutline/main.lua":"66c6f6d86b8b6dfd563b6d77bd964861546e56c9cca71daca6bdd5b0a177974e"}}
package/codeoutline CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/bin/sh
2
2
  set -eu
3
3
  base=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
4
- exec "$base/xnet2lua/bin/xnet" "$base/scripts/codeoutline/command.lua" LOG_STDERR=1 "$@"
4
+ if [ -n "${CODEOUTLINE_LOG_DIR:-}" ]; then log_out="LOG_DIR=$CODEOUTLINE_LOG_DIR"; else log_out=LOG_FILE=0; fi
5
+ exec "$base/bin/xnet" "$base/scripts/codeoutline/command.lua" LOG_STDERR=1 "LOG_LEVEL=${CODEOUTLINE_LOG_LEVEL:-WARN}" "$log_out" "$@"
package/codeoutline.cmd CHANGED
@@ -1,3 +1,7 @@
1
1
  @echo off
2
- "%~dp0xnet2lua\bin\xnet.exe" "%~dp0scripts\codeoutline\command.lua" LOG_STDERR=1 %*
2
+ setlocal
3
+ if not defined CODEOUTLINE_LOG_LEVEL set "CODEOUTLINE_LOG_LEVEL=WARN"
4
+ set "CODEOUTLINE_LOG_OUT=LOG_FILE=0"
5
+ if defined CODEOUTLINE_LOG_DIR set "CODEOUTLINE_LOG_OUT=LOG_DIR=%CODEOUTLINE_LOG_DIR%"
6
+ "%~dp0bin\xnet.exe" "%~dp0scripts\codeoutline\command.lua" LOG_STDERR=1 "LOG_LEVEL=%CODEOUTLINE_LOG_LEVEL%" "%CODEOUTLINE_LOG_OUT%" %*
3
7
  exit /b %errorlevel%
package/package.json CHANGED
@@ -1 +1 @@
1
- {"version":"0.1.0","os":["win32"],"publishConfig":{"access":"public"},"description":"CodeOutline native runtime and Lua implementation for win32-x64","cpu":["x64","arm64"],"license":"BSD-2-Clause","files":["scripts/","xnet2lua/","licenses/","LICENSE","codeoutline","codeoutline.cmd","build-info.json","*.md"],"repository":{"url":"git+https://github.com/1dao/codeoutline.git","type":"git"},"name":"@codua/codeoutline-win32-x64"}
1
+ {"os":["win32"],"name":"@codua/codeoutline-win32-x64","publishConfig":{"access":"public"},"description":"CodeOutline native runtime and Lua implementation for win32-x64","cpu":["x64","arm64"],"license":"BSD-2-Clause","repository":{"url":"git+https://github.com/1dao/codeoutline.git","type":"git"},"files":["bin/","lib/","scripts/","licenses/","LICENSE","codeoutline","codeoutline.cmd","build-info.json","*.md"],"version":"0.1.1"}
@@ -23,7 +23,9 @@ doctor reports JSON diagnostics and exits nonzero on a failed check.
23
23
  local function parse(args)
24
24
  local clean = {}
25
25
  for _, value in ipairs(args) do
26
- if value ~= 'LOG_STDERR=1' then clean[#clean + 1] = value end
26
+ -- Runtime logging options (LOG_STDERR, LOG_LEVEL, LOG_FILE, LOG_DIR)
27
+ -- are read by xnet itself; the launchers add them before user args.
28
+ if not value:match('^LOG_[A-Z_]+=') then clean[#clean + 1] = value end
27
29
  end
28
30
  local command = clean[1] or '--help'
29
31
  if command == '--help' or command == '-h' or command == '--version' then
@@ -152,4 +154,6 @@ local ok, result = pcall(run)
152
154
  if not ok then io.stderr:write('codeoutline: ', tostring(result), '\n'); result = 1 end
153
155
  if type(result) == 'table' then return result end
154
156
  io.stdout:flush()
155
- return { __init = function() xthread.stop(result) end }
157
+ -- One-shot commands exchange no thread messages; the empty handler keeps the
158
+ -- runtime from warning that none is set.
159
+ return { __init = function() xthread.stop(result) end, __thread_handle = function() end }
@@ -52,10 +52,19 @@ return {
52
52
  assert(xutils.read_stdin, 'Rebuild runtime for nonblocking stdin support')
53
53
  stdio = mcp.new(config, submit, cancel)
54
54
  else
55
- local runtime = options.RUNTIME_ROOT or install .. '/xnet2lua'
56
- local codec = dofile(runtime .. '/scripts/core/share/xhttp_codec.lua')
55
+ -- Packages ship the codec as lib/xhttp_codec.lua; a source checkout
56
+ -- reads it from the xnet2lua submodule.
57
+ local codec_path = options.RUNTIME_ROOT and options.RUNTIME_ROOT .. '/scripts/core/share/xhttp_codec.lua'
58
+ or install .. '/lib/xhttp_codec.lua'
59
+ local probe = io.open(codec_path, 'rb')
60
+ if probe then probe:close()
61
+ else codec_path = install .. '/xnet2lua/scripts/core/share/xhttp_codec.lua' end
62
+ local codec = dofile(codec_path)
57
63
  endpoint = http.start(config, submit, cancel, codec)
58
- io.stderr:write(string.format('[codeoutline] listening http://%s:%d/mcp\n', config.host, config.port))
64
+ -- A status line, not an error: xnet routes io.stderr through the
65
+ -- error log. HTTP mode leaves stdout free (stdio mode owns it).
66
+ io.stdout:write(string.format('[codeoutline] listening http://%s:%d/mcp\n', config.host, config.port))
67
+ io.stdout:flush()
59
68
  end
60
69
  end,
61
70
  __thread_handle = function(_, op, id, ok, result)
@@ -1 +1 @@
1
- return '0.1.0'
1
+ return '0.1.1'