Skip to content

Sync Open Knowledge from agents-private#540

Merged
inkeep-oss-sync[bot] merged 2 commits into
mainfrom
copybara/sync
Jul 8, 2026
Merged

Sync Open Knowledge from agents-private#540
inkeep-oss-sync[bot] merged 2 commits into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Copybara-translated commits from agents-private. Rebase-merge this PR so the prepared commits land directly on public main.

…st-bash) (#2406)

* fix(open-knowledge): make `ok` exec read subpaths on Windows (bump just-bash)

On Windows the exec MCP tool could not read or list any file below the
project root: `cat`/`ls`/`grep`/`find` on a subpath returned "No such file
or directory" even though the file existed. The bundled just-bash sandbox's
containment gate (isPathWithinRoot) hardcoded the POSIX `/` separator, so
every backslash-separated Windows real path failed the within-root check and
was rejected as "outside sandbox". Enrichment was unaffected (it uses OK's own
node:fs path), which is why metadata resolved while bodies did not.

Upstream fixed this in vercel-labs/just-bash#187 (first released in 2.14.3);
OK pinned 2.14.2, one release short. Bump the floor to ^2.14.3 (lockfile
resolves to 2.14.5) and add subdirectory read/list regression tests plus a
rationale comment on the floor.

Verified on a real Windows 11 VM: with 2.14.2 `cat sandbox/beta.md` and
`ls sandbox` fail; with 2.14.5 both succeed and only genuinely-absent files
report ENOENT. macOS/Linux behavior unchanged.

PRD-7278

* chore(open-knowledge): refresh ng-anchors-catalog after main merge

Regenerate the @floor anchor catalog to match current sources: the WYSIWYG
link-authoring change (#2478) shifted pipeline.ts @floor annotations by ~5
lines and another merge added a test file (testFileCount 197→198). The
committed catalog was stale on main; the freshness test in bun run check
failed until regenerated via enumerate-ng-anchors.

---------

GitOrigin-RevId: 9db70598774a5bff2ce731bf217d96a9ff59c55e
…obal section (#2511)

* feat(desktop): Settings → This project → AI tools + fix Pi leak in global AI tools

Adds a project-scoped "AI tools" section under Settings → This project, the
sibling of "AI tools & CLI". It manages the project-local footprint of the
open project — per-editor project MCP config files (.mcp.json, .cursor/mcp.json,
.codex/config.toml, opencode.json, Pi's managed extension) and the project
runtime skill — with live per-component install/uninstall over a new
ok:project-integrations:dispatch IPC (status+set fold; ratchet 78→79). The
handler resolves the sender window's project (webContents → ProjectContext) so
the renderer never names a directory; installs reuse writeEditorMcpConfig /
removeOwnMcpEntry with a project config-path override plus the new
removeProjectSkill primitive. Each installed row states its remaining step —
Claude Code approve-once, Cursor enable-manually, Codex auto-connect — so a
project-only install isn't a silent dead-end.

Also fixes the related leak this surfaced: project-only editors (Pi) have no
user-global MCP config, so they showed as a permanently-unmanageable row in the
existing global "AI tools & CLI" section. That section now lists only
scope: 'global' editors; Pi is managed project-locally instead.

* ci(open-knowledge): re-materialize node-pty types for the fresh desktop typecheck

`open-knowledge / typecheck` fails a fresh (cache-miss) desktop `tsc --noEmit`
with `TS2307: Cannot find module 'node-pty'`. Root cause: node-pty is a native
`optionalDependency` shipping prebuilds for darwin + win32 only — no Linux
prebuild — so on the ubuntu runner its install script builds from source,
fails, and bun drops the optional dep. The desktop typecheck then can't resolve
node-pty's (tarball-shipped) type declarations. It's normally invisible because
that job almost always turbo-cache-hits; a desktop-source change forces a fresh
run and surfaces it.

The typecheck needs only the TYPES, not the built binary (desktop-build /
cli-e2e rebuild the real native module via ELECTRON_SKIP_REBUILD=0). Add a
typecheck-only step that, when node-pty was dropped, re-materializes it with
lifecycle scripts skipped (`bun add --no-save --ignore-scripts`) — landing the
typings without re-attempting the doomed build. Verified locally that
`--ignore-scripts` installs `typings/node-pty.d.ts` without building `pty.node`.

* test+polish(project-ai-tools): cover skill-uninstall + write error paths; minor cleanups

Address code-review feedback (both AI reviewers approved; these are the genuine
substance):

- Test the destructive skill-UNINSTALL fan-out (removeProjectSkill across every
  capable editor) + its partial-failure reporting — previously only the install
  direction was covered, so a swapped write/remove branch would ship green.
- Test the untested editor error paths: declined + failed writes, declined
  removal (each producing a distinct refusal message).
- Test the loadFailed branch (status() rejects → unavailable fallback, not a
  stuck skeleton).
- Remove the dead `editorsWithProjectConfig` helper (biome had silently
  `_`-prefixed it; computeEditorStatuses filters inline).
- Tighten EDITOR_FOLLOW_UP key type to Partial<Record<McpWiringEditorId, …>>.
- Thread projectDir into the computeStatus warn logs for reproducibility.
- role="status" on the per-editor follow-up hint so it's announced when a row
  toggles to installed (a11y).

---------

GitOrigin-RevId: f6ae73fbf1c2ba88619977ea6fe813f19c5c0b07

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28956820365). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync inkeep-oss-sync Bot merged commit d2b9b6c into main Jul 8, 2026
@inkeep-oss-sync inkeep-oss-sync Bot deleted the copybara/sync branch July 8, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant