Sync Open Knowledge from agents-private#536
Merged
Merged
Conversation
…sent dialog) (#2497)
A newly-created git worktree of an OK project re-prompted the "Setup
OpenKnowledge in this folder?" consent dialog. discoverProject's
linked-worktree carveout classifies an un-initialized worktree (no
<worktree>/.ok/config.yml) as 'fresh', which shows the dialog.
Seed the new worktree from the root right after 'git worktree add', in
createWorktree, beside the existing auto-sync inheritance:
- initContent(worktree, { contentDir }): the same writer the consent and
create-new flows use. Materializes .ok/config.yml (+ .ok/.gitignore +
.okignore). Its presence flips discovery 'fresh' to 'managed', so the
worktree opens silently. writeIfMissing, so a committed config is never
clobbered. content.dir is inherited from the root.
- writeProjectAiIntegrations(worktree, editors): the same writer the setup
flows use. Mirrors the exact editors the root wired (detected via the OK
MCP sentinel), so agents/editors work out of the box. The published MCP
entries and .claude/launch.json recipe are the resilient /bin/sh chain
(project-path-independent), so writing them under the worktree path is
the adaptation.
Sharing mode is inherited for free: .git/info/exclude lives in the shared
git common dir, so a local-only root's exclude already covers the
worktree's seeded .ok/ and editor configs, and they stay untracked. The
seed performs only file writes and never stages anything.
GitOrigin-RevId: 8666c84d7d45d8cf8f6958ee840b2690549c7c34
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28922409878). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copybara-translated commits from agents-private. Rebase-merge this PR so the prepared commits land directly on public main.