@integrity-labs/agt-cli 0.28.434 → 0.28.436
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/dist/bin/agt.js +4 -4
- package/dist/{chunk-CDF3NQLR.js → chunk-DT6YHTVR.js} +3 -3
- package/dist/{chunk-TTEKDLQ7.js → chunk-IRFNOPFU.js} +93 -48
- package/dist/chunk-IRFNOPFU.js.map +1 -0
- package/dist/{claude-pair-runtime-S4BYKFKG.js → claude-pair-runtime-SZVGJMGJ.js} +2 -2
- package/dist/lib/manager-worker.js +330 -266
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +26 -8
- package/dist/mcp/origami.js +26 -8
- package/dist/mcp/slack-channel.js +26 -8
- package/dist/mcp/telegram-channel.js +26 -8
- package/dist/{persistent-session-FWCSJ7ZQ.js → persistent-session-W7T5YOS6.js} +2 -2
- package/dist/{responsiveness-probe-44JJ7O7D.js → responsiveness-probe-3NKR4QOX.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-TTEKDLQ7.js.map +0 -1
- /package/dist/{chunk-CDF3NQLR.js.map → chunk-DT6YHTVR.js.map} +0 -0
- /package/dist/{claude-pair-runtime-S4BYKFKG.js.map → claude-pair-runtime-SZVGJMGJ.js.map} +0 -0
- /package/dist/{persistent-session-FWCSJ7ZQ.js.map → persistent-session-W7T5YOS6.js.map} +0 -0
- /package/dist/{responsiveness-probe-44JJ7O7D.js.map → responsiveness-probe-3NKR4QOX.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-DT6YHTVR.js";
|
|
44
44
|
import {
|
|
45
45
|
AnchorSessionClient,
|
|
46
46
|
CHANNEL_REGISTRY,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
requiredMcpWildcard,
|
|
72
72
|
resolveChannels,
|
|
73
73
|
serializeManifestForSlackCli
|
|
74
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-IRFNOPFU.js";
|
|
75
75
|
import "../chunk-XWVM4KPK.js";
|
|
76
76
|
|
|
77
77
|
// src/bin/agt.ts
|
|
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4830
4830
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4831
4831
|
import chalk18 from "chalk";
|
|
4832
4832
|
import ora16 from "ora";
|
|
4833
|
-
var cliVersion = true ? "0.28.
|
|
4833
|
+
var cliVersion = true ? "0.28.436" : "dev";
|
|
4834
4834
|
async function fetchLatestVersion() {
|
|
4835
4835
|
const host2 = getHost();
|
|
4836
4836
|
if (!host2) return null;
|
|
@@ -6002,7 +6002,7 @@ function handleError(err) {
|
|
|
6002
6002
|
}
|
|
6003
6003
|
|
|
6004
6004
|
// src/bin/agt.ts
|
|
6005
|
-
var cliVersion2 = true ? "0.28.
|
|
6005
|
+
var cliVersion2 = true ? "0.28.436" : "dev";
|
|
6006
6006
|
var program = new Command();
|
|
6007
6007
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
6008
6008
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
resolveConnectivityProbe,
|
|
30
30
|
worseConnectivityOutcome,
|
|
31
31
|
wrapScheduledTaskPrompt
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-IRFNOPFU.js";
|
|
33
33
|
import {
|
|
34
34
|
parsePsRows
|
|
35
35
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -4901,7 +4901,7 @@ function requireHost() {
|
|
|
4901
4901
|
}
|
|
4902
4902
|
|
|
4903
4903
|
// src/lib/api-client.ts
|
|
4904
|
-
var agtCliVersion = true ? "0.28.
|
|
4904
|
+
var agtCliVersion = true ? "0.28.436" : "dev";
|
|
4905
4905
|
var lastConfigHash = null;
|
|
4906
4906
|
function setConfigHash(hash) {
|
|
4907
4907
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -7402,4 +7402,4 @@ export {
|
|
|
7402
7402
|
managerInstallSystemUnitCommand,
|
|
7403
7403
|
managerUninstallSystemUnitCommand
|
|
7404
7404
|
};
|
|
7405
|
-
//# sourceMappingURL=chunk-
|
|
7405
|
+
//# sourceMappingURL=chunk-DT6YHTVR.js.map
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/lib/persistent-session.ts
|
|
6
6
|
import { spawn as spawn2, execSync as execSync2, execFileSync as execFileSync3 } from "child_process";
|
|
7
|
-
import { join as
|
|
8
|
-
import { homedir as
|
|
9
|
-
import { existsSync as existsSync6, readFileSync as readFileSync7, readdirSync as readdirSync3, writeFileSync as
|
|
7
|
+
import { join as join6, dirname as dirname3 } from "path";
|
|
8
|
+
import { homedir as homedir6, platform, userInfo as userInfo2 } from "os";
|
|
9
|
+
import { existsSync as existsSync6, readFileSync as readFileSync7, readdirSync as readdirSync3, writeFileSync as writeFileSync6, appendFileSync as appendFileSync2, mkdirSync as mkdirSync6, chmodSync as chmodSync3, copyFileSync, rmSync as rmSync4 } from "fs";
|
|
10
10
|
|
|
11
11
|
// src/lib/mcp-sanitize.ts
|
|
12
12
|
import { readFileSync, writeFileSync } from "fs";
|
|
@@ -6918,16 +6918,27 @@ var INTEGRATION_REGISTRY = [
|
|
|
6918
6918
|
// Premium (billable). The upstream pay-per-event cost is per-Actor and
|
|
6919
6919
|
// VARIABLE (each Actor's creator sets its own event prices), unlike X-Search's
|
|
6920
6920
|
// fixed per-post price. So we meter the ACTUAL cost charged to us for each
|
|
6921
|
-
// run, as a pass-through: `units` = the run's `usageTotalUsd` in
|
|
6922
|
-
//
|
|
6923
|
-
// a managed markup (1.5x
|
|
6924
|
-
//
|
|
6921
|
+
// run, as a pass-through: `units` = the run's `usageTotalUsd` in US dollars
|
|
6922
|
+
// (the physical unit `usd`), and the rate card prices each of those dollars at
|
|
6923
|
+
// a managed markup (1.5x). This keeps margin safe across cheap and expensive
|
|
6924
|
+
// scrapes alike. `event_type` must match what the broker writes to
|
|
6925
6925
|
// integration_usage_events. Until the rate row is seeded a run prices at 0
|
|
6926
6926
|
// (budget gate inert) - the rate-card migration ships in the same PR.
|
|
6927
|
+
//
|
|
6928
|
+
// The unit is US DOLLARS, not cents. Metering in cents priced the meter at
|
|
6929
|
+
// A$0.0225/unit, which rendered to the customer as "Actor Run (per usd_cent):
|
|
6930
|
+
// A$0.02" - jargon, and rounded 11% below the real rate because the shared
|
|
6931
|
+
// formatter only widens past 2dp below A$0.01. Per-dollar gives a whole-cent
|
|
6932
|
+
// price and a line a customer can reason about; the money billed is identical.
|
|
6927
6933
|
premium: {
|
|
6928
6934
|
pricing: "usage",
|
|
6929
|
-
note: "Billed
|
|
6930
|
-
meters: [{
|
|
6935
|
+
note: "Billed on the upstream pay-per-event cost of each scrape, at a managed markup. A 50-post TikTok scrape costs about A$0.19.",
|
|
6936
|
+
meters: [{
|
|
6937
|
+
event_type: "actor_run",
|
|
6938
|
+
unit: "usd",
|
|
6939
|
+
label: "Scraping usage",
|
|
6940
|
+
unit_label: "US$1 of scraping cost"
|
|
6941
|
+
}]
|
|
6931
6942
|
}
|
|
6932
6943
|
},
|
|
6933
6944
|
{
|
|
@@ -6950,10 +6961,17 @@ var INTEGRATION_REGISTRY = [
|
|
|
6950
6961
|
],
|
|
6951
6962
|
docs_url: "https://docs.apify.com/api/v2",
|
|
6952
6963
|
beta: true,
|
|
6964
|
+
// Same cost pass-through metering as Social Scraping - see the note there for
|
|
6965
|
+
// why the unit is US dollars rather than cents.
|
|
6953
6966
|
premium: {
|
|
6954
6967
|
pricing: "usage",
|
|
6955
|
-
note: "Billed
|
|
6956
|
-
meters: [{
|
|
6968
|
+
note: "Billed on the upstream pay-per-event cost of each search, at a managed markup. A 20-place search costs about A$0.07.",
|
|
6969
|
+
meters: [{
|
|
6970
|
+
event_type: "actor_run",
|
|
6971
|
+
unit: "usd",
|
|
6972
|
+
label: "Search usage",
|
|
6973
|
+
unit_label: "US$1 of search cost"
|
|
6974
|
+
}]
|
|
6957
6975
|
}
|
|
6958
6976
|
},
|
|
6959
6977
|
{
|
|
@@ -11817,8 +11835,8 @@ function stopTranscriptRefresher(codeName) {
|
|
|
11817
11835
|
transcriptTimers.delete(codeName);
|
|
11818
11836
|
}
|
|
11819
11837
|
}
|
|
11820
|
-
function readProvisionedOpencodeModel(
|
|
11821
|
-
return readOpencodeModelString(join3(
|
|
11838
|
+
function readProvisionedOpencodeModel(agentDir3) {
|
|
11839
|
+
return readOpencodeModelString(join3(agentDir3, "provision", "opencode.json"));
|
|
11822
11840
|
}
|
|
11823
11841
|
function readOpencodeModelString(configPath2) {
|
|
11824
11842
|
try {
|
|
@@ -12756,13 +12774,39 @@ function creditWatchdogGiveUpCount(codeName, count) {
|
|
|
12756
12774
|
giveUpCounts.set(codeName, (giveUpCounts.get(codeName) ?? 0) + count);
|
|
12757
12775
|
}
|
|
12758
12776
|
|
|
12777
|
+
// src/lib/usage-limit-marker-file.ts
|
|
12778
|
+
import { mkdirSync as mkdirSync5, rmSync as rmSync3, writeFileSync as writeFileSync5 } from "fs";
|
|
12779
|
+
import { homedir as homedir5 } from "os";
|
|
12780
|
+
import { join as join5 } from "path";
|
|
12781
|
+
function agentDir2(codeName) {
|
|
12782
|
+
return join5(homedir5(), ".augmented", codeName);
|
|
12783
|
+
}
|
|
12784
|
+
function usageLimitMarkerPath(codeName) {
|
|
12785
|
+
return join5(agentDir2(codeName), USAGE_LIMIT_MARKER_FILENAME);
|
|
12786
|
+
}
|
|
12787
|
+
function writeUsageLimitMarker(codeName, limitedUntil, log2) {
|
|
12788
|
+
try {
|
|
12789
|
+
mkdirSync5(agentDir2(codeName), { recursive: true });
|
|
12790
|
+
writeFileSync5(usageLimitMarkerPath(codeName), serializeUsageLimitMarker(limitedUntil), "utf-8");
|
|
12791
|
+
} catch (err) {
|
|
12792
|
+
log2(`[usage-banner] usage-limit marker sync failed for '${codeName}': ${err.message}`);
|
|
12793
|
+
}
|
|
12794
|
+
}
|
|
12795
|
+
function clearUsageLimitMarker(codeName, log2) {
|
|
12796
|
+
try {
|
|
12797
|
+
rmSync3(usageLimitMarkerPath(codeName), { force: true });
|
|
12798
|
+
} catch (err) {
|
|
12799
|
+
log2(`[usage-banner] usage-limit marker clear failed for '${codeName}': ${err.message}`);
|
|
12800
|
+
}
|
|
12801
|
+
}
|
|
12802
|
+
|
|
12759
12803
|
// src/lib/persistent-session.ts
|
|
12760
12804
|
var OPENROUTER_ANTHROPIC_BASE_URL = "https://openrouter.ai/api";
|
|
12761
12805
|
function syncClaudeCredsToRoot() {
|
|
12762
12806
|
if (platform() !== "linux") return true;
|
|
12763
12807
|
if (typeof process.getuid !== "function" || process.getuid() !== 0) return true;
|
|
12764
12808
|
for (const filename of [".credentials.json", "credentials.json"]) {
|
|
12765
|
-
if (existsSync6(
|
|
12809
|
+
if (existsSync6(join6("/root/.claude", filename))) return true;
|
|
12766
12810
|
}
|
|
12767
12811
|
let sourcePath = null;
|
|
12768
12812
|
try {
|
|
@@ -12770,7 +12814,7 @@ function syncClaudeCredsToRoot() {
|
|
|
12770
12814
|
outer: for (const entry of entries) {
|
|
12771
12815
|
if (!entry.isDirectory()) continue;
|
|
12772
12816
|
for (const filename of [".credentials.json", "credentials.json"]) {
|
|
12773
|
-
const candidate =
|
|
12817
|
+
const candidate = join6("/home", entry.name, ".claude", filename);
|
|
12774
12818
|
if (existsSync6(candidate)) {
|
|
12775
12819
|
sourcePath = candidate;
|
|
12776
12820
|
break outer;
|
|
@@ -12782,9 +12826,9 @@ function syncClaudeCredsToRoot() {
|
|
|
12782
12826
|
if (!sourcePath) return false;
|
|
12783
12827
|
const targetDir = "/root/.claude";
|
|
12784
12828
|
const sourceFilename = sourcePath.endsWith("credentials.json") && !sourcePath.endsWith(".credentials.json") ? "credentials.json" : ".credentials.json";
|
|
12785
|
-
const targetPath =
|
|
12829
|
+
const targetPath = join6(targetDir, sourceFilename);
|
|
12786
12830
|
try {
|
|
12787
|
-
if (!existsSync6(targetDir))
|
|
12831
|
+
if (!existsSync6(targetDir)) mkdirSync6(targetDir, { recursive: true, mode: 448 });
|
|
12788
12832
|
copyFileSync(sourcePath, targetPath);
|
|
12789
12833
|
chmodSync3(targetPath, 384);
|
|
12790
12834
|
return true;
|
|
@@ -12861,13 +12905,13 @@ function buildEgressAllowlist(toolsFrontmatter) {
|
|
|
12861
12905
|
return [...domains].sort();
|
|
12862
12906
|
}
|
|
12863
12907
|
function egressAllowlistHostPath(codeName, homeDir) {
|
|
12864
|
-
const home = homeDir ?? (process.env.HOME?.trim() ||
|
|
12865
|
-
return
|
|
12908
|
+
const home = homeDir ?? (process.env.HOME?.trim() || homedir6());
|
|
12909
|
+
return join6(home, ".augmented", "_egress", `${codeName}.txt`);
|
|
12866
12910
|
}
|
|
12867
12911
|
function writeEgressAllowlist(codeName, domains, homeDir) {
|
|
12868
12912
|
const p2 = egressAllowlistHostPath(codeName, homeDir);
|
|
12869
|
-
|
|
12870
|
-
|
|
12913
|
+
mkdirSync6(dirname3(p2), { recursive: true });
|
|
12914
|
+
writeFileSync6(p2, domains.join("\n") + "\n", { mode: 420 });
|
|
12871
12915
|
return p2;
|
|
12872
12916
|
}
|
|
12873
12917
|
var EGRESS_DOCKER_TIMEOUT_MS = 1e4;
|
|
@@ -12903,13 +12947,13 @@ function restartEgressSidecar(codeName) {
|
|
|
12903
12947
|
function buildDockerRunCommand(args) {
|
|
12904
12948
|
const { codeName, agentId, wrapperPath, projectDir, homeDir, runId, passApiKey, passOpenRouter, egress, forwardSlackReplyBinding, forwardBlockTurnEndAllMarkers, forwardKanbanWaiting, forwardNotifyDispatch } = args;
|
|
12905
12949
|
const q = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
|
|
12906
|
-
const
|
|
12907
|
-
const agentIdDir =
|
|
12908
|
-
const mcpDir =
|
|
12909
|
-
const claudeHome =
|
|
12910
|
-
const claudeJson =
|
|
12950
|
+
const agentDir3 = join6(homeDir, ".augmented", codeName);
|
|
12951
|
+
const agentIdDir = join6(homeDir, ".augmented", agentId);
|
|
12952
|
+
const mcpDir = join6(homeDir, ".augmented", "_mcp");
|
|
12953
|
+
const claudeHome = join6(homeDir, ".claude");
|
|
12954
|
+
const claudeJson = join6(homeDir, ".claude.json");
|
|
12911
12955
|
const mounts = [
|
|
12912
|
-
`-v ${q(`${
|
|
12956
|
+
`-v ${q(`${agentDir3}:${agentDir3}`)}`,
|
|
12913
12957
|
`-v ${q(`${agentIdDir}:${agentIdDir}`)}`,
|
|
12914
12958
|
`-v ${q(`${mcpDir}:${mcpDir}:ro`)}`,
|
|
12915
12959
|
`-v ${q(`${claudeHome}:${claudeHome}`)}`,
|
|
@@ -12920,7 +12964,7 @@ function buildDockerRunCommand(args) {
|
|
|
12920
12964
|
const cpus = process.env.AGT_ISOLATION_CPUS || "1.0";
|
|
12921
12965
|
const pids = process.env.AGT_ISOLATION_PIDS || "512";
|
|
12922
12966
|
const envArgs = [`-e ${q(`HOME=${homeDir}`)}`];
|
|
12923
|
-
envArgs.push(`-e ${q(`npm_config_cache=${
|
|
12967
|
+
envArgs.push(`-e ${q(`npm_config_cache=${join6(agentDir3, ".npm-cache")}`)}`);
|
|
12924
12968
|
if (passApiKey) envArgs.push("-e ANTHROPIC_API_KEY");
|
|
12925
12969
|
if (passOpenRouter) {
|
|
12926
12970
|
envArgs.push("-e ANTHROPIC_BASE_URL");
|
|
@@ -12987,8 +13031,8 @@ function buildDockerRunCommand(args) {
|
|
|
12987
13031
|
}
|
|
12988
13032
|
function writePersistentClaudeWrapper(args) {
|
|
12989
13033
|
const { projectDir, claudeBin, initPrompt, claudeArgsJoined } = args;
|
|
12990
|
-
const envIntegrationsPath =
|
|
12991
|
-
const wrapperPath =
|
|
13034
|
+
const envIntegrationsPath = join6(projectDir, ".env.integrations");
|
|
13035
|
+
const wrapperPath = join6(projectDir, ".claude", "persistent-claude.sh");
|
|
12992
13036
|
const wrapperLines = [
|
|
12993
13037
|
"#!/usr/bin/env bash",
|
|
12994
13038
|
"set -e",
|
|
@@ -13007,8 +13051,8 @@ function writePersistentClaudeWrapper(args) {
|
|
|
13007
13051
|
wrapperLines.push(
|
|
13008
13052
|
`exec ${JSON.stringify(claudeBin)} ${initPromptArg}${claudeArgsJoined}`
|
|
13009
13053
|
);
|
|
13010
|
-
|
|
13011
|
-
|
|
13054
|
+
mkdirSync6(join6(projectDir, ".claude"), { recursive: true });
|
|
13055
|
+
writeFileSync6(wrapperPath, wrapperLines.join("\n") + "\n", { mode: 448 });
|
|
13012
13056
|
chmodSync3(wrapperPath, 448);
|
|
13013
13057
|
return wrapperPath;
|
|
13014
13058
|
}
|
|
@@ -13023,15 +13067,15 @@ function collectMcpServerNames(mcpConfigPath) {
|
|
|
13023
13067
|
}
|
|
13024
13068
|
}
|
|
13025
13069
|
var sessions2 = /* @__PURE__ */ new Map();
|
|
13026
|
-
var PANE_LOG_DIR =
|
|
13070
|
+
var PANE_LOG_DIR = join6(homedir6(), ".augmented");
|
|
13027
13071
|
var PANE_TAIL_LINES = 20;
|
|
13028
13072
|
function paneLogPath(codeName) {
|
|
13029
|
-
return
|
|
13073
|
+
return join6(PANE_LOG_DIR, codeName, "pane.log");
|
|
13030
13074
|
}
|
|
13031
13075
|
function setupPaneLog2(tmuxSession, codeName, log2) {
|
|
13032
13076
|
const logPath = paneLogPath(codeName);
|
|
13033
13077
|
try {
|
|
13034
|
-
|
|
13078
|
+
mkdirSync6(dirname3(logPath), { recursive: true });
|
|
13035
13079
|
appendFileSync2(
|
|
13036
13080
|
logPath,
|
|
13037
13081
|
`
|
|
@@ -13122,7 +13166,7 @@ function resolveSessionSpawnDecision(args) {
|
|
|
13122
13166
|
};
|
|
13123
13167
|
}
|
|
13124
13168
|
function directChatSessionStatePath(agentId) {
|
|
13125
|
-
return
|
|
13169
|
+
return join6(homedir6(), ".augmented", agentId, "direct-chat-session.json");
|
|
13126
13170
|
}
|
|
13127
13171
|
function readDirectChatSessionState(agentId) {
|
|
13128
13172
|
try {
|
|
@@ -13137,8 +13181,8 @@ function readDirectChatSessionState(agentId) {
|
|
|
13137
13181
|
}
|
|
13138
13182
|
function writeDirectChatSessionState(agentId, state) {
|
|
13139
13183
|
const p2 = directChatSessionStatePath(agentId);
|
|
13140
|
-
|
|
13141
|
-
|
|
13184
|
+
mkdirSync6(dirname3(p2), { recursive: true });
|
|
13185
|
+
writeFileSync6(p2, JSON.stringify(state));
|
|
13142
13186
|
}
|
|
13143
13187
|
function startPersistentSession(config) {
|
|
13144
13188
|
const existing = sessions2.get(config.codeName);
|
|
@@ -13194,12 +13238,12 @@ function spawnSession(config, session) {
|
|
|
13194
13238
|
log2(`[persistent-session] No Claude Code credentials found under /root/.claude or /home/*. Pair via browser from the host page, or run 'claude /login' on the host.`);
|
|
13195
13239
|
}
|
|
13196
13240
|
} else {
|
|
13197
|
-
const claudeDir =
|
|
13241
|
+
const claudeDir = join6(homedir6(), ".claude");
|
|
13198
13242
|
for (const filename of [".credentials.json", "credentials.json"]) {
|
|
13199
|
-
const p2 =
|
|
13243
|
+
const p2 = join6(claudeDir, filename);
|
|
13200
13244
|
if (existsSync6(p2)) {
|
|
13201
13245
|
try {
|
|
13202
|
-
|
|
13246
|
+
rmSync4(p2, { force: true });
|
|
13203
13247
|
log2(`[persistent-session] Removed ${p2} (api_key mode active \u2014 preventing OAuth fallback)`);
|
|
13204
13248
|
} catch {
|
|
13205
13249
|
}
|
|
@@ -13291,7 +13335,7 @@ function spawnSession(config, session) {
|
|
|
13291
13335
|
if (config.notifyDispatchMode && config.notifyDispatchMode !== "off" && !process.env["AGT_NOTIFY_DISPATCH"]) {
|
|
13292
13336
|
tmuxSessionEnvArgs.push("-e", `AGT_NOTIFY_DISPATCH=${config.notifyDispatchMode}`);
|
|
13293
13337
|
}
|
|
13294
|
-
const sessionHomeDir = process.env.HOME?.trim() ||
|
|
13338
|
+
const sessionHomeDir = process.env.HOME?.trim() || homedir6();
|
|
13295
13339
|
let egress;
|
|
13296
13340
|
if (egressMode(codeName) === "allowlist") {
|
|
13297
13341
|
const allowlist = config.egressAllowlist ?? buildEgressAllowlist(null);
|
|
@@ -13330,7 +13374,7 @@ function spawnSession(config, session) {
|
|
|
13330
13374
|
// Treat empty-string as missing too — `HOME=""` makes ~ resolve
|
|
13331
13375
|
// to cwd, which is the same broken outcome as no HOME, just
|
|
13332
13376
|
// better hidden.
|
|
13333
|
-
HOME: process.env.HOME?.trim() ||
|
|
13377
|
+
HOME: process.env.HOME?.trim() || homedir6(),
|
|
13334
13378
|
USER: process.env.USER?.trim() || userInfo2().username
|
|
13335
13379
|
};
|
|
13336
13380
|
if (config.runId) {
|
|
@@ -13354,7 +13398,7 @@ function spawnSession(config, session) {
|
|
|
13354
13398
|
} : { ...tmuxEnv, ...apiKeyEnv, ...openRouterEnv };
|
|
13355
13399
|
for (const f of probeMcpEnvSubstitution({
|
|
13356
13400
|
mcpConfigPath,
|
|
13357
|
-
envIntegrationsPath:
|
|
13401
|
+
envIntegrationsPath: join6(projectDir, ".env.integrations"),
|
|
13358
13402
|
baseEnv: probeBaseEnv
|
|
13359
13403
|
})) {
|
|
13360
13404
|
log2(`[persistent-session] ${formatMissingVar(f)} agent=${codeName}`);
|
|
@@ -13383,6 +13427,7 @@ function spawnSession(config, session) {
|
|
|
13383
13427
|
}
|
|
13384
13428
|
log2(`[persistent-session] tmux session '${tmuxSession}' created for '${codeName}'`);
|
|
13385
13429
|
setupPaneLog2(tmuxSession, codeName, log2);
|
|
13430
|
+
clearUsageLimitMarker(codeName, log2);
|
|
13386
13431
|
session.currentSessionId = sessionId;
|
|
13387
13432
|
acceptDialogs(tmuxSession, codeName, log2, config.primaryModel ?? null, sessionId).catch(() => {
|
|
13388
13433
|
});
|
|
@@ -13912,7 +13957,7 @@ async function stopAllSessionsAndWait(log2, opts) {
|
|
|
13912
13957
|
await new Promise((resolve) => setTimeout(resolve, Math.min(opts.timeoutMs, 2e3)));
|
|
13913
13958
|
}
|
|
13914
13959
|
function getProjectDir(codeName) {
|
|
13915
|
-
return
|
|
13960
|
+
return join6(homedir6(), ".augmented", codeName, "project");
|
|
13916
13961
|
}
|
|
13917
13962
|
|
|
13918
13963
|
export {
|
|
@@ -13999,8 +14044,6 @@ export {
|
|
|
13999
14044
|
sumTranscriptUsageInWindow,
|
|
14000
14045
|
isEmptyTotals,
|
|
14001
14046
|
attributeTranscriptUsageByRun,
|
|
14002
|
-
USAGE_LIMIT_MARKER_FILENAME,
|
|
14003
|
-
serializeUsageLimitMarker,
|
|
14004
14047
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
14005
14048
|
serializeAccountEnforcementMarker,
|
|
14006
14049
|
KANBAN_CHECK_COMMAND,
|
|
@@ -14043,6 +14086,8 @@ export {
|
|
|
14043
14086
|
checkChannelInputs,
|
|
14044
14087
|
takeWatchdogGiveUpCount,
|
|
14045
14088
|
creditWatchdogGiveUpCount,
|
|
14089
|
+
writeUsageLimitMarker,
|
|
14090
|
+
clearUsageLimitMarker,
|
|
14046
14091
|
resolveOAuthCredAction,
|
|
14047
14092
|
resolveClaudeBinary,
|
|
14048
14093
|
isolationMode,
|
|
@@ -14081,4 +14126,4 @@ export {
|
|
|
14081
14126
|
stopAllSessionsAndWait,
|
|
14082
14127
|
getProjectDir
|
|
14083
14128
|
};
|
|
14084
|
-
//# sourceMappingURL=chunk-
|
|
14129
|
+
//# sourceMappingURL=chunk-IRFNOPFU.js.map
|