@ancleto/spec 0.11.0 → 0.11.1

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Orchestrates tasks and delegates to subagents for spec-driven development
3
3
  mode: primary
4
- model: opencode-go/qwen3.7-plus
4
+ model: opencode-go/deepseek-v4.1-flash
5
5
  color: '#6366f1'
6
6
  tools:
7
7
  read: true
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Reviews completed changes for correctness, conventions, and approved-scope compliance
3
3
  mode: subagent
4
- model: opencode-go/qwen3.6-plus
4
+ model: opencode-go/deepseek-v4.1-flash
5
5
  temperature: 0.1
6
6
  color: '#ef4444'
7
7
  tools:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Generates aspec change artifacts for spec-driven development
3
3
  mode: subagent
4
- model: opencode-go/qwen3.7-plus
4
+ model: opencode-go/deepseek-v4.1-flash
5
5
  temperature: 0.2
6
6
  color: '#f59e0b'
7
7
  tools:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancleto/spec",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Orquestador SDD liviano con subagentes optimizados para costo/tokens",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli/index.js CHANGED
@@ -2029,7 +2029,7 @@ async function memoryListCmd(flags) {
2029
2029
  return
2030
2030
  }
2031
2031
  for (const n of nodes) {
2032
- console.log(` [${n.type}/${n.scope}${n.status === 'active' ? '' : '/' + n.status}] ${n.memory_key}`)
2032
+ console.log(` [${n.type}/${n.scope}${n.status === 'active' ? '' : '/' + n.status}] ${n.memory_key} (${n.source})`)
2033
2033
  console.log(` ${n.content}`)
2034
2034
  }
2035
2035
  console.log(`ancleto: ${nodes.length} nodo(s)`)
@@ -182,6 +182,14 @@ function buildEngine(db) {
182
182
  return []
183
183
  }
184
184
 
185
+ // Procedencia de escritura (runtime-owned, solo auditoria): `source` se resuelve
186
+ // exclusivamente desde `context.source || 'runtime'` y NUNCA desde `input` (un
187
+ // `source` forjado en los args del caller se ignora, igual que `id`/`status`/
188
+ // `confidence`). Vocabulario: `mcp:ancleto-memory` (tools MCP), `cli:import`
189
+ // (import del CLI), `runtime` (default programatico), `agent:<rol>` (solo si el
190
+ // runtime confiable lo provee, nunca el caller). Frontera: la procedencia es
191
+ // descriptiva; el motor NO la usa para autorizar ni denegar escrituras (sin
192
+ // canal de identidad autenticado no hay enforcement).
185
193
  function recordNode(input, context = {}) {
186
194
  const memory_key = String(input.memory_key || '').trim()
187
195
  const type = input.type
@@ -232,11 +240,11 @@ function buildEngine(db) {
232
240
  }
233
241
  const clause = where.length ? `WHERE ${where.join(' AND ')}` : ''
234
242
  const rows = db.prepare(
235
- `SELECT ${PUBLIC_COLUMNS}, status FROM memory_nodes n ${clause}
243
+ `SELECT ${PUBLIC_COLUMNS}, n.source, status FROM memory_nodes n ${clause}
236
244
  ORDER BY CASE n.scope WHEN 'task' THEN 0 WHEN 'feature' THEN 1 WHEN 'project' THEN 2 ELSE 9 END,
237
245
  n.created_at DESC, n.rowid DESC`
238
246
  ).all(...params)
239
- return rows.map((r) => ({ ...publicNode(r), status: r.status }))
247
+ return rows.map((r) => ({ ...publicNode(r), source: r.source, status: r.status }))
240
248
  }
241
249
 
242
250
  // Devuelve los nodos activos en el formato de export. Sanitiza paths
@@ -294,7 +302,7 @@ function buildEngine(db) {
294
302
  insertNode.run(
295
303
  newId, memory_key, entry.type, entry.scope,
296
304
  String(entry.content), String(entry.justification || ''),
297
- 'import', 1, entry.createdAt
305
+ 'cli:import', 1, entry.createdAt
298
306
  )
299
307
  summary.updated++
300
308
  } else {
@@ -311,7 +319,7 @@ function buildEngine(db) {
311
319
  insertNode.run(
312
320
  randomUUID(), memory_key, entry.type, entry.scope,
313
321
  String(entry.content), String(entry.justification || ''),
314
- 'import', 1, entry.createdAt
322
+ 'cli:import', 1, entry.createdAt
315
323
  )
316
324
  summary.inserted++
317
325
  }