trantor 0.17.76 → 0.17.77
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/.claude-plugin/plugin.json +1 -1
- package/bin/crew-runner.mjs +1 -1
- package/bin/slop-gate.mjs +48 -0
- package/package.json +7 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trantor",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.77",
|
|
4
4
|
"description": "Trantor — the hub-world for AI agent crews: live message bus, presence, project Kanban/flow board + crew orchestration for independent AI coding agents (Claude, Codex, Gemini, Kimi, DeepSeek)",
|
|
5
5
|
"mcpServers": {
|
|
6
6
|
"relay": {
|
package/bin/crew-runner.mjs
CHANGED
|
@@ -161,7 +161,7 @@ if (!CLI[AGENT]) log(`'${AGENT}' is not a built-in seat — running it as an ope
|
|
|
161
161
|
|
|
162
162
|
// RUNNER_RULES / RUNNER_KICKOFF env overrides: the runner is also the substrate for non-crew
|
|
163
163
|
// always-on seats (the fleet DUTY agent, bin/duty.mjs) whose doctrine is not "work your card".
|
|
164
|
-
const RULES = process.env.RUNNER_RULES || `Rules: you are ${SESSION} on the trantor crew. Before starting a card, query the board for related PAST cards and lessons (relay_board — 1900+ cards of tribal knowledge; prior work may already answer half of it). Work your assigned file(s), report on the bus (relay_send, <280 chars), move your Kanban card as you go (doing -> testing -> done; run the
|
|
164
|
+
const RULES = process.env.RUNNER_RULES || `Rules: you are ${SESSION} on the trantor crew. Before starting a card, query the board for related PAST cards and lessons (relay_board — 1900+ cards of tribal knowledge; prior work may already answer half of it). Work your assigned file(s), report on the bus (relay_send, <280 chars), move your Kanban card as you go with a NOTE saying what you did (doing -> testing -> done; in 'testing' run YOUR OWN test file — never the full npm test, suites collide across seats — plus \`node bin/slop-gate.mjs\` when the repo has one: it lints ONLY your changed files against the anti-slop rules, and a card must not reach done with slop-gate failing; use 'failed' + a report if anything breaks). If you need something from another session, message THAT SESSION (relay_peers to find its id, relay_send to reach it) — never ask the human to pass it along; carrying messages between agents is the job this bus exists to remove. When your work for THIS message is finished, END YOUR TURN — do NOT park, do NOT loop relay_wait; the runner waits for you and will wake you with the next message.`;
|
|
165
165
|
|
|
166
166
|
// ---- the pulse (Scape's Lloyd/Argus loop, Trantor-shaped) --------------------
|
|
167
167
|
// A message-driven seat is DEAF between messages. An orchestrator seat with a mission needs a
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// trantor slop-gate — the anti-slop lint, scoped to YOUR CHANGES.
|
|
3
|
+
//
|
|
4
|
+
// node bin/slop-gate.mjs # lint changed + untracked lintable files (the crew gate)
|
|
5
|
+
// node bin/slop-gate.mjs --all # lint the whole configured surface (advisory audit)
|
|
6
|
+
//
|
|
7
|
+
// The rules are the vendored dmmulroy/anti-slop set (tools/oxlint/anti-slop — ours to tune):
|
|
8
|
+
// they mechanically reject low-evidence AI patterns — unexplained type assertions, unknown
|
|
9
|
+
// laundering, runtime typeof instead of boundary decoding, Reflect tricks, module mocking.
|
|
10
|
+
// Diff-scoped ON PURPOSE: the legacy surface carries known debt (carded), and a gate that fails
|
|
11
|
+
// on code you didn't touch teaches agents to ignore the gate. New work meets the bar; old debt
|
|
12
|
+
// burns down on its own card. Stock eslint warnings stay ADVISORY — only anti-slop errors gate.
|
|
13
|
+
import { execSync, spawnSync } from "node:child_process";
|
|
14
|
+
|
|
15
|
+
const ALL = process.argv.includes("--all");
|
|
16
|
+
const LINTABLE = /\.(ts|tsx|mts|cts|js|jsx|mjs|cjs)$/;
|
|
17
|
+
|
|
18
|
+
function sh(cmd) {
|
|
19
|
+
try { return execSync(cmd, { encoding: "utf8", maxBuffer: 16 * 1024 * 1024 }).trim(); }
|
|
20
|
+
catch { return ""; }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let args;
|
|
24
|
+
if (ALL) {
|
|
25
|
+
args = ["."];
|
|
26
|
+
} else {
|
|
27
|
+
const changed = sh("git diff --name-only HEAD");
|
|
28
|
+
const untracked = sh("git ls-files --others --exclude-standard");
|
|
29
|
+
const files = [...new Set([...changed.split("\n"), ...untracked.split("\n")])]
|
|
30
|
+
.filter(f => f && LINTABLE.test(f));
|
|
31
|
+
if (!files.length) { console.log("slop-gate: no lintable changes — pass."); process.exit(0); }
|
|
32
|
+
args = files;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// oxlint applies oxlint.config.ts ignorePatterns even to explicitly-passed files (verified), so
|
|
36
|
+
// excluded legacy files (hub.mjs, mcp.mjs) stay excluded here too.
|
|
37
|
+
const r = spawnSync("npx", ["oxlint", ...args], { encoding: "utf8", maxBuffer: 16 * 1024 * 1024 });
|
|
38
|
+
const out = (r.stdout || "") + (r.stderr || "");
|
|
39
|
+
const hits = out.split("\n").filter(l => /error\s+anti-slop\(/.test(l));
|
|
40
|
+
|
|
41
|
+
if (hits.length) {
|
|
42
|
+
console.log(hits.join("\n"));
|
|
43
|
+
console.log(`\nslop-gate: ${hits.length} anti-slop error(s) in your changes — fix them (or state the SAFETY invariant) before moving the card to testing.`);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
const warnings = out.split("\n").filter(l => /\bwarning\b/.test(l)).length;
|
|
47
|
+
console.log(`slop-gate: clean${warnings ? ` (${warnings} advisory warning(s) — not gating)` : ""}.`);
|
|
48
|
+
process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trantor",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.77",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"trantor": "bin/cli.mjs"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"pg": "^8.22.0",
|
|
11
|
+
"zod": "^4.4.3"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "node test.mjs && node test-scenarios.mjs && node test-failure.mjs && node test-redelivery.mjs && node test-handoff.mjs && node test-agents.mjs && node test-update.mjs && node test-handoff-guard.mjs && node test-balances.mjs && node test-subagent-cost.mjs && node test-inbox.mjs && node test-inflight.mjs && node test-notify.mjs && node test-focus.mjs && node test-cardlog.mjs && node test-relay-note.mjs && node test-reaper.mjs && node test-events.mjs && node test-proposals.mjs && node test-scrub.mjs && node test-store-delta.mjs && node test-claims.mjs && node test-adopt.mjs && node test-summarize.mjs && node test-identity-core.mjs && node test-identity.mjs && node test-identity-instances.mjs && node test-duty.mjs && node test-discovery.mjs && node test-doctor.mjs && node test-splitbrain.mjs && node test-overseer.mjs && node test-overseer-lib.mjs && node test-overseer-warn.mjs && node test-provider-keys.mjs && node test-inbox-delivery.mjs && node test-hub-routing.mjs && node test-hook-routing.mjs && node test-relay-wait.mjs && node test-dsh-seat.mjs && node test-kimi-bridge.mjs && node test-kimi-events.mjs && python3 engine/test-routing.py && node test-reconcile.mjs && node test-resources.mjs && node test-patrol.mjs && node test-bridge.mjs && bash test-crew.sh"
|
|
@@ -53,5 +53,9 @@
|
|
|
53
53
|
"license": "MIT",
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=18"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@oxlint/plugins": "^1.79.0",
|
|
59
|
+
"oxlint": "^1.79.0"
|
|
56
60
|
}
|
|
57
61
|
}
|