titan-agent 5.6.6 → 5.7.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.
- package/README.md +25 -0
- package/dist/agent/agentLoop.js +29 -13
- package/dist/agent/agentLoop.js.map +1 -1
- package/dist/agent/promptBudget.js +33 -3
- package/dist/agent/promptBudget.js.map +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/constants.js.map +1 -1
- package/docs/HARNESS-PATTERNS.md +92 -0
- package/package.json +1 -1
- package/ui/dist/sw.js +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
> **TITAN** — The AI that actually _does_ things. It remembers your name. It learns what you like. It writes your emails, codes your ideas, posts for you, and keeps getting smarter while you sleep. Oh, and it has a little floating mascot. `npm i -g titan-agent`
|
|
4
4
|
> [//]: # (npm-text-end)
|
|
5
5
|
|
|
6
|
+
<div align="center">
|
|
7
|
+
|
|
8
|
+
# 📡 INCOMING TRANSMISSION
|
|
9
|
+
|
|
10
|
+
## 🚨 TITAN v6.0 — "Living Canvas" — Dropping This Week 🚨
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
> **Every other AI gives you a chat box.**
|
|
15
|
+
> **TITAN moves in.**
|
|
16
|
+
|
|
17
|
+
v6.0 ships **Presence** — the first AI agent that:
|
|
18
|
+
|
|
19
|
+
- 🧠 **Feels** what you're working on — Soma's homeostatic drive layer modulates behavior in real time (curiosity, focus, fatigue, satisfaction).
|
|
20
|
+
- 👁️ **Acts without being asked** — surveys your work every few minutes, builds the surface you needed before you knew you did.
|
|
21
|
+
- 🛠️ **Builds tools on the spot** — ask for any widget, dashboard, tracker, automation. TITAN materializes it. Right then. Yours forever.
|
|
22
|
+
- 🌌 **Infinite Spaces** — workspaces you create on demand, each shaped around what you're doing.
|
|
23
|
+
- 🪞 **Learns YOU specifically** — six months in, your TITAN is irreplaceable, because nobody else's TITAN knows you the same way.
|
|
24
|
+
|
|
25
|
+
The transmission resumes when it lands.
|
|
26
|
+
|
|
27
|
+
📡 Watch this space. 🔥
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
6
31
|
# TITAN 5.5 — "Spacewalk" 🚀
|
|
7
32
|
|
|
8
33
|
<p align="center">
|
package/dist/agent/agentLoop.js
CHANGED
|
@@ -12,7 +12,7 @@ import { updateIssue, startRun, endRun, addIssueComment, recordSpend } from "./c
|
|
|
12
12
|
import { recordTokenUsage, routeModel } from "./costOptimizer.js";
|
|
13
13
|
import { calculateActualCost } from "./costEstimator.js";
|
|
14
14
|
import { getSessionGoal } from "./autonomyContext.js";
|
|
15
|
-
import { initBudget, checkBudget, recordUsage, markExceeded, cleanupBudget, getDefaultBudget } from "./promptBudget.js";
|
|
15
|
+
import { initBudget, checkBudget, recordUsage, markExceeded, cleanupBudget, getDefaultBudget, resetBudgetUsage } from "./promptBudget.js";
|
|
16
16
|
import { scanForSecrets } from "../security/secretGuard.js";
|
|
17
17
|
import { fullExfilScan } from "../security/exfilScan.js";
|
|
18
18
|
import { runShellHooks } from "../hooks/shellHooks.js";
|
|
@@ -644,12 +644,20 @@ Try a COMPLETELY DIFFERENT strategy. Do NOT repeat the same tools or approach.`
|
|
|
644
644
|
if (round === 0 && phase === "think" && !ctx.isAutonomous && !ctx.taskEnforcementActive && ctx.activeTools.length > 0 && detectToolUseIntent(ctx.message || "")) {
|
|
645
645
|
logger.info(COMPONENT, "[ExplicitIntent] User explicitly requested tool use \u2014 forcing tool_choice=required for round 1");
|
|
646
646
|
}
|
|
647
|
-
const
|
|
648
|
-
if (
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
647
|
+
const budgetCheck = budgetConfig.maxTokens > 0 ? checkBudget(ctx.sessionId, budgetConfig) : null;
|
|
648
|
+
if (budgetCheck) {
|
|
649
|
+
if (budgetCheck.action === "compress") {
|
|
650
|
+
const before = ctx.messages.length;
|
|
651
|
+
const compressed = buildSmartContext(ctx.messages, Math.floor(budgetConfig.maxTokens * 0.6));
|
|
652
|
+
ctx.messages = compressed;
|
|
653
|
+
resetBudgetUsage(ctx.sessionId);
|
|
654
|
+
logger.info(COMPONENT, `[Budget] Compressed context: ${before} \u2192 ${compressed.length} messages, budget reset`);
|
|
655
|
+
} else {
|
|
656
|
+
markExceeded(ctx.sessionId);
|
|
657
|
+
result.content = `\u26A0\uFE0F ${budgetCheck.message}`;
|
|
658
|
+
phase = "done";
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
653
661
|
}
|
|
654
662
|
let response;
|
|
655
663
|
const thinkStart = Date.now();
|
|
@@ -1403,12 +1411,20 @@ Examples: use read_file instead of cat/head/tail/grep, and edit_file instead of
|
|
|
1403
1411
|
break;
|
|
1404
1412
|
}
|
|
1405
1413
|
logger.info(COMPONENT, `Respond phase \u2014 calling LLM without tools to generate final answer`);
|
|
1406
|
-
const
|
|
1407
|
-
if (
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1414
|
+
const respondBudgetCheck = budgetConfig.maxTokens > 0 ? checkBudget(ctx.sessionId, budgetConfig) : null;
|
|
1415
|
+
if (respondBudgetCheck) {
|
|
1416
|
+
if (respondBudgetCheck.action === "compress") {
|
|
1417
|
+
const before = ctx.messages.length;
|
|
1418
|
+
const compressed = buildSmartContext(ctx.messages, Math.floor(budgetConfig.maxTokens * 0.6));
|
|
1419
|
+
ctx.messages = compressed;
|
|
1420
|
+
resetBudgetUsage(ctx.sessionId);
|
|
1421
|
+
logger.info(COMPONENT, `[Budget] Respond-phase compressed: ${before} \u2192 ${compressed.length} messages`);
|
|
1422
|
+
} else {
|
|
1423
|
+
markExceeded(ctx.sessionId);
|
|
1424
|
+
result.content = `\u26A0\uFE0F ${respondBudgetCheck.message}`;
|
|
1425
|
+
phase = "done";
|
|
1426
|
+
break;
|
|
1427
|
+
}
|
|
1412
1428
|
}
|
|
1413
1429
|
let smartMessages;
|
|
1414
1430
|
if (ctx.voiceFastPath) {
|