@ingeniomaps/cauce 0.7.2 → 0.7.4

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/CHANGELOG.md CHANGED
@@ -8,6 +8,19 @@ esa operación sea confiable en vez de sólo cómoda: acá se lee qué cambió a
8
8
  un cambio en el protocolo, en las reglas del sistema o en un guard es visible para el usuario y sube
9
9
  minor aunque no toque una sola línea de código.
10
10
 
11
+ ## [0.7.4] - 2026-08-15
12
+
13
+ ### Corregido
14
+
15
+ - **Una bandera antes del último posicional se comía su lugar.** `agents list --json` tomaba `--json`
16
+ como la raíz ops y devolvía `[]` sin error: no había forma de distinguir "no hay cargos" de "te
17
+ contesté con nada". Lo destapó un agente del recorrido de `team`, que pedía ese JSON para resolver
18
+ dónde vive cada cargo y se quedaba sin dato.
19
+ - La ruta del contrato de cada cargo es obligatoria en el manifiesto que arma `team`. Siendo opcional
20
+ el agente la omitía, la etapa caía al camino de respaldo y salía a buscar el archivo igual.
21
+ Y lleva el prefijo de la raíz ops: `agents list` las imprime relativas a ella y las etapas corren
22
+ desde otro lado, así que sin prefijo la ruta tampoco resolvía.
23
+
11
24
  ## [0.7.2] - 2026-08-15
12
25
 
13
26
  ### Cambiado
@@ -53,7 +53,11 @@ const MANIFEST = {
53
53
  owners: { type: 'array', items: { type: 'object', additionalProperties: false, properties: {
54
54
  domain: { type: 'string' }, agent: { type: 'string' },
55
55
  } } },
56
- stages: { type: 'array', items: { type: 'object', additionalProperties: false, properties: {
56
+ stages: { type: 'array', items: { type: 'object', additionalProperties: false,
57
+ // `skill` es obligatorio a propósito: siendo opcional el agente lo omitía, la etapa caía al
58
+ // camino de respaldo y salía a buscar el contrato igual. Un dato que se puede resolver una vez
59
+ // no debería depender de que alguien se acuerde de resolverlo.
60
+ required: ['id', 'agent', 'phase', 'skill'], properties: {
57
61
  id: { type: 'string' }, agent: { type: 'string' }, exitGate: { type: 'string' },
58
62
  phase: { type: 'string', enum: ['discovery', 'delivery'] },
59
63
  produces: { type: 'array', items: { type: 'string' } },
@@ -118,8 +122,9 @@ const contract = await agent(
118
122
  `2. "node tools/ops.js agents list --json", which gives each role its resolved path.\n` +
119
123
  `Report exists=true, the manifest fields —name, purpose, outcome, entryAgent, facilitator, ` +
120
124
  `guardrails, stages with id, phase, agent, produces and exitGate, decisionOwners flattened into ` +
121
- `owners as domain/agent pairs— and for every stage set skill to "<path>/SKILL.md" using the path ` +
122
- `that command 2 printed for that stage's agent.`,
125
+ `owners as domain/agent pairs— and for every stage set skill to "${ROOT}/<path>/SKILL.md", where ` +
126
+ `<path> is what command 2 printed for that stage's agent. That command prints paths relative to ` +
127
+ `${ROOT}, and the stages run from elsewhere, so the prefix is not optional.`,
123
128
  { schema: MANIFEST, label: 'team-contract' },
124
129
  )
125
130
  if (!contract) return stop('contract-unavailable', `no se pudo leer el manifiesto de ${CANDIDATE}`)
package/engine/cli/ops.js CHANGED
@@ -53,6 +53,23 @@ function usage() {
53
53
  ops team show <team>`)
54
54
  }
55
55
 
56
+ // Banderas que consumen el argumento siguiente: su valor no es un posicional.
57
+ const VALUED_FLAGS = new Set(['--name', '--mode', '--engine', '--fixture'])
58
+
59
+ // Los posicionales del comando, salteando banderas y sus valores. Leer `process.argv` crudo hacía
60
+ // que `agents list --json` tomara `--json` como la raíz: el catálogo salía vacío, sin error, y quien
61
+ // lo consumía —un agente, por ejemplo— no tenía cómo notar que le habían contestado con nada.
62
+ function positionals() {
63
+ const found = []
64
+ const argv = process.argv.slice(2)
65
+ for (let index = 0; index < argv.length; index += 1) {
66
+ const value = argv[index]
67
+ if (!value.startsWith('--')) { found.push(value); continue }
68
+ if (VALUED_FLAGS.has(value)) index += 1
69
+ }
70
+ return found
71
+ }
72
+
56
73
  function option(name, fallback = '') {
57
74
  const index = process.argv.indexOf(name)
58
75
  return index >= 0 ? process.argv[index + 1] || fallback : fallback
@@ -790,20 +807,21 @@ function team(action, slug) {
790
807
  async function main() {
791
808
  const command = process.argv[2]
792
809
  if (!command || ['help', '--help', '-h'].includes(command)) return usage()
793
- if (command === 'init') init(process.argv[3])
794
- else if (command === 'check') check(process.argv[3])
795
- else if (command === 'tree') tree(process.argv[3])
796
- else if (command === 'context') context(process.argv[3])
797
- else if (command === 'upgrade') upgrade(process.argv[3])
798
- else if (command === 'agents') agents(process.argv[3], process.argv[4])
799
- else if (command === 'archive') archive(process.argv[3], process.argv[4])
810
+ const arg = positionals()
811
+ if (command === 'init') init(arg[1])
812
+ else if (command === 'check') check(arg[1])
813
+ else if (command === 'tree') tree(arg[1])
814
+ else if (command === 'context') context(arg[1])
815
+ else if (command === 'upgrade') upgrade(arg[1])
816
+ else if (command === 'agents') agents(arg[1], arg[2])
817
+ else if (command === 'archive') archive(arg[1], arg[2])
800
818
  else if (command === 'integration') {
801
- await integration(process.argv[3], process.argv[4], process.argv[5], process.argv[6])
819
+ await integration(arg[1], arg[2], arg[3], arg[4])
802
820
  }
803
- else if (command === 'automation') automation(process.argv[3], process.argv[4], process.argv[5])
804
- else if (command === 'learn') learn(process.argv[3])
805
- else if (command === 'evaluate') evaluate(process.argv[3])
806
- else if (command === 'team') team(process.argv[3], process.argv[4])
821
+ else if (command === 'automation') automation(arg[1], arg[2], arg[3])
822
+ else if (command === 'learn') learn(arg[1])
823
+ else if (command === 'evaluate') evaluate(arg[1])
824
+ else if (command === 'team') team(arg[1], arg[2])
807
825
  else { usage(); fail(`Comando desconocido: ${command}`, 2) }
808
826
  }
809
827
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingeniomaps/cauce",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Sistema portable de planificación y ejecución verificable para cualquier proyecto",
5
5
  "type": "commonjs",
6
6
  "bin": {