Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 1.0.2 — 2026-09-29

### Fixed

- Inspecting an outline item (`cursor` + `matchIndex` from `mode: "outline"`) now returns the symbol's version-checked source with its syntax boundary instead of metadata only ([#96](https://github.com/lightsifter/sift-light/issues/96)).
- `mode: "files"` no longer reports `complete` coverage when ignore rules skipped files. It reports `policy-filtered` coverage, the number of ignored files and how many of them match the query with examples, and accepts `ignorePolicy: "include"` to list them. File candidates show their score and ranking reason in text and compact model output ([#97](https://github.com/lightsifter/sift-light/issues/97)).
- Display redaction keeps the source's own quoting. An unquoted secret such as `DB_PASSWORD=value` is shown as `DB_PASSWORD=[REDACTED]` instead of `DB_PASSWORD="[REDACTED]"`, so masked output no longer suggests quotes that are not in the file.
- Display redaction no longer masks source code that reads a secret. An unquoted value that starts as a call or index expression, such as `password = env.get("DB_PASS", "")` or `api_key = os.environ["API_KEY"]`, stays visible, so the key being read remains available as evidence. A literal secret that is unquoted and itself begins with letters followed by `(` or `[` is therefore not masked.
- `mode: "inspect"` with a direct `path` and no `line` opens the file from line 1 instead of failing. Cursor inspection still requires the exact retained line.

### Changed

These request shapes were observed from real agent sessions; each was rejected although its intent was unambiguous. Rewrites are disclosed in `details.requestNotes` and as `[Request note: …]` lines.

- `mode: "files"` accepts `limit` (files per page, default 30), the redundant `scope: "strict"` and `ignorePolicy`. A wildcard-only `query` (`*`, `**`, `.*`) lists every file, and a plain glob query such as `*.py` is applied as a glob filter; regex-like queries still fail with guidance. `pattern: ".*"` gets an exact retry request.
- `mode: "inspect"` accepts `paths` without a cursor to open several files from line 1, and the redundant `scope: "strict"` (`scope: "expand"` fails). `targets` and `matchIndices` accept up to 20 entries: five are inspected per response and the rest are returned as an exact `nextRequest`. A `sourceCursor` request may repeat its own `path` (a different path fails) and ignores `line` with a note.
- `anyOf` accepts one term and `allOf` accepts one to three terms. `mode: "anyOf"` and `mode: "allOf"` are accepted as aliases for omitting `mode`, and `anyOf` with `mode: "summary"` is served by its analysis page.
- `roles` supports Python through a bounded lexical scanner: comments, strings and code are exact; declarations and imports are line facts; calls are candidates. `mode: "capabilities"` lists it.
- A request without `pattern` explains how to list files or read a known file.

## 1.0.1 — 2026-09-23

### Changed
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ Long results arrive in pages with a way to continue. When the original material
A complete snapshot describes match retention, not complete source text. Truncated matching-line excerpts show their limit and an executable `inspectRequest`, which remains usable after the final match page. Follow pagination cursors instead of repeating the query with a different limit.
In Pi and OMP, the passive session status includes the loaded package version, counts returned new queries, distinguishes complete, partial and unfinished results, and reports non-cancelled failed calls. Cursor and operation continuations do not inflate the new-query count.

Ordinary searches keep repository ignore rules, but now report policy-filtered filesystem coverage instead of calling an absence exhaustive when ignored files exist. Use `mode: "audit"` with named literal `patterns` for one bounded receipt covering declared scope, enumerated/searched/skipped files, ignored-file policy, per-pattern `present`/`absent_with_complete_coverage`/`unknown` findings, and start/end source stability. Set `ignorePolicy: "include"` when an audit must include ignored configuration and generated files; `.git` internals and protected paths remain excluded.
Ordinary searches keep repository ignore rules, but now report policy-filtered filesystem coverage instead of calling an absence exhaustive when ignored files exist. Filename discovery (`mode: "files"`) does the same: it says how many files were ignored and which of them match the query, and `ignorePolicy: "include"` lists them. Each file candidate shows its score and whether it is an exact, substring or fuzzy match. Use `mode: "audit"` with named literal `patterns` for one bounded receipt covering declared scope, enumerated/searched/skipped files, ignored-file policy, per-pattern `present`/`absent_with_complete_coverage`/`unknown` findings, and start/end source stability. Set `ignorePolicy: "include"` when an audit must include ignored configuration and generated files; `.git` internals and protected paths remain excluded.

### Discover language capabilities before loading a provider

Use `mode: "capabilities"` with the project root for a compact, names-only inventory. JavaScript, TypeScript and TSX support AST structure, roles, outline, static imports and related-test candidates. Go supports AST structure and roles. Python supports bounded indentation-based outline. Swift and other languages remain available to ordinary content search, filename discovery and source inspection. Capability inventory does not start parsers or the Concept model.
Use `mode: "capabilities"` with the project root for a compact, names-only inventory. JavaScript, TypeScript and TSX support AST structure, roles, outline, static imports and related-test candidates. Go supports AST structure and roles. Python supports bounded indentation-based outline and lexical roles (comment, string, code, declaration, import, and call candidates). Swift and other languages remain available to ordinary content search, filename discovery and source inspection. Capability inventory does not start parsers or the Concept model.

Language-service navigation is out of scope. Asking for `definitions`, `references`, `implementations`, `callers`, `callees`, `dependencies`, `dependents`, `trace` or `impact` fails explicitly, because a text search dressed up as precise navigation would be a worse answer than a clear refusal. No language server runs while you work.

Expand All @@ -69,7 +69,7 @@ Use `mode: "validate"` with a saved ordinary-search or analysis `cursor`, option

Worktree searches can use `modifiedAfter` and `modifiedBefore` as Unix millisecond bounds. The lower bound is inclusive and the upper bound is exclusive, so a time window can be expressed without changing the search pattern. The same filter applies to content and filename searches; unavailable file metadata is reported as incomplete evidence rather than silently treated as a match.

Use `mode: "outline"` with a concrete JS/TS/TSX or Python file to see bounded symbol ranges. JS/TS/TSX use ast-grep; Python uses indentation-based class, function and method evidence. These ranges do not prove compiler bindings, runtime calls or test coverage. `mode: "tests"` provides JS/TS/TSX related-test candidates; unsupported language operations fail explicitly. Use ordinary search and `inspect` for Swift source.
Use `mode: "outline"` with a concrete JS/TS/TSX or Python file to see bounded symbol ranges. JS/TS/TSX use ast-grep; Python uses indentation-based class, function and method evidence. Inspecting an outline item returns that symbol's version-checked source. These ranges do not prove compiler bindings, runtime calls or test coverage. `mode: "tests"` provides JS/TS/TSX related-test candidates; unsupported language operations fail explicitly. Use ordinary search and `inspect` for Swift source.

The readable result keeps the main evidence compact. Per-item ranges, counts, coverage and continuation requests remain in structured `details`, so a client can use the structured fields without requiring a second search.

Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ Concept 或 hybrid 较慢时,会在默认五秒等待窗口内返回 `status:
完整快照表示匹配保留完整,不代表源码正文没有截断。长行摘录会明确标记限制,并给出最后一页之后仍可执行的 `inspectRequest`。需要更多结果时沿游标继续,不要仅为翻页而修改 limit 重搜。
Pi 和 OMP 的被动 session 状态会显示当前加载的包版本,统计已返回的新查询,区分完整、部分和未完成结果,并报告未取消的失败调用。cursor 与 operation 续接不会重复计入新查询。

普通搜索继续遵循仓库 ignore 规则,但只要存在被忽略文件,就会明确说明文件系统覆盖受策略过滤,不再把“接纳文件里没找到”说成“整个目录绝对不存在”。需要发布前收口时,可以用 `mode: "audit"` 配合带名字的字面量 `patterns`,一次拿到声明范围、枚举/搜索/跳过文件、ignore 策略、每个模式的 `present`、`absent_with_complete_coverage` 或 `unknown` 结论,以及搜索前后的来源稳定性。审计必须包含被忽略的配置或生成文件时,设置 `ignorePolicy: "include"`;`.git` 内部和受保护路径仍然不会开放。
普通搜索继续遵循仓库 ignore 规则,但只要存在被忽略文件,就会明确说明文件系统覆盖受策略过滤,不再把“接纳文件里没找到”说成“整个目录绝对不存在”。文件名发现(`mode: "files"`)同样会说明有多少文件被忽略、其中哪些匹配查询,`ignorePolicy: "include"` 可以把它们列出来;每个候选都显示分数以及是精确、子串还是模糊匹配。需要发布前收口时,可以用 `mode: "audit"` 配合带名字的字面量 `patterns`,一次拿到声明范围、枚举/搜索/跳过文件、ignore 策略、每个模式的 `present`、`absent_with_complete_coverage` 或 `unknown` 结论,以及搜索前后的来源稳定性。审计必须包含被忽略的配置或生成文件时,设置 `ignorePolicy: "include"`;`.git` 内部和受保护路径仍然不会开放。

### 先发现语言能力,再按需加载提供方

使用 `mode: "capabilities"` 和项目根目录,可以获取紧凑的文件语言清单。JavaScript、TypeScript 和 TSX 支持 AST 结构、角色、outline、静态 imports 和关联测试候选;Go 支持 AST 结构和角色;Python 支持基于缩进的有界 outline。Swift 和其他语言仍可使用普通内容搜索、文件发现和源码 inspect。能力清单不会启动 parser 或 Concept 模型。
使用 `mode: "capabilities"` 和项目根目录,可以获取紧凑的文件语言清单。JavaScript、TypeScript 和 TSX 支持 AST 结构、角色、outline、静态 imports 和关联测试候选;Go 支持 AST 结构和角色;Python 支持基于缩进的有界 outline 和词法角色(注释、字符串、代码、声明、导入和调用候选)。Swift 和其他语言仍可使用普通内容搜索、文件发现和源码 inspect。能力清单不会启动 parser 或 Concept 模型。

语言服务导航不在范围内。请求 `definitions`、`references`、`implementations`、`callers`、`callees`、`dependencies`、`dependents`、`trace` 或 `impact` 都会明确报错——用文本搜索伪装精确导航,比直接说清楚更糟。使用期间不会启动任何语言服务。

Expand All @@ -69,7 +69,7 @@ Pi 和 OMP 的被动 session 状态会显示当前加载的包版本,统计已

工作区搜索支持用 Unix 毫秒时间戳传入 `modifiedAfter` 和 `modifiedBefore`。下界包含、上界不包含,因此可以准确表示一个时间窗口,不必改动搜索关键词。内容搜索和文件名搜索使用同一过滤条件;无法核验文件元数据时会明确报告证据不完整,不会静默当作命中。

对具体的 JS/TS/TSX 或 Python 文件使用 `mode: "outline"`,可以查看有界符号范围。JS/TS/TSX 使用 ast-grep,Python 使用基于缩进的类、函数和方法范围;它们不证明编译器绑定、运行时调用或测试覆盖。`mode: "tests"` 提供 JS/TS/TSX 关联测试候选,不支持的语言操作会明确报错。Swift 源码可使用普通搜索和 `inspect`。
对具体的 JS/TS/TSX 或 Python 文件使用 `mode: "outline"`,可以查看有界符号范围。JS/TS/TSX 使用 ast-grep,Python 使用基于缩进的类、函数和方法范围;对 outline 条目执行 inspect 会返回该符号经版本校验的源码。它们不证明编译器绑定、运行时调用或测试覆盖。`mode: "tests"` 提供 JS/TS/TSX 关联测试候选,不支持的语言操作会明确报错。Swift 源码可使用普通搜索和 `inspect`。

可读正文会保持精简;每项证据的范围、计数、覆盖状态和继续请求仍保留在结构化 `details` 中,客户端无需为了拿到这些字段再次搜索。

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sift-light",
"version": "1.0.1",
"version": "1.0.2",
"description": "Context-efficient local search for files, documents, notes and logs across Pi, OMP and MCP clients",
"keywords": [
"ai-agent",
Expand Down
2 changes: 1 addition & 1 deletion plugins/sift-light/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sift-light",
"version": "1.0.1",
"version": "1.0.2",
"description": "Require sift-light for conventional local searches while keeping development tools available.",
"author": {
"name": "baoer"
Expand Down
2 changes: 1 addition & 1 deletion plugins/sift-light/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sift-light",
"version": "1.0.1",
"version": "1.0.2",
"description": "Require sift-light for conventional local searches while keeping development tools available.",
"author": {
"name": "baoer"
Expand Down
2 changes: 1 addition & 1 deletion plugins/sift-light/.mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"args": [
"--yes",
"--package",
"sift-light-runtime@npm:sift-light@1.0.1",
"sift-light-runtime@npm:sift-light@1.0.2",
"sift-light-mcp",
"--stdio"
],
Expand Down
4 changes: 2 additions & 2 deletions plugins/sift-light/kimi.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sift-light",
"version": "1.0.1",
"version": "1.0.2",
"description": "Require sift-light for conventional local searches while keeping development tools available.",
"author": {
"name": "baoer"
Expand All @@ -13,7 +13,7 @@
"args": [
"--yes",
"--package",
"sift-light-runtime@npm:sift-light@1.0.1",
"sift-light-runtime@npm:sift-light@1.0.2",
"sift-light-mcp",
"--stdio"
],
Expand Down
Loading
Loading