@ericrisco/rsc 2.0.9 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.9",
2
+ "version": "2.0.10",
3
3
  "counts": {
4
4
  "skills": 273,
5
5
  "agents": 33,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ericrisco/rsc",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "A guided harness builder that turns your goal into a minimal, verified AI-agent setup using strict best practices.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4,6 +4,7 @@ import { dirname, join, relative, resolve, sep } from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { applyInstall, pruneSharedBases, removeTargetInstall } from '../install-apply.js';
6
6
  import { targetPaths } from '../../targets/index.js';
7
+ import { targetHasAgents } from '../../targets/agents.js';
7
8
  import { readState } from './state.js';
8
9
  import { readManifest, writeManifest } from './manifest-file.js';
9
10
  import { encodeGoal, identifyPlan } from './onboarding.js';
@@ -11,6 +12,22 @@ import { createBackup, restoreBackup } from './backups.js';
11
12
 
12
13
  const sameSet = (a = [], b = []) => JSON.stringify([...a].sort()) === JSON.stringify([...b].sort());
13
14
 
15
+ /**
16
+ * What THIS target should be holding, which is not the same question as what the project decided.
17
+ *
18
+ * The policy is the PROJECT's: "these are the agents this project wants." Whether an assistant can
19
+ * hold a subagent at all is the TARGET's business, and nine of the seventeen cannot — amp, jules,
20
+ * zed, antigravity, windsurf, cline, roo, continue and aider have no such concept. The installer
21
+ * always knew this and correctly wrote none; the verifier did not, and demanded the project's list
22
+ * from every target, so onboarding could never complete on any of the nine. Since the failure rolls
23
+ * back, what the person got was empty directory shells and no harness — with a recovery command
24
+ * that leads straight back to the same wall.
25
+ *
26
+ * Asking amp for a subagent is not a divergence. It is a category error, and this is where the two
27
+ * categories stop being confused.
28
+ */
29
+ export const expectedAgentsFor = (target, plan) => (targetHasAgents(target) ? (plan.policy.agents || []) : []);
30
+
14
31
  function inside(root, path) {
15
32
  return path === root || path.startsWith(`${root}${sep}`);
16
33
  }
@@ -92,7 +109,7 @@ export function verifyOnboarding(cwd, plan, planId) {
92
109
  for (const target of plan.policy.targets) {
93
110
  const state = readState(targetPaths(target, undefined, cwd).stateFile);
94
111
  if (!sameSet(Object.keys(state.skills || {}), plan.policy.skills)) differences.push(`${target}: installed skills differ from accepted policy`);
95
- if (!sameSet(state.agents || [], plan.policy.agents || [])) differences.push(`${target}: installed agents differ from accepted policy`);
112
+ if (!sameSet(state.agents || [], expectedAgentsFor(target, plan))) differences.push(`${target}: installed agents differ from accepted policy`);
96
113
  if (state.policy?.alwaysOn !== plan.policy.alwaysOn) differences.push(`${target}: always-on policy differs`);
97
114
  if (state.policy?.codeHooks !== plan.policy.codeHooks) differences.push(`${target}: code-hook policy differs`);
98
115
  if (state.policy?.memory !== plan.policy.memory) differences.push(`${target}: memory policy differs`);