@ericrisco/rsc 3.0.11 → 3.0.12

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": "3.0.11",
2
+ "version": "3.0.12",
3
3
  "counts": {
4
4
  "skills": 270,
5
5
  "agents": 34,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ericrisco/rsc",
3
- "version": "3.0.11",
3
+ "version": "3.0.12",
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": {
@@ -8,7 +8,7 @@ import { targetPaths, writeSkill, wireHook, unwireHook, baseDir, TARGET_IDS } fr
8
8
  import { shadowTarget } from '../targets/agents-md-shadow.js';
9
9
  import {
10
10
  targetHasAgents, reconcileAgents, agentPath, agentNames, writeAgentsDetailed,
11
- resolveAgentNames, agentByName, allAgentNames, readDeveloperTier, writeDeveloperTier,
11
+ resolveAgentNames, withAgentCompanions, agentByName, allAgentNames, readDeveloperTier, writeDeveloperTier,
12
12
  } from '../targets/agents.js';
13
13
  import { projectOptOuts } from '../targets/opt-outs.js';
14
14
  import { readState, writeState } from './lib/state.js';
@@ -114,13 +114,13 @@ export function managedPathsForInstall({ skillIds, agentIds = [], target, home,
114
114
  if (targetHasAgents(target)) {
115
115
  const state = readState(paths.stateFile);
116
116
  const explicit = [...new Set([...(state.explicitAgents || readManifest(cwd)?.agents || []), ...agentIds])];
117
- const desired = policy?.agents || resolveAgentNames([...Object.keys(state.skills || {}), ...skillIds], explicit);
117
+ const desired = withAgentCompanions(policy?.agents || resolveAgentNames([...Object.keys(state.skills || {}), ...skillIds], explicit));
118
118
  out.push(...desired.map((n) => agentPath(target, cwd, n)));
119
119
  }
120
120
  if (targetHasCommands(target)) {
121
121
  const state = readState(paths.stateFile);
122
122
  const explicit = [...new Set([...(state.explicitAgents || readManifest(cwd)?.agents || []), ...agentIds])];
123
- const desiredAgents = policy?.agents || resolveAgentNames([...Object.keys(state.skills || {}), ...skillIds], explicit);
123
+ const desiredAgents = withAgentCompanions(policy?.agents || resolveAgentNames([...Object.keys(state.skills || {}), ...skillIds], explicit));
124
124
  const desiredCommands = resolveCommands({
125
125
  target,
126
126
  skills: policy ? skillIds : [...new Set([...Object.keys(state.skills || {}), ...skillIds])],
@@ -301,11 +301,11 @@ export async function applyInstall({ skillIds = [], agentIds = [], target, home,
301
301
  // naming an agent whose file never landed answers "you have it" for something absent.
302
302
  const inheritedExplicit = policy ? (state.explicitAgents || []) : (state.explicitAgents || readManifest(cwd)?.agents || []);
303
303
  const explicit = [...new Set([...inheritedExplicit, ...agentIds])].sort();
304
- const desiredAgents = policy?.agents
304
+ const desiredAgents = withAgentCompanions(policy?.agents
305
305
  ? [...new Set([...policy.agents, ...explicit])].sort()
306
306
  : policy?.baseAgents === false
307
307
  ? explicit
308
- : resolveAgentNames(Object.keys(state.skills || {}), explicit);
308
+ : resolveAgentNames(Object.keys(state.skills || {}), explicit));
309
309
  const previousAgents = state.agents || [];
310
310
  let keptAgents = [];
311
311
  if (targetHasAgents(target)) {
package/targets/agents.js CHANGED
@@ -171,6 +171,16 @@ Also state whether the severity holds. A CONFIRMED finding whose blast radius is
171
171
  ];
172
172
 
173
173
 
174
+ // Agents that only make sense next to others, and so travel with them. A project whose accepted plan
175
+ // lists the refuters explicitly (onboarded before 3.0.11) would otherwise get a `review` skill that
176
+ // dispatches `finding-verifier` into a project that does not have it. Same panel the user accepted,
177
+ // one more member — not a new decision, so it is added on sync rather than asked.
178
+ const COMPANIONS = { 'finding-verifier': (names) => names.some((n) => n.startsWith('refuter-')) };
179
+ export function withAgentCompanions(names = []) {
180
+ const extra = Object.entries(COMPANIONS).filter(([name, needs]) => !names.includes(name) && needs(names)).map(([name]) => name);
181
+ return extra.length ? [...names, ...extra] : names;
182
+ }
183
+
174
184
  export const BASE_AGENT_NAMES = Object.freeze(AGENTS.map((agent) => agent.name));
175
185
  export { stackAgents, stackAgentNames, validateAgentCatalog };
176
186
  export const allAgentNames = () => [...BASE_AGENT_NAMES, ...stackAgentNames()];