Repository navigation
Per-member skill learning control and skill provenance fix - #1146
Merged
Merged
Conversation
Generating skills deleted every pending skill in its scope, including Agent Skills Finder suggestions awaiting approval and manual pending ones. Skills now record their source (manual, llm, finder) and generation only replaces its own pending llm suggestions. activeSkillsText also filters by organization, and the skill endpoints validate their bodies with DTOs. Intent capture was one switch for the whole workspace. Admins can now set each member to inherit, on or off (also in bulk, optionally erasing the intents already captured), and members can opt themselves out. Only contributing callers get the _intent parameter; callers without a member identity never contribute. Changes are logged as LEARNING_CHANGED.
This was referenced Oct 19, 2026
Contributor
Author
|
Update after review (19 Oct): verified with a real model (gpt-4o-mini driving the MCP server as a chat client) and two independent security reviews. Fixes are in the PRs they belong to:
Merge the stack in order (#1146 → #1149 → #1152 → #1154 → #1158) and release them together. |
helpcodeai
enabled auto-merge (squash)
October 19, 2026 17:15
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Two things around workspace skills, see #1145.
Changes
kg_skill_suggestions.source(manual,llm,finder), backfilled from existing rows (Finder skills by their "Source: … (licence: …)" line, LLM ones by confidence < 1).generatedeletes onlysource: 'llm'pending rows; consolidated skills are taggedllm;skills_save_to_workspacefilesfinder.activeSkillsTexttakes and filters byorganizationId. The shared/mcpguide reads each workspace's skills with its own org and only its own server/connector ids.organization_members.learning_mode(inheritdefault,on,off) andlearning_opt_out. Effective rule: not opted out, andon, orinheritwith the workspace "Capture user intent" switch on. Existing workspaces behave exactly as before.KgLearningService+ endpoints:GET/PUT /api/knowledge-graph/learning/me(any member, opt-out and optional erase of own intents) andPUT /api/knowledge-graph/learning/members(admin, up to 500 members, optional erase for members that end up off). Only members of the caller's workspace are touched._intent. Callers without a member identity (static instance credentials, client-credentials tokens) or deactivated members never contribute.LEARNING_CHANGED, one row per member.docs/knowledge-graph.mdexplains who contributes and that generation keeps manual and Finder skills.Cloud and self-hosted behave the same. Settings live on the membership, so one person in two Cloud workspaces can have different settings.
Type
Testing
Commands and results (after rebasing on main):
npm ci(root): okpackages/backend:npx prisma generate,npx tsc --noEmit -p tsconfig.json: no errorspackages/backend:npm run lint: 0 errors (existing warnings only); the files eslint --fix touched outside this change were revertedpackages/backend:npx jest: 676 suites passed, 4 skipped; 20418 tests passed, 1496 skippedpackages/frontend:npx tsc --noEmit -p tsconfig.json: no errors;npm run lint: 0 errors, no new warnings in the changed filesnode scripts/validate-adapters.mjs --warn: exit 0, existing warnings only (no adapter changes)npx prisma migrate deployon an empty scratch database, thenprisma migrate diffagainstschema.prisma: empty. The backfill regex was checked against Finder-style and manual instructions.Manual end-to-end on a local backend (scratch database, MCP API key, OpenPLZ connector,
tools/listover/mcp/:serverId):_intentkg_how_to_obtain)A
tools/callwith_intentstored the intent with the user id; setting the member off withclearIntentserased it (intentsCleared: 1) and the next call stored nothing. All six changes appeared asLEARNING_CHANGEDsecurity events. An invalid mode returns 400. Both new UI sections were checked in the browser.Checklist
npx jest; rootnpm testis not used because the frontend has no test script)Related Issues
Fixes #1145