refactor: remove KVARK, enterprise packs and the compliance subsystem (P1.4, P1.6)

KVARK is the commercial enterprise product and is not part of the community
edition. The agent's KVARK tools were never wired into the server, so
removing them changes no runtime behaviour beyond the routes listed here.

- agent: delete kvark-tools; CombinedRetrieval and formatCombinedResult now
  merge workspace and personal memory only (no KVARK lane, no source
  conflict note); connector substrate is always 'waggle'
- agent: promote_skill stops at workspace scope; team and enterprise scopes
  answer "not available in this edition" instead of an upgrade prompt
- server: delete src/kvark and GET /api/marketplace/enterprise-packs
- marketplace: delete ENTERPRISE_PACKS
- compliance (EU AI Act dashboard, its templates and the KVARK template
  seeded on every boot): delete core/src/compliance, the /api/compliance/*
  routes, agent compliance-pdf and the Cockpit compliance panel. The
  ai_interactions table lives in the memory substrate and goes with P1.5.
This commit is contained in:
shumeiko.it
2026-10-20 00:27:02 +02:00
parent 10ad678547
commit b734c1d3d2
53 changed files with 56 additions and 6936 deletions

View File

@@ -57,13 +57,10 @@ export interface SkillToolsDeps {
/**
* Skills 2.0 gap E: promotion infrastructure. Each callback is optional.
* - getWorkspaceId / getTeamId resolve scope dirs dynamically at tool-call time.
* - hasTeamSkillLibrary / isEnterprise gate tier-restricted scopes.
* - improvementSignals records skill_promotion signals on successful moves.
*/
getWorkspaceId?: () => string | null;
getTeamId?: () => string | null;
hasTeamSkillLibrary?: () => boolean;
isEnterprise?: () => boolean;
improvementSignals?: ImprovementSignalStore;
/**
* Skills 2.0 gap A: session-message accessor for auto-extracting skills
@@ -668,14 +665,13 @@ Only use this after acquire_capability has identified a specific installable can
},
// Skills 2.0 gap E: promote_skill — move a skill up one scope rung.
// personal → workspace → team → enterprise. Enforces one-step-at-a-time,
// tier gates, and records a skill_promotion improvement signal on success.
// personal → workspace. Enforces one-step-at-a-time and records a
// skill_promotion improvement signal on success.
{
name: 'promote_skill',
description:
'Promote an installed skill one scope up (personal → workspace → team → enterprise). '
+ 'Team scope requires the teamSkillLibrary capability (TEAMS or ENTERPRISE tier). '
+ 'Enterprise scope requires ENTERPRISE tier. '
'Promote an installed skill one scope up (personal → workspace). '
+ 'Team and enterprise scopes are not available in this edition. '
+ 'The file is moved to the appropriate directory, frontmatter is rewritten '
+ '(scope + promoted_from history), and a skill_promotion signal is recorded.',
parameters: {
@@ -746,20 +742,13 @@ Only use this after acquire_capability has identified a specific installable can
);
}
// 4. Tier + context gating
// 4. Context gating. Team and enterprise skill libraries belong to
// team mode, which this edition does not ship.
if (target === 'workspace' && !workspaceId) {
return `Cannot promote to workspace scope: no active workspace. Switch to a workspace first.`;
}
if (target === 'team') {
if (!deps.hasTeamSkillLibrary?.()) {
return `Cannot promote to team scope: your plan does not include the team skill library. Upgrade to TEAMS or ENTERPRISE.`;
}
if (!teamId) {
return `Cannot promote to team scope: this workspace is not linked to a team.`;
}
}
if (target === 'enterprise' && !deps.isEnterprise?.()) {
return `Cannot promote to enterprise scope: requires ENTERPRISE tier. Contact sales for KVARK.`;
if (target === 'team' || target === 'enterprise') {
return `Cannot promote to ${target} scope: team and enterprise skill libraries are not available in this edition.`;
}
// 5. Resolve destination dir + path
@@ -818,8 +807,7 @@ Only use this after acquire_capability has identified a specific installable can
+ `- Promotion history: ${updatedFrontmatter.promoted_from!.join(' → ')} → ${target}\n`
+ `- Signal recorded: skill_promotion\n\n`
+ `The skill is available immediately at the new scope. Agents in other `
+ `workspaces${target === 'team' ? ' on this team' : target === 'enterprise' ? ' across the enterprise' : ''} `
+ `will pick it up on their next skill reload.`
+ `sessions will pick it up on their next skill reload.`
);
},
},