Engine seams: serializer undefined fix (#4), canonical stewards format (#1), wiki plumbing (#3 draft) (#45)
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* release: v1.2.0 — vault registry, status lifecycle, bare-slug fixes (#36)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: manage the superseded status of the document (#25)
* feat(engine,cli,mcp): 5-state status lifecycle + alias normalization (#27)
* feat: Update status lifecycle
* fix: address claude commnets
* feat: agent-tool autopicker for ctx init + CI pipeline (#28)
* add to claude md
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* tests
* pushed ci
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update pnpm-lock.yaml
* add fixes for tsets
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Add CLI + MCP regression test suites (#29)
* add to claude md
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* tests
* pushed ci
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update pnpm-lock.yaml
* add fixes for tsets
* push changes
* Update regression-cli.test.ts
* Bring CLI and MCP regression suites to parity
CLI: add create/update edge cases (duplicate-add guard, rejected-doc edit
guard, unknown-status → draft fallback, status-alias normalization on disk).
MCP: add OR/NOT selector operators (fresh unlinked vault to avoid graph
backlink contamination), a tamper → valid:false integrity-failure test, and
an end-to-end create→drift→stage→approve governance flow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: update the cli regression test cases
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* fix: manage error handler (#33)
* fix: added include-draft option in query (#34)
* Fix/verify integrity keyframe tamper (#31)
* add to claude md
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* tests
* pushed ci
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update pnpm-lock.yaml
* add fixes for tsets
* push changes
* Update regression-cli.test.ts
* Bring CLI and MCP regression suites to parity
CLI: add create/update edge cases (duplicate-add guard, rejected-doc edit
guard, unknown-status → draft fallback, status-alias normalization on disk).
MCP: add OR/NOT selector operators (fresh unlinked vault to avoid graph
backlink contamination), a tamper → valid:false integrity-failure test, and
an end-to-end create→drift→stage→approve governance flow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix with tests
* add tests
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* feat: central vault registry with --vault aliases + cross-platform CI (#30)
* add to claude md
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* tests
* pushed ci
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update pnpm-lock.yaml
* add fixes for tsets
* feat(cli,engine,mcp): central vault registry with --vault aliases
Add a central registry (~/.contextnest/config.yaml) mapping short aliases to
vault paths so the CLI and MCP server can target any vault from any directory
(AWS-profile style). Resolution precedence: --vault flag > CONTEXTNEST_VAULT
(alias) > CONTEXTNEST_VAULT_PATH (path) > local walk-up > registry default > cwd.
- engine: new registry.ts (read/write/add/remove/setDefault/list/resolveVaultPath)
- cli: global --vault selector, `ctx vault list|add|remove|default|which`,
`ctx init --vault <alias>` registration
- mcp-server: resolve via registry (alias or path)
- cross-platform CI matrix (ubuntu/windows/macos, Node 20/22)
- docs + tests
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* push changes
* Update regression-cli.test.ts
* fix(registry): address review feedback on vault registry
- registry: validate alias format ([A-Za-z0-9_-]+); reject spaces/slashes
- registry: atomic writeRegistry (temp file + rename) to avoid corruption
- registry: avoid double readRegistry in resolveVaultPath default branch
- cli: init uses selectedVaultAlias (consistent with other commands)
- cli: clarify `vault add` default-path description
- tests: cover unknown --vault alias error + alias-format validation
Windows CI fix (agent-tools HOME/USERPROFILE) and the test:regression
CLI build came in via the development merge.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): harden vault resolution per second review
- mcp-server: catch module-level resolution errors → clean stderr + exit(1)
instead of a raw stack trace when CONTEXTNEST_VAULT is a bad alias (#1)
- registry: stale default alias no longer throws — soft-falls through to cwd so
a deleted/moved default vault can't lock the user out of every command (#3)
- cli: `ctx init --vault <alias>` no longer silently overwrites an alias that
points to a different vault; warns and suggests `vault add --force` (#2)
- registry: writeRegistry handles Windows rename EPERM (copy+unlink fallback)
and creates the dir/file owner-only (0700/0600) (#4, #5)
- cli: `ctx vault add` resolves the default path inside try/catch so a stale
CONTEXTNEST_VAULT yields a clear error (#6)
- mcp-server: resolve positional arg in one shot (no probe → no TOCTOU) (#7)
- cli: show "(default)" based on the resulting registry, not just --set-default,
so the first auto-defaulted vault is indicated (#8)
- tests: stale-default soft-fallback coverage
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): third-review fixes — test isolation, stale-alias surfacing
- test: regression-cli.test.ts now sandboxes CONTEXTNEST_CONFIG_DIR (per-suite
temp dir, cleaned in afterAll) + clears CONTEXTNEST_VAULT/_PATH, so spawned
`ctx init` auto-registration no longer pollutes the real ~/.contextnest (HIGH)
- mcp-server: positional-arg catch now only swallows "Unknown vault alias"
(treat as raw path); a registered-but-stale alias re-throws → clean error
instead of silently using the alias string as a path (MEDIUM)
- cli: `ctx vault remove` warns when it drops the default vault (LOW)
- registry: Windows write-fallback error now reports the copyFileSync failure,
not the original renameSync error (minor)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): fourth-review fixes — env resilience + shared constants
- engine: add UnknownAliasError (subtype of ConfigError) so callers discriminate
"unknown alias" from "stale alias" without string matching (#2)
- engine: stale/unknown CONTEXTNEST_VAULT no longer throws — falls through with a
warning (same resilience as the registry default); resolveVaultPath returns an
optional `warning` the CLI/MCP print to stderr (#1)
- engine: addVault auto-promotes to default only for a brand-new first entry, not
on a --force overwrite when default is unset (#3)
- engine: export ALIAS_PATTERN as the single source of truth (#4)
- engine: writeRegistry rethrows non-EPERM Unix rename errors instead of masking
them with a copy fallback (minor)
- cli: import ALIAS_PATTERN; defaultAliasFor + vault remove use readRegistry to
avoid per-vault stat/read I/O (#5, minor); print resolve warnings to stderr
- mcp-server: discriminate via `instanceof UnknownAliasError`; print warnings
- tests: soft env-alias fallback + no-promote-on-overwrite coverage
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(cli): grouped root help; harden vault registry path handling
- Add a grouped, example-led `ctx --help` screen scoped to the root
command; subcommands keep Commander's default rendering.
- Use readRegistry() directly for alias-ownership checks to avoid
stat+read of every registered vault.
- Reject non-absolute vault paths in addVault (resolve differently per cwd).
- Clean up the atomic-write temp file on every path via finally.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): sixth-review fixes — centralize MCP precedence, quiet warnings
- engine: resolveVaultPath now owns the full MCP precedence via a new `argPath`
option (env-alias → env-path → arg → local → default → cwd). A stale
CONTEXTNEST_VAULT no longer hides the positional arg (#2); a typo'd arg (not an
alias, not an absolute path) throws a clear error instead of becoming a bogus
relative path (#3).
- engine: the stale-env advisory is surfaced ONLY at the final cwd fallback, not
when a concrete vault (env-path/arg/local/default) resolves — no per-command
nag (#1).
- engine: CONTEXTNEST_VAULT_PATH is validated as a vault root like every other
source; a stale/mistyped path warns and falls through (#4).
- engine: registry schema validates alias keys against ALIAS_PATTERN so a
hand-edited bad key can't be used via CONTEXTNEST_VAULT (#5).
- engine: removeVault returns { registry, wasDefault } — CLI drops its pre-read,
closing a tiny TOCTOU window (#6).
- cli: ctx init reads the registry once, shared by defaultAliasFor + the
ownership check (#7).
- mcp-server: collapses to resolveVaultPath({ argPath: argv[2] }); precedence and
the typo/stale guards now live in the engine.
- tests: argPath alias/abs-path/typo, stale-env arg, env-path validation,
warning-only-at-cwd.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): seventh-review fixes — explicit-arg errors, warning visibility
- engine: an explicit MCP positional arg that doesn't resolve to a real vault now
throws (stale alias, non-abs non-alias typo, AND absolute non-vault path) rather
than silently falling through to the registry default (#1)
- engine: resolveVaultPath carries the stale-env advisory on every fallback
(local/default/cwd); print policy lives at the call site (#3)
- cli: `ctx vault which` always prints the advisory (diagnostic command); normal
commands print it except for a local resolution (#2, #3)
- engine: UnknownAliasError now has code "UNKNOWN_ALIAS" (#4)
- engine: writeFileSync moved inside the try so the finally cleans up a temp file
left by a failed write (#5)
- cli: `ctx vault add <alias>` with no path uses findLocalVault(cwd), not
getVaultRoot() — never registers the CONTEXTNEST_VAULT target by mistake (#6)
- cli: ctx init defers alias registration until after the starter is applied, so
an interruption can't leave an alias pointing at a half-populated vault (#7)
- engine: writeRegistry removed from the public barrel (callers use
addVault/removeVault/setDefaultVault) (#8)
- test: raise CLI testTimeout (30s) and regression timeout (60s) — subprocess-
spawning suites were flaking under parallel load / on slower Windows runners
- tests: explicit-arg throw cases + warning-carried-on-fallback coverage
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(engine,cli): discover root-level nodes; add coverage tooling
- storage: include root-level *.md in structured-layout discovery so a
node is found wherever it lives; ignore CLAUDE/GEMINI/AGENTS/README
agent-config and scaffold files
- cli: default bare `add` slugs into nodes/ while respecting explicit
folder paths
- add vitest v8 coverage config + `coverage` script; gitignore output
- add graph-query-engine and selector-index-evaluator tests; extend
regression suites
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(engine): narrow trace union in graph-query-engine test
result.traces is TraceEntry[] (AccessTrace | SourceHydrationTrace);
document_ref only exists on AccessTrace, so accessing it on the union
failed `tsc --noEmit` in CI. Narrow on the trace_type discriminant,
which also strengthens the assertion to verify the trace type.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore: untrack agent-memory and relativize reviewer memory path
Add .claude/agent-memory/* to .gitignore and remove the previously
tracked staff-architect-reviewer memory files; make the memory path in
the agent definition relative instead of hardcoded to a worktree.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor(engine): extract normalizeDocumentId as shared id normalization
Centralize bare-slug → nodes/ defaulting in the engine so CLI and MCP
create documents at the same canonical id. Replaces the inline logic in
the CLI add command and aligns the MCP create_document tool with it.
- engine: add and export normalizeDocumentId from storage
- cli: use normalizeDocumentId in `add`
- mcp-server: use normalizeDocumentId in create_document
- add normalize-document-id tests
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(engine,cli,mcp): make bare-slug docs reachable; harden root discovery
The vault-registry PR bundled two refactors — root-level node discovery
and the normalizeDocumentId extraction — that introduced regressions for
existing users. This fixes them and de-duplicates the CLI regression suite.
Blocker — bare slug unreachable after create (CLI + MCP):
`add`/`create_document` normalized a bare slug into nodes/, but read,
publish, update, delete, history, validate, reconstruct, and the MCP
read/update/delete/publish tools still resolved it at the vault root, so
a doc created by slug was unreachable by that same slug. Route every
path->id conversion through normalizeDocumentId so all surfaces agree.
readDocument now falls back to the vault root for a nodes/<slug> id, so a
node that legitimately lives at the root stays readable by its slug.
Root-level discovery: require frontmatter before treating a root *.md as
a node (structured layout only), so scaffold files (CHANGELOG, CONTRIBUTING,
LICENSE, ...) are no longer silently ingested into list/search/validate.
MCP relative-path arg: restore backward compat — `contextnest-mcp ./vault`
resolves against cwd again instead of throwing; a typo still errors cleanly.
Test registry pollution: sandbox CONTEXTNEST_CONFIG_DIR in the three CLI
test files that spawn `ctx init` (cli.regression, status-cli, init-cwd) so
`pnpm test` / `pnpm test:regression` no longer write throwaway aliases into
the developer's real ~/.contextnest/config.yaml.
Consolidate the two near-duplicate CLI regression suites into one
(cli.regression.test.ts, gated behind a build via test:regression); delete
regression-cli.test.ts after porting its one unique test.
Tests: new root-level-discovery suite (read fallback, frontmatter gate),
a relative-arg registry case, and a bare-slug add->read->publish regression.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* fix: normalize space-separated --tags input in ctx add and ctx update (#35)
Split tags on /[,\s]+/ so both space-separated ("#cmd #analyze") and
comma-separated ("#cmd,#analyze") inputs produce discrete, valid tags
that are queryable. Fixes silent malformed tag storage and broken
tag-based queries when using the natural space-separated format.
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: QaziKilla <QaziKilla@users.noreply.github.com>
* chore(release): version packages to 1.2.0
Apply changesets for the 1.2.0 release across all three packages:
- @promptowl/contextnest-engine 1.1.1 -> 1.2.0 (minor)
- @promptowl/contextnest-cli 1.1.1 -> 1.2.0 (minor)
- @promptowl/contextnest-mcp-server 1.1.1 -> 1.2.0 (minor)
Headline changes: central vault registry with --vault aliases, the
document status lifecycle (draft/pending_review/approved/published/
rejected) with alias normalization, bare-slug reachability across CLI
and MCP, frontmatter-gated root-level discovery, and space-separated
--tags normalization. Each package CHANGELOG carries only its own notes
(combined status-lifecycle changeset split per package).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(engine): address release review — path traversal, status default, read split
Apply the must-fix findings from the v1.2.0 review:
- Reject `..` path-traversal segments in normalizeDocumentId (the single
choke point every CLI/MCP path conversion uses), so a manipulated path
can no longer escape the vault root for read/write/delete.
- Normalize a missing `status` field to `draft` at parse time so a doc
with no status is no longer shown in listings yet hidden from
query/resolve. Adjust the root-discovery scaffold gate to ignore the
now-always-injected status key.
- Remove the readDocument root fallback: read exactly `${id}.md` so an
update_document can never silently split a node into a second file.
Root-level nodes remain discoverable via list/search.
Findings deferred as design/semantics decisions (not bugs): update_document
draft body handling, list_documents review-queue visibility, query/resolve
steward access. Pre-existing `ctx add` overwrite wart left as a follow-up.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: QaziKilla <9102875+QaziKilla@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: QaziKilla <QaziKilla@users.noreply.github.com>
* release: v1.2.1 — checkpoint-integrity hardening + MCP SDK bump (#44)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: manage the superseded status of the document (#25)
* feat(engine,cli,mcp): 5-state status lifecycle + alias normalization (#27)
* feat: Update status lifecycle
* fix: address claude commnets
* feat: agent-tool autopicker for ctx init + CI pipeline (#28)
* add to claude md
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* tests
* pushed ci
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update pnpm-lock.yaml
* add fixes for tsets
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Add CLI + MCP regression test suites (#29)
* add to claude md
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* tests
* pushed ci
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update pnpm-lock.yaml
* add fixes for tsets
* push changes
* Update regression-cli.test.ts
* Bring CLI and MCP regression suites to parity
CLI: add create/update edge cases (duplicate-add guard, rejected-doc edit
guard, unknown-status → draft fallback, status-alias normalization on disk).
MCP: add OR/NOT selector operators (fresh unlinked vault to avoid graph
backlink contamination), a tamper → valid:false integrity-failure test, and
an end-to-end create→drift→stage→approve governance flow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: update the cli regression test cases
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* fix: manage error handler (#33)
* fix: added include-draft option in query (#34)
* Fix/verify integrity keyframe tamper (#31)
* add to claude md
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* tests
* pushed ci
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update pnpm-lock.yaml
* add fixes for tsets
* push changes
* Update regression-cli.test.ts
* Bring CLI and MCP regression suites to parity
CLI: add create/update edge cases (duplicate-add guard, rejected-doc edit
guard, unknown-status → draft fallback, status-alias normalization on disk).
MCP: add OR/NOT selector operators (fresh unlinked vault to avoid graph
backlink contamination), a tamper → valid:false integrity-failure test, and
an end-to-end create→drift→stage→approve governance flow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix with tests
* add tests
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* feat: central vault registry with --vault aliases + cross-platform CI (#30)
* add to claude md
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* tests
* pushed ci
* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Update pnpm-lock.yaml
* add fixes for tsets
* feat(cli,engine,mcp): central vault registry with --vault aliases
Add a central registry (~/.contextnest/config.yaml) mapping short aliases to
vault paths so the CLI and MCP server can target any vault from any directory
(AWS-profile style). Resolution precedence: --vault flag > CONTEXTNEST_VAULT
(alias) > CONTEXTNEST_VAULT_PATH (path) > local walk-up > registry default > cwd.
- engine: new registry.ts (read/write/add/remove/setDefault/list/resolveVaultPath)
- cli: global --vault selector, `ctx vault list|add|remove|default|which`,
`ctx init --vault <alias>` registration
- mcp-server: resolve via registry (alias or path)
- cross-platform CI matrix (ubuntu/windows/macos, Node 20/22)
- docs + tests
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* push changes
* Update regression-cli.test.ts
* fix(registry): address review feedback on vault registry
- registry: validate alias format ([A-Za-z0-9_-]+); reject spaces/slashes
- registry: atomic writeRegistry (temp file + rename) to avoid corruption
- registry: avoid double readRegistry in resolveVaultPath default branch
- cli: init uses selectedVaultAlias (consistent with other commands)
- cli: clarify `vault add` default-path description
- tests: cover unknown --vault alias error + alias-format validation
Windows CI fix (agent-tools HOME/USERPROFILE) and the test:regression
CLI build came in via the development merge.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): harden vault resolution per second review
- mcp-server: catch module-level resolution errors → clean stderr + exit(1)
instead of a raw stack trace when CONTEXTNEST_VAULT is a bad alias (#1)
- registry: stale default alias no longer throws — soft-falls through to cwd so
a deleted/moved default vault can't lock the user out of every command (#3)
- cli: `ctx init --vault <alias>` no longer silently overwrites an alias that
points to a different vault; warns and suggests `vault add --force` (#2)
- registry: writeRegistry handles Windows rename EPERM (copy+unlink fallback)
and creates the dir/file owner-only (0700/0600) (#4, #5)
- cli: `ctx vault add` resolves the default path inside try/catch so a stale
CONTEXTNEST_VAULT yields a clear error (#6)
- mcp-server: resolve positional arg in one shot (no probe → no TOCTOU) (#7)
- cli: show "(default)" based on the resulting registry, not just --set-default,
so the first auto-defaulted vault is indicated (#8)
- tests: stale-default soft-fallback coverage
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): third-review fixes — test isolation, stale-alias surfacing
- test: regression-cli.test.ts now sandboxes CONTEXTNEST_CONFIG_DIR (per-suite
temp dir, cleaned in afterAll) + clears CONTEXTNEST_VAULT/_PATH, so spawned
`ctx init` auto-registration no longer pollutes the real ~/.contextnest (HIGH)
- mcp-server: positional-arg catch now only swallows "Unknown vault alias"
(treat as raw path); a registered-but-stale alias re-throws → clean error
instead of silently using the alias string as a path (MEDIUM)
- cli: `ctx vault remove` warns when it drops the default vault (LOW)
- registry: Windows write-fallback error now reports the copyFileSync failure,
not the original renameSync error (minor)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): fourth-review fixes — env resilience + shared constants
- engine: add UnknownAliasError (subtype of ConfigError) so callers discriminate
"unknown alias" from "stale alias" without string matching (#2)
- engine: stale/unknown CONTEXTNEST_VAULT no longer throws — falls through with a
warning (same resilience as the registry default); resolveVaultPath returns an
optional `warning` the CLI/MCP print to stderr (#1)
- engine: addVault auto-promotes to default only for a brand-new first entry, not
on a --force overwrite when default is unset (#3)
- engine: export ALIAS_PATTERN as the single source of truth (#4)
- engine: writeRegistry rethrows non-EPERM Unix rename errors instead of masking
them with a copy fallback (minor)
- cli: import ALIAS_PATTERN; defaultAliasFor + vault remove use readRegistry to
avoid per-vault stat/read I/O (#5, minor); print resolve warnings to stderr
- mcp-server: discriminate via `instanceof UnknownAliasError`; print warnings
- tests: soft env-alias fallback + no-promote-on-overwrite coverage
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(cli): grouped root help; harden vault registry path handling
- Add a grouped, example-led `ctx --help` screen scoped to the root
command; subcommands keep Commander's default rendering.
- Use readRegistry() directly for alias-ownership checks to avoid
stat+read of every registered vault.
- Reject non-absolute vault paths in addVault (resolve differently per cwd).
- Clean up the atomic-write temp file on every path via finally.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): sixth-review fixes — centralize MCP precedence, quiet warnings
- engine: resolveVaultPath now owns the full MCP precedence via a new `argPath`
option (env-alias → env-path → arg → local → default → cwd). A stale
CONTEXTNEST_VAULT no longer hides the positional arg (#2); a typo'd arg (not an
alias, not an absolute path) throws a clear error instead of becoming a bogus
relative path (#3).
- engine: the stale-env advisory is surfaced ONLY at the final cwd fallback, not
when a concrete vault (env-path/arg/local/default) resolves — no per-command
nag (#1).
- engine: CONTEXTNEST_VAULT_PATH is validated as a vault root like every other
source; a stale/mistyped path warns and falls through (#4).
- engine: registry schema validates alias keys against ALIAS_PATTERN so a
hand-edited bad key can't be used via CONTEXTNEST_VAULT (#5).
- engine: removeVault returns { registry, wasDefault } — CLI drops its pre-read,
closing a tiny TOCTOU window (#6).
- cli: ctx init reads the registry once, shared by defaultAliasFor + the
ownership check (#7).
- mcp-server: collapses to resolveVaultPath({ argPath: argv[2] }); precedence and
the typo/stale guards now live in the engine.
- tests: argPath alias/abs-path/typo, stale-env arg, env-path validation,
warning-only-at-cwd.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(registry): seventh-review fixes — explicit-arg errors, warning visibility
- engine: an explicit MCP positional arg that doesn't resolve to a real vault now
throws (stale alias, non-abs non-alias typo, AND absolute non-vault path) rather
than silently falling through to the registry default (#1)
- engine: resolveVaultPath carries the stale-env advisory on every fallback
(local/default/cwd); print policy lives at the call site (#3)
- cli: `ctx vault which` always prints the advisory (diagnostic command); normal
commands print it except for a local resolution (#2, #3)
- engine: UnknownAliasError now has code "UNKNOWN_ALIAS" (#4)
- engine: writeFileSync moved inside the try so the finally cleans up a temp file
left by a failed write (#5)
- cli: `ctx vault add <alias>` with no path uses findLocalVault(cwd), not
getVaultRoot() — never registers the CONTEXTNEST_VAULT target by mistake (#6)
- cli: ctx init defers alias registration until after the starter is applied, so
an interruption can't leave an alias pointing at a half-populated vault (#7)
- engine: writeRegistry removed from the public barrel (callers use
addVault/removeVault/setDefaultVault) (#8)
- test: raise CLI testTimeout (30s) and regression timeout (60s) — subprocess-
spawning suites were flaking under parallel load / on slower Windows runners
- tests: explicit-arg throw cases + warning-carried-on-fallback coverage
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(engine,cli): discover root-level nodes; add coverage tooling
- storage: include root-level *.md in structured-layout discovery so a
node is found wherever it lives; ignore CLAUDE/GEMINI/AGENTS/README
agent-config and scaffold files
- cli: default bare `add` slugs into nodes/ while respecting explicit
folder paths
- add vitest v8 coverage config + `coverage` script; gitignore output
- add graph-query-engine and selector-index-evaluator tests; extend
regression suites
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(engine): narrow trace union in graph-query-engine test
result.traces is TraceEntry[] (AccessTrace | SourceHydrationTrace);
document_ref only exists on AccessTrace, so accessing it on the union
failed `tsc --noEmit` in CI. Narrow on the trace_type discriminant,
which also strengthens the assertion to verify the trace type.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore: untrack agent-memory and relativize reviewer memory path
Add .claude/agent-memory/* to .gitignore and remove the previously
tracked staff-architect-reviewer memory files; make the memory path in
the agent definition relative instead of hardcoded to a worktree.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor(engine): extract normalizeDocumentId as shared id normalization
Centralize bare-slug → nodes/ defaulting in the engine so CLI and MCP
create documents at the same canonical id. Replaces the inline logic in
the CLI add command and aligns the MCP create_document tool with it.
- engine: add and export normalizeDocumentId from storage
- cli: use normalizeDocumentId in `add`
- mcp-server: use normalizeDocumentId in create_document
- add normalize-document-id tests
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(engine,cli,mcp): make bare-slug docs reachable; harden root discovery
The vault-registry PR bundled two refactors — root-level node discovery
and the normalizeDocumentId extraction — that introduced regressions for
existing users. This fixes them and de-duplicates the CLI regression suite.
Blocker — bare slug unreachable after create (CLI + MCP):
`add`/`create_document` normalized a bare slug into nodes/, but read,
publish, update, delete, history, validate, reconstruct, and the MCP
read/update/delete/publish tools still resolved it at the vault root, so
a doc created by slug was unreachable by that same slug. Route every
path->id conversion through normalizeDocumentId so all surfaces agree.
readDocument now falls back to the vault root for a nodes/<slug> id, so a
node that legitimately lives at the root stays readable by its slug.
Root-level discovery: require frontmatter before treating a root *.md as
a node (structured layout only), so scaffold files (CHANGELOG, CONTRIBUTING,
LICENSE, ...) are no longer silently ingested into list/search/validate.
MCP relative-path arg: restore backward compat — `contextnest-mcp ./vault`
resolves against cwd again instead of throwing; a typo still errors cleanly.
Test registry pollution: sandbox CONTEXTNEST_CONFIG_DIR in the three CLI
test files that spawn `ctx init` (cli.regression, status-cli, init-cwd) so
`pnpm test` / `pnpm test:regression` no longer write throwaway aliases into
the developer's real ~/.contextnest/config.yaml.
Consolidate the two near-duplicate CLI regression suites into one
(cli.regression.test.ts, gated behind a build via test:regression); delete
regression-cli.test.ts after porting its one unique test.
Tests: new root-level-discovery suite (read fallback, frontmatter gate),
a relative-arg registry case, and a bare-slug add->read->publish regression.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* fix: normalize space-separated --tags input in ctx add and ctx update (#35)
Split tags on /[,\s]+/ so both space-separated ("#cmd #analyze") and
comma-separated ("#cmd,#analyze") inputs produce discrete, valid tags
that are queryable. Fixes silent malformed tag storage and broken
tag-based queries when using the natural space-separated format.
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: QaziKilla <QaziKilla@users.noreply.github.com>
* chore: back-merge v1.2.0 release into development (#37)
* release: v1.1.1 — init cwd fix + crawl resilience (#24)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* fix: `ctx init` targets cwd, not an ancestor vault; harden history crawl against unreadable dirs (#21)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* fix: init targets cwd, not ancestor vault; harden history crawl
Two related fixes surfaced while debugging a `ctx init` that operated on
the wrong directory:
1. Wrong-directory resolution (CLI). `getVaultRoot()` walks up the tree to
find `.context/config.yaml` (git-style), which is correct for commands
that act on an existing vault but wrong for `ctx init`: a stray ancestor
vault (e.g. `~/.context/config.yaml`) would capture init and write to the
wrong directory. Add `getInitRoot()` (cwd, or CONTEXTNEST_VAULT_PATH) and
pin the init action to it. All other commands keep the walk-up behavior.
2. findAllHistories crash (engine). The `**/.versions/*/history.yaml` glob
ran with fast-glob's default `suppressErrors: false`, so a single
permission-denied directory under the vault root rejected the whole call
and crashed checkpoint rebuild. Add `suppressErrors: true` to that glob
and the other two root-crawling globs (discoverDocuments, readPacks).
Also add a `CONTEXTNEST_NO_BROWSER` opt-out to openInBrowser so init can be
exercised headlessly (CI/tests), plus regression tests for both fixes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* Add Claude Code GitHub Workflow (#22)
* chore(release): v1.0.0 — governance, hash chain, multi-zone security (#10)
* feat: Manage Nest Doc Hashing chain
* feat: Handle Suggestion flow in the cli
* fix: Polynomial regular expression used on uncontrolled data
* ci: added release cicd
* fix: pnpm workspace config
* fix: Added ChangeSet file
* chore: v1.0.0 ΓÇö governance, hash chain, multi-zone
* chore: v1.0.0 — governance, hash chain, multi-zone
* fix: remove vitest script
* Release: v1.1.0 (engine, cli, mcp-server) (#20)
* selector: support 'tag:#X' atom in lexer (spec alias) (#11)
* selector: support 'tag:#X' / 'tag:X' atom in lexer (spec alias)
* fix: correct gitignore
* fix: remove duplicate code
* fix: remove .env file
* fix: remove the vitest workspace Auth api key code block
---------
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* docs: Modify README.md file (#16)
* fix: update package description and keywords (#17)
* fix: update read me fil (#18)
* chore: version packages to 1.1.0
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* chore(release): version packages 1.1.1
- @promptowl/contextnest-cli 1.1.0 -> 1.1.1
- @promptowl/contextnest-engine 1.1.0 -> 1.1.1
- @promptowl/contextnest-mcp-server 1.1.0 -> 1.1.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(release): version packages to 1.2.0
Apply changesets for the 1.2.0 release across all three packages:
- @promptowl/contextnest-engine 1.1.1 -> 1.2.0 (minor)
- @promptowl/contextnest-cli 1.1.1 -> 1.2.0 (minor)
- @promptowl/contextnest-mcp-server 1.1.1 -> 1.2.0 (minor)
Headline changes: central vault registry with --vault aliases, the
document status lifecycle (draft/pending_review/approved/published/
rejected) with alias normalization, bare-slug reachability across CLI
and MCP, frontmatter-gated root-level discovery, and space-separated
--tags normalization. Each package CHANGELOG carries only its own notes
(combined status-lifecycle changeset split per package).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(engine): address release review — path traversal, status default, read split
Apply the must-fix findings from the v1.2.0 review:
- Reject `..` path-traversal segments in normalizeDocumentId (the single
choke point every CLI/MCP path conversion uses), so a manipulated path
can no longer escape the vault root for read/write/delete.
- Normalize a missing `status` field to `draft` at parse time so a doc
with no status is no longer shown in listings yet hidden from
query/resolve. Adjust the root-discovery scaffold gate to ignore the
now-always-injected status key.
- Remove the readDocument root fallback: read exactly `${id}.md` so an
update_document can never silently split a node into a second file.
Root-level nodes remain discoverable via list/search.
Findings deferred as design/semantics decisions (not bugs): update_document
draft body handling, list_documents review-queue visibility, query/resolve
steward access. Pre-existing `ctx add` overwrite wart left as a follow-up.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: harden checkpoint-chain integrity (torn seals, tamper, races, rebuild laundering) (#40)
* fix: harden checkpoint-chain integrity against torn seals, tamper, races, and rebuild laundering
Fixes four checkpoint-chain defects surfaced by new regression tests:
- createCheckpoint now seals the chain hash of the exact version it records
(looked up by version), so a torn two-phase publish snapshot can no longer
bind version N to a different version's chain hash (cross_chain_mismatch).
- verifyCheckpointChain's edited_at > cp.at recreate-skip now only applies when
the entry's chain hash is internally self-consistent, so a back-dated tamper
is reported instead of silently swallowed.
- Serialize createCheckpoint's read-modify-write of context_history.yaml via an
in-process lock on NestStorage, so concurrent publishes no longer clobber each
other and drop checkpoints (in-process only).
- rebuildCheckpointHistory now recomputes each version's chain hash and dedupes
(doc, version) instead of copying stored hashes verbatim, so the documented
section 7.3 repair converges to a verifiable chain and never re-seals a
tampered hash.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test: reproduce Finding 1 — rebuild races with createCheckpoint (missing lock)
Adds a regression test that simulates the race between
rebuildCheckpointHistory and a concurrent createCheckpoint. The test
monkey-patches writeCheckpointHistory to inject a concurrent publish
(which runs under withCheckpointLock) between rebuild's compute and
write phases, then asserts the concurrent checkpoint is preserved.
FAILS on current code — rebuild's unlocked full-overwrite clobbers
the concurrently-written checkpoint. Expected to PASS once
rebuildCheckpointHistory wraps its write in withCheckpointLock.
Co-authored-by: QaziKilla <QaziKilla@users.noreply.github.com>
* fix: guard checkpoint rebuild against concurrent createCheckpoint race
rebuildCheckpointHistory did a single read-compute-write full overwrite
of context_history.yaml. A publish committing between the read of per-doc
histories and the write was silently clobbered (lost checkpoint).
Cannot hold withCheckpointLock across the write — createCheckpoint also
takes it, so an in-flight publish would deadlock. Instead re-derive
optimistically: snapshot the published-version set, build + write, re-read.
If a concurrent publish changed the set, re-derive to fold it in.
Bounded to 5 attempts with a 25ms backoff so a publish storm cannot spin
forever. Split the pure chain replay into a private deriveCheckpointHistory
so the public entrypoint stays the only (safe) caller.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: address PR review — close publish-path checkpoint race and tidy
- publish path now seals via createCheckpointFromVault, gathering the
published-docs and histories snapshots INSIDE withCheckpointLock so a
concurrent publish cannot leave a doc missing from the checkpoint it
should seal. Split createCheckpoint into a lock wrapper + sealCheckpoint
core; the explicit-snapshot createCheckpoint API is retained for callers
and tests that intentionally seal a torn snapshot.
- withCheckpointLock: invoke fn with no args on both settle paths so a
prior rejection reason is not passed into the critical section.
- rebuildCheckpointHistory: reuse the post-write histories read as the
next retry pass input, saving one filesystem round-trip per retry.
- update two regression-test header comments: the defects are fixed, the
tests now guard against regression rather than reproduce a live bug.
The sealedVersion ?? latest fallback is kept by design: on a torn/corrupt
snapshot it seals a mismatched hash so verifyCheckpointChain reports it
loudly, which is safer than omitting the hash and passing verify silently.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: QaziKilla <QaziKilla@users.noreply.github.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com>
* feat: Claude Code plugin with vault-aware hooks and agents (#42)
* initial set up
* fix: normalize line endings so plugin tests pass on Windows CI
Windows runners check out with core.autocrlf, turning LF into CRLF. The
frontmatter/SHARED regexes in structure.test.ts and the byte comparison
in sync-plugins.mjs assumed LF, so the four plugin structural tests
failed on windows-latest only.
- Add .gitattributes forcing LF in the working tree on all platforms
- Make the structure.test.ts regexes and read() CRLF-tolerant
- Normalize CRLF in sync-plugins.mjs read() and use path.relative for
drift/written output on Windows
- Renormalize two engine files that were committed with CRLF
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* chore(deps): bump @modelcontextprotocol/sdk from 1.27.1 to 1.29.0 (#43)
Minor-version dependency update only — no code changes.
Lockfile also picks up minor/patch transitive refreshes (esbuild
0.27.3→0.27.7, rollup 4.59.0→4.62.2, postcss 8.5.13→8.5.16, etc.)
and was deduped so each transitive dep resolves to a single version.
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* release: v1.2.1 — checkpoint-integrity hardening + mcp sdk bump
- engine 1.2.1: harden checkpoint-chain integrity (torn seals, tamper, races, rebuild laundering)
- mcp-server 1.2.1: bump @modelcontextprotocol/sdk to ^1.29.0
- cli 1.2.1: pick up engine 1.2.1 (no behavior change)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: misha sulpovar <mishamake@gmail.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: QaziKilla <9102875+QaziKilla@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: QaziKilla <QaziKilla@users.noreply.github.com>
* fix(engine): serializeDocument must not throw on undefined frontmatter values
matter.stringify (js-yaml) threw "unacceptable kind of an object to dump
[object Undefined]" on any frontmatter key with an undefined value. Those
values come from the engine's own parser — normalizeTags([]) returns
undefined, which parseDocument writes back into frontmatter.tags — so a doc
authored with `tags: []` crashed on the parse→serialize roundtrip.
Strip undefined-valued keys before dumping (roundtrip-safe: an absent key and
an undefined value parse identically). This lets the community server drop its
safePublishDocument workaround. Seam #4 of the engine↔community separation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(engine): canonical stewards.yaml parse/serialize
Add parseStewards / serializeStewards / STEWARDS_FILENAMES + StewardsConfig
types. The stewards.yaml format is defined in the Apache-2.0 spec; this makes
the engine the single home for its marshalling so the community server
(stewards-parser.ts) and TheOwl (deserializeStewards) consume one impl instead
of three hand-rolled ports.
Format only: tolerant parse (js-yaml; data_room alias, folders + legacy
can_approve/can_reject keys ignored, empty groups dropped) + roundtrip-safe
serialize (quotes #-prefixed tag keys). Stewardship ENFORCEMENT — scope
resolution, access decisions, approvals — deliberately stays with the
consumer. Seam #1 of the engine↔community separation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(engine): wiki-link seed resolution + ungated graph traversal (draft)
Add extractWikiLinks / buildWikiTitleIndex / resolveWikiSeeds /
traverseWikiGraph — pure primitives that move the community server's
hand-rolled [[Title]] resolution + hop-BFS (query-routes) into the engine.
DELIBERATELY UNGATED: traversal returns the full neighborhood with no
draft/status/permission filtering. The eligibility gate is the commercial
governed-retrieval method and STAYS with the consumer, which gates before
seeding and/or after traversal. Pure functions (no storage/status reads) so
loading + gating remain on the consumer. Seam #3 (plumbing half).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: changeset for engine seams (minor) — unblocks 1.3.0 publish
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(engine): harden wiki-link regexes against polynomial ReDoS (CodeQL)
extractWikiLinks + resolveTarget used `[^\]]+?`, which CodeQL flags as a
polynomial-runtime pattern on adversarial input (`[[` + many `[[\`) — and
wiki-graph runs on uncontrolled document bodies. Exclude `[` from the inner
class (`[^[\]]+`, greedy) so it can't backtrack across overlapping `[[`.
Linear; behavior unchanged (wiki targets never contain brackets). Tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(engine): parseStewards never throws + tolerates legacy comma-joined shorthand
The previous hand-rolled community parser tolerated single-line entries like
`- email: a@b.com, role: admin, can_approve: true`. js-yaml rejects that with a
throw — and parseStewards didn't catch it, so a customer stewards.yaml in the old
shorthand would throw an unhandled exception through loadStewardsConfig (→ 500 on
stewards sync). Caught by the PR review bot.
- wrap yamlLoad in try/catch; on failure fall back to a lenient line parser that
extracts email + role regardless of layout (and treats only a column-0 `#` as a
comment, so indented `#tag:` scope keys survive).
- stop dropping non-canonical role strings — validating role names is enforcement
(the consumer's job); dropping them here was a silent permissions regression.
Verified: engine stewards suite 11/11, and the community governance + parser
fixtures (which use the shorthand) now pass 46/46 against this engine build.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(engine): harden stewards serialize/parse + document seam edge cases
Review follow-ups on the engine seams (no breaking changes, all additive):
- serializeStewards omits keys with empty entry-lists ({ tags: { "#x": [] } }),
symmetric with parseStewards so the round-trip no longer drifts.
- parseStewards' lenient fallback accepts any sub-key indentation, not just
2 spaces — 4-space / mixed-indent legacy files stop silently dropping entries.
- Document StewardRole as canonical-not-exhaustive (parser preserves
non-canonical roles), serializeDocument's undefined-strip as shallow, and
traverseWikiGraph's contract (already-resolved ids, hopsUsed = deepest hop,
collision-loser reachability, id-before-title precedence, GraphTraverser xref).
Tests: stewards empty-list symmetry, non-default version, 4-space fallback;
wiki-graph deep-chain hop walk, saturation, self-link, title collision,
multi-seed, unresolved-seed drop. 448 pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(engine): parseStewards lenient path recovers non-default version
The legacy comma-joined shorthand forces the lenient line parser, which
never read an inline `version: N` (no trailing colon, so it matched no
branch) and silently pinned every such file to version 1. Recover it,
symmetric with the parser's role handling. Adds a regression test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hiren F <146440442+hirenf14@users.noreply.github.com>
Co-authored-by: Qaish Kanchwala <9102875+kanchwala@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: QaziKilla <9102875+QaziKilla@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: QaziKilla <QaziKilla@users.noreply.github.com>
Co-authored-by: hirenf14 <hirenf14@gmail.com> M
misha sulpovar committed
fa6db64ce5b201d2fee83d694d66735f7fbf591f
Parent: 6219ba1
Committed by GitHub <noreply@github.com>
on 7/13/2026, 7:17:01 AM