okf 1.12.0 → 1.13.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +101 -0
- data/README.md +73 -464
- data/lib/okf/bundle/folder.rb +21 -2
- data/lib/okf/bundle/reader.rb +39 -16
- data/lib/okf/bundle.rb +19 -4
- data/lib/okf/cli/catalog.rb +1 -1
- data/lib/okf/cli/command.rb +68 -13
- data/lib/okf/cli/dirs.rb +1 -1
- data/lib/okf/cli/files.rb +1 -1
- data/lib/okf/cli/index.rb +2 -2
- data/lib/okf/cli/search.rb +21 -7
- data/lib/okf/cli/tags.rb +1 -1
- data/lib/okf/concept/file.rb +17 -2
- data/lib/okf/path.rb +17 -3
- data/lib/okf/safe_read.rb +50 -0
- data/lib/okf/skill/reference/cli.md +5 -2
- data/lib/okf/version.rb +1 -1
- data/lib/okf.rb +1 -0
- metadata +3 -3
- data/CODE_OF_CONDUCT.md +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 84ee2cefa8e04f2358c9125ca00ccdf9de8a12ab0a78a96315ec846bab8d3e87
|
|
4
|
+
data.tar.gz: 7a3186c5aa2924b4425a0c0a86c9f0812948427348d4fd3d0cd46852bd6dc575
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0c9f1002b408702c74f73be001eab10b6691419700d33b41e81bd001d21858f1d79289696edbb2ad6e7c6f4a76ccd4c7458cf211e82fded5224f5fcfa6328b4
|
|
7
|
+
data.tar.gz: 0ed68e0095ab1aa912c5df3b6fd7b9f82e0e07f2cad0c182437cb70021beed8d5ecb054106185204b18d0f138303372bc62202c286aec75ce6c4a43434f2e546
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,105 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.13.0] - 2026-08-07
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`Bundle#directories`** — the bundle's own answer to "does this bundle have
|
|
13
|
+
directory X?", public because every surface now asks it (the CLI's concept
|
|
14
|
+
views, `okf-mcp`'s `dir` refusal) and the API this version's minor bump
|
|
15
|
+
exists for. Introduced by, and argued in, the `root` fix under Fixed below.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **The repository became a monorepo, and the gem moved into `okf/`.** Nothing
|
|
20
|
+
about the published gem changes in kind — same name, same library, same `v*` tag
|
|
21
|
+
series, same image, byte-identical in size to a pre-move build — but a checkout is laid out differently: one
|
|
22
|
+
directory per gem, named for the gem it ships, so `okf-mcp/` and the rest can
|
|
23
|
+
land beside the baseline without reshaping anything. `plugin/`,
|
|
24
|
+
`.claude-plugin/`, `.okf/` and the `Dockerfile` stay at the root; the last of
|
|
25
|
+
those because its build context must be the repo root, where the `.git` the
|
|
26
|
+
gemspec's `git ls-files` needs lives. From a checkout it is `cd okf` for
|
|
27
|
+
everything about the gem, and plain `rake` at the root to run every gem's suite
|
|
28
|
+
or to validate this repo's own bundle.
|
|
29
|
+
- **`CODE_OF_CONDUCT.md` no longer ships in the gem** (70 files, from 71). It is
|
|
30
|
+
a repository document and was packaged only because nothing rejected it. The
|
|
31
|
+
gem now carries **its own README** instead of the project's — which also fixes
|
|
32
|
+
a long-standing wart, since the project README opens with images under
|
|
33
|
+
`.github/` that the gemspec has never packaged, so the page on rubygems.org has
|
|
34
|
+
been rendering a broken hero.
|
|
35
|
+
- `changelog_uri` points at `okf/CHANGELOG.md`, where this file now lives.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- **A directory really named `root` is nameable again.** `--dir` and `--area`
|
|
40
|
+
accept `root` as a spelling of the bundle root, which is worth a shell quote
|
|
41
|
+
right up until a bundle actually has a `root/` directory — and then the alias
|
|
42
|
+
made it unaddressable, answering for the bundle root instead: the wrong
|
|
43
|
+
concepts, exit 0, nothing said. The alias now yields to a real directory,
|
|
44
|
+
since a convenience is worth less than a directory being reachable at all;
|
|
45
|
+
where no such directory exists nothing changes, which is every bundle that
|
|
46
|
+
has ever relied on the spelling. `okf dirs` carried the same fold into its
|
|
47
|
+
`subtree` column, where it computed the `root` row's subtree against the
|
|
48
|
+
bundle root — so the number on the row disagreed with what `--dir` on that
|
|
49
|
+
row returns, the one thing it promises never to do.
|
|
50
|
+
|
|
51
|
+
"Does this bundle have a `root` directory?" is now asked of the bundle
|
|
52
|
+
(`Bundle#directories`, under Added above) rather than of whichever list a view
|
|
53
|
+
had to hand. The concept views were reading it off the *catalog*, which knows
|
|
54
|
+
only directories holding concepts, so a `root/` carrying nothing but an
|
|
55
|
+
`index.md` stayed folded in `catalog`/`files`/`tags`/`types`/`search` while
|
|
56
|
+
`dirs` and `index` named it correctly — two answers to one question about one
|
|
57
|
+
bundle. And a multi-bundle `okf search @a @b --dir root` resolved per bundle
|
|
58
|
+
inside the loop, so one flag meant the `root/` subtree in the bundle that has
|
|
59
|
+
one and the bundle root in the bundle that does not, merged into a single
|
|
60
|
+
ranking with nothing in the output saying so; the served set resolves it once.
|
|
61
|
+
|
|
62
|
+
`Bundle#directories` counts every file kind that makes a directory real —
|
|
63
|
+
concepts, an `index.md`, and now a scoped `log.md`, which the first cut left
|
|
64
|
+
out: a `root/` holding only its history was invisible to the set, so the
|
|
65
|
+
alias won again for exactly the shape the fix was named after, one file kind
|
|
66
|
+
over. The same seed feeds `directory_index`, so `dirs`, `index` and `stats`
|
|
67
|
+
count a log-only directory too, and every surface answers "does this bundle
|
|
68
|
+
have directory X?" from one list.
|
|
69
|
+
- **`filter_entries` regained its 1.12.0 arity.** The dirs-source fix above
|
|
70
|
+
added a required third parameter to a helper on `CLI::Command` — the base
|
|
71
|
+
every verb inherits, plugin gems' verbs included — so an out-of-tree verb
|
|
72
|
+
calling the released two-argument shape raised `ArgumentError` at runtime.
|
|
73
|
+
The parameter defaults now, and the default is 1.12.0's resolution — the
|
|
74
|
+
helper is handed rows, not the folder, so it has nothing to resolve a real
|
|
75
|
+
`root/` against, and the `root` alias folds exactly as it did; the plugin
|
|
76
|
+
suite drives a 1.12.0-era verb through the two-argument shape to pin it.
|
|
77
|
+
Its sibling `filter_ids` makes the opposite choice on purpose: it *is*
|
|
78
|
+
handed the folder, and its two-argument shape resolves through `dir_scope`,
|
|
79
|
+
because the unconditional fold there was the bug this entry fixes, not a
|
|
80
|
+
contract — an old caller gets the corrected answer rather than the familiar
|
|
81
|
+
wrong one. In-tree callers pass
|
|
82
|
+
the set through `dir_scope`, which also derives it only when a `--dir` or
|
|
83
|
+
`--area` flag will actually consult it — a plain listing no longer pays a
|
|
84
|
+
per-path ancestor walk for a set nothing reads (and `Bundle#directories` is
|
|
85
|
+
memoized, so the verbs that ask twice pay once).
|
|
86
|
+
- **Coverage stopped measuring the plugin's curation hook** for one commit, and
|
|
87
|
+
said so by going *up*: SimpleCov's root defaults to the working directory, so
|
|
88
|
+
moving the gem down a level dropped ~100 tested lines out of the report and
|
|
89
|
+
line coverage read 98.63% against 98.47%. Its root is the repository now, with
|
|
90
|
+
the report still written inside the gem.
|
|
91
|
+
|
|
92
|
+
### Security
|
|
93
|
+
|
|
94
|
+
- **A symlinked file in a bundle can no longer read past the bundle root.** The
|
|
95
|
+
traversal guard `Path.join_under!` was lexical — it expands the path string,
|
|
96
|
+
and `File.expand_path` does not resolve a symlink — so a link whose name sat
|
|
97
|
+
inside the root but whose target did not passed the check, and the read
|
|
98
|
+
followed it. Every read now realpath-resolves and re-checks against the real
|
|
99
|
+
root: `Path.under?` is the shared pure predicate, `Bundle::Reader` quarantines
|
|
100
|
+
an escaping file into the unparseable bucket (a planted symlink is one bad
|
|
101
|
+
file, not grounds to fail the whole bundle read, which would hand any writer of
|
|
102
|
+
a served directory a denial of service), and `Concept::File` guards its own
|
|
103
|
+
read. A symlink that stays inside the bundle still resolves as before. The gap
|
|
104
|
+
reached every reader; serving a bundle's contents to an agent — as `okf-mcp`
|
|
105
|
+
does — is what surfaced it.
|
|
106
|
+
|
|
8
107
|
## [1.12.0] - 2026-07-24
|
|
9
108
|
|
|
10
109
|
### Added
|
|
@@ -1223,6 +1322,8 @@ Initial release.
|
|
|
1223
1322
|
|
|
1224
1323
|
- Runs on Ruby >= 2.4 with two runtime dependencies: rack and webrick.
|
|
1225
1324
|
|
|
1325
|
+
[1.13.0]: https://github.com/serradura/okf-gem/compare/v1.12.0...v1.13.0
|
|
1326
|
+
[1.12.0]: https://github.com/serradura/okf-gem/compare/v1.11.0...v1.12.0
|
|
1226
1327
|
[1.11.0]: https://github.com/serradura/okf-gem/compare/v1.10.0...v1.11.0
|
|
1227
1328
|
[1.10.0]: https://github.com/serradura/okf-gem/compare/v1.9.0...v1.10.0
|
|
1228
1329
|
[1.9.0]: https://github.com/serradura/okf-gem/compare/v1.8.0...v1.9.0
|