@lazyingart/agintiflow 0.20.65 → 0.20.67

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazyingart/agintiflow",
3
- "version": "0.20.65",
3
+ "version": "0.20.67",
4
4
  "type": "module",
5
5
  "description": "Low-cost, project-aware Web and CLI agents with DeepSeek/Venice/OpenAI routing, visible tool calls, durable sessions, scouts, AAPS, SCS, and guarded local execution.",
6
6
  "license": "Apache-2.0",
@@ -24,6 +24,7 @@ async function exists(file) {
24
24
  const init = await runAapsAction("init", ["Smoke AAPS Project"], { cwd: tempRoot, packageDir: repoRoot });
25
25
  assert(init.ok, "AAPS init failed");
26
26
  assert(await exists(path.join(tempRoot, "aaps.project.json")), "AAPS init did not write manifest");
27
+ assert(await exists(path.join(tempRoot, "agents", "agent_registry.json")), "AAPS init did not write starter agent registry");
27
28
  assert(await exists(path.join(tempRoot, "workflows", "main.aaps")), "AAPS init did not write starter workflow");
28
29
 
29
30
  const files = await runAapsAction("files", [], { cwd: tempRoot, packageDir: repoRoot });
@@ -43,10 +44,7 @@ if (discovery.found) {
43
44
 
44
45
  const compile = await runAapsAction("compile", ["check"], { cwd: tempRoot, packageDir: repoRoot });
45
46
  assert(compile.json?.phase?.parse === "ok", `AAPS compile check did not return a structured parse-ok report\n${formatAapsResult(compile)}`);
46
- assert(
47
- compile.json?.status === "missing_components" || compile.json?.ok === true,
48
- `AAPS compile check returned an unexpected status\n${formatAapsResult(compile)}`
49
- );
47
+ assert(compile.ok && compile.json?.ok === true, `AAPS starter should compile cleanly after init\n${formatAapsResult(compile)}`);
50
48
  } else {
51
49
  const validate = await runAapsAction("validate", [], { cwd: tempRoot, packageDir: repoRoot });
52
50
  assert(validate.ok === false && validate.error, "AAPS missing path should return a structured error");
@@ -11,7 +11,7 @@ import {
11
11
  } from "../src/model-routing.js";
12
12
  import { normalizeTextToolCallResponse, parseTextToolCalls, usesTextToolProtocol } from "../src/model-client.js";
13
13
  import { modelRoleChoices } from "../src/interactive-cli.js";
14
- import { buildSupervisorInstruction } from "../src/scs-controller.js";
14
+ import { buildScsEvidencePack, buildSupervisorInstruction } from "../src/scs-controller.js";
15
15
 
16
16
  const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
17
17
 
@@ -208,6 +208,27 @@ assert(!usesTextToolProtocol({ provider: "venice", model: "venice-uncensored-1-2
208
208
  const scsInstruction = buildSupervisorInstruction({ plan: "Create one file.", acceptanceCriteria: ["File exists."] });
209
209
  assert(scsInstruction.includes("Student-Committee-Supervisor"), "SCS supervisor instruction should define the acronym");
210
210
  assert(!scsInstruction.includes("Syntax-Checker Sentinel"), "SCS supervisor instruction should not allow alternate acronym expansions");
211
+ const longStdout = [
212
+ "=== Student-Committee-Supervisor present ===",
213
+ "3:SCS stands for **Student-Committee-Supervisor**",
214
+ "=== Syntax-Checker Sentinel absent ===",
215
+ "OK: absent",
216
+ "=== Residual content ===",
217
+ "py_compile FOUND",
218
+ "f-string FOUND",
219
+ "artifact integrity FOUND",
220
+ ].join("\n");
221
+ const scsEvidence = buildScsEvidencePack({
222
+ goal: "verify SCS artifact",
223
+ messages: [
224
+ {
225
+ role: "tool",
226
+ content: JSON.stringify({ toolName: "run_command", ok: true, stdout: `${longStdout}\n${"x".repeat(700)}` }),
227
+ },
228
+ ],
229
+ });
230
+ assert(scsEvidence.includes("Student-Committee-Supervisor"), "SCS evidence pack should preserve raw verification stdout");
231
+ assert(scsEvidence.includes("Syntax-Checker Sentinel absent"), "SCS evidence pack should keep absence checks visible to the final gate");
211
232
 
212
233
  const output = await runCli(["models"]);
213
234
  assert(output.includes("/route") && output.includes("/spare") && output.includes("venice-gpt"), "aginti models output missing role details");
@@ -237,6 +258,7 @@ console.log(
237
258
  "requested-tools-parser",
238
259
  "malformed-text-tool-retry",
239
260
  "scs-supervisor-identity",
261
+ "scs-evidence-stdout",
240
262
  "cli-models-command",
241
263
  "venice-shortcut",
242
264
  ],
@@ -478,13 +478,21 @@ async function createAapsStarterProject({ cwd = process.cwd(), name = "" } = {})
478
478
  const projectDir = path.resolve(cwd || process.cwd());
479
479
  const projectName = String(name || path.basename(projectDir) || "AgInTiFlow AAPS Project").trim();
480
480
  const workflowDir = path.join(projectDir, "workflows");
481
+ const agentsDir = path.join(projectDir, "agents");
481
482
  const reportsDir = path.join(projectDir, "reports");
482
483
  const runsDir = path.join(projectDir, "runs");
483
484
  const artifactsDir = path.join(projectDir, "artifacts");
484
- await Promise.all([fs.mkdir(workflowDir, { recursive: true }), fs.mkdir(reportsDir, { recursive: true }), fs.mkdir(runsDir, { recursive: true }), fs.mkdir(artifactsDir, { recursive: true })]);
485
+ await Promise.all([
486
+ fs.mkdir(workflowDir, { recursive: true }),
487
+ fs.mkdir(agentsDir, { recursive: true }),
488
+ fs.mkdir(reportsDir, { recursive: true }),
489
+ fs.mkdir(runsDir, { recursive: true }),
490
+ fs.mkdir(artifactsDir, { recursive: true }),
491
+ ]);
485
492
 
486
493
  const manifestPath = path.join(projectDir, "aaps.project.json");
487
494
  const workflowPath = path.join(workflowDir, "main.aaps");
495
+ const agentRegistryPath = path.join(agentsDir, "agent_registry.json");
488
496
  const created = [];
489
497
  if (!fsSync.existsSync(manifestPath)) {
490
498
  const now = new Date().toISOString();
@@ -501,6 +509,7 @@ async function createAapsStarterProject({ cwd = process.cwd(), name = "" } = {})
501
509
  updated: now,
502
510
  paths: {
503
511
  workflows: "workflows",
512
+ agents: "agents",
504
513
  blocks: "blocks",
505
514
  skills: "skills",
506
515
  modules: "modules",
@@ -515,6 +524,7 @@ async function createAapsStarterProject({ cwd = process.cwd(), name = "" } = {})
515
524
  runDatabase: "runs/aaps-runs.jsonl",
516
525
  tools: ["node", "python3", "git", "aginti"],
517
526
  models: ["deepseek-v4-flash", "deepseek-v4-pro"],
527
+ agents: ["planner"],
518
528
  files: {
519
529
  workflows: ["workflows/main.aaps"],
520
530
  blocks: [],
@@ -530,6 +540,22 @@ async function createAapsStarterProject({ cwd = process.cwd(), name = "" } = {})
530
540
  await fs.writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
531
541
  created.push("aaps.project.json");
532
542
  }
543
+ if (!fsSync.existsSync(agentRegistryPath)) {
544
+ const registry = {
545
+ agents: [
546
+ {
547
+ name: "planner",
548
+ purpose: "Plan large project work in small, verifiable phases for the starter AAPS workflow.",
549
+ invocation: "prompt",
550
+ supportedTasks: ["planning", "workflow_planning", "compile_prompt"],
551
+ safety: ["project-local edits only", "ask before risky shell commands", "no secrets in logs"],
552
+ fallback: "prepare prompt-only handoff",
553
+ },
554
+ ],
555
+ };
556
+ await fs.writeFile(agentRegistryPath, `${JSON.stringify(registry, null, 2)}\n`, "utf8");
557
+ created.push("agents/agent_registry.json");
558
+ }
533
559
  if (!fsSync.existsSync(workflowPath)) {
534
560
  const source = `pipeline "${projectName} Starter" {
535
561
  subtitle "A project-local AAPS workflow for AgInTiFlow"
@@ -166,7 +166,7 @@ export function buildScsEvidencePack(state = {}, context = {}) {
166
166
  return `tool:${parsed.toolName || message.tool_call_id || "unknown"} ok=${parsed.ok !== false} done=${Boolean(parsed.done)} ${compactJson(
167
167
  {
168
168
  error: parsed.error || parsed.reason || "",
169
- stdout: parsed.stdout ? String(parsed.stdout).slice(0, 300) : "",
169
+ stdout: parsed.stdout ? String(parsed.stdout).slice(0, 1200) : "",
170
170
  path: parsed.path || "",
171
171
  changes: Array.isArray(parsed.changes) ? parsed.changes.map((change) => change.path).filter(Boolean) : [],
172
172
  },
@@ -458,7 +458,7 @@ export async function reviewScsFinish(client, config, state, result = "", contex
458
458
  {
459
459
  role: "system",
460
460
  content:
461
- "You are the SCS student final gate. Decide if the supervisor has enough concrete evidence to finish. Emit finish_allowed or finish_rejected only. Be strict for coding/system tasks, but do not demand impossible checks. Return strict JSON with keys: role, decision, confidence, evidence, reason, next_required_action.",
461
+ "You are the SCS student final gate. Decide if the supervisor has enough concrete evidence to finish. Emit finish_allowed or finish_rejected only. Be strict for coding/system tasks, but do not demand impossible checks. Evaluate both the proposed final result and the evidence pack; tool stdout in recentMessages/recentEvents is raw command evidence and does not need to be duplicated in the final answer. Reject only when neither the final answer nor the evidence pack contains concrete file/tool/check evidence for the acceptance criteria. Return strict JSON with keys: role, decision, confidence, evidence, reason, next_required_action.",
462
462
  },
463
463
  {
464
464
  role: "user",