@integrity-labs/agt-cli 0.28.747 → 0.28.749
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 +5 -5
- package/dist/{chunk-R35LZDRH.js → chunk-3LQYVRKX.js} +2 -2
- package/dist/{chunk-62TAD4HO.js → chunk-DFOBTAPL.js} +161 -2
- package/dist/chunk-DFOBTAPL.js.map +1 -0
- package/dist/{chunk-OYASDDR4.js → chunk-WTBSFYTA.js} +4 -4
- package/dist/{claude-pair-runtime-REZ462KO.js → claude-pair-runtime-QOHDIQBD.js} +2 -2
- package/dist/lib/manager-worker.js +106 -20
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-V6L4Y2P5.js → persistent-session-VX5THUBN.js} +3 -3
- package/dist/{responsiveness-probe-RDF5NWRH.js → responsiveness-probe-PMH4Z3MU.js} +3 -3
- package/dist/{session-auth-dead-KOCHZPYI.js → session-auth-dead-3FTENJFF.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-62TAD4HO.js.map +0 -1
- /package/dist/{chunk-R35LZDRH.js.map → chunk-3LQYVRKX.js.map} +0 -0
- /package/dist/{chunk-OYASDDR4.js.map → chunk-WTBSFYTA.js.map} +0 -0
- /package/dist/{claude-pair-runtime-REZ462KO.js.map → claude-pair-runtime-QOHDIQBD.js.map} +0 -0
- /package/dist/{persistent-session-V6L4Y2P5.js.map → persistent-session-VX5THUBN.js.map} +0 -0
- /package/dist/{responsiveness-probe-RDF5NWRH.js.map → responsiveness-probe-PMH4Z3MU.js.map} +0 -0
- /package/dist/{session-auth-dead-KOCHZPYI.js.map → session-auth-dead-3FTENJFF.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -41,12 +41,12 @@ import {
|
|
|
41
41
|
success,
|
|
42
42
|
table,
|
|
43
43
|
warn
|
|
44
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-WTBSFYTA.js";
|
|
45
45
|
import {
|
|
46
46
|
getProjectDir,
|
|
47
47
|
isSessionResumeDisabled,
|
|
48
48
|
readDirectChatSessionState
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-3LQYVRKX.js";
|
|
50
50
|
import {
|
|
51
51
|
AnchorSessionClient,
|
|
52
52
|
CHANNEL_REGISTRY,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
serializeManifestForSlackCli,
|
|
80
80
|
sessionFileExists,
|
|
81
81
|
sessionTranscriptDir
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-DFOBTAPL.js";
|
|
83
83
|
import "../chunk-XWVM4KPK.js";
|
|
84
84
|
|
|
85
85
|
// src/bin/agt.ts
|
|
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5467
5467
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5468
5468
|
import chalk18 from "chalk";
|
|
5469
5469
|
import ora16 from "ora";
|
|
5470
|
-
var cliVersion = true ? "0.28.
|
|
5470
|
+
var cliVersion = true ? "0.28.749" : "dev";
|
|
5471
5471
|
async function fetchLatestVersion() {
|
|
5472
5472
|
const host2 = getHost();
|
|
5473
5473
|
if (!host2) return null;
|
|
@@ -6654,7 +6654,7 @@ function handleError(err) {
|
|
|
6654
6654
|
}
|
|
6655
6655
|
|
|
6656
6656
|
// src/bin/agt.ts
|
|
6657
|
-
var cliVersion2 = true ? "0.28.
|
|
6657
|
+
var cliVersion2 = true ? "0.28.749" : "dev";
|
|
6658
6658
|
var program = new Command();
|
|
6659
6659
|
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");
|
|
6660
6660
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
rotateDailySession,
|
|
18
18
|
sessionFileExists,
|
|
19
19
|
todayLocalIso
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DFOBTAPL.js";
|
|
21
21
|
import {
|
|
22
22
|
reapOrphanChannelMcps
|
|
23
23
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -4929,4 +4929,4 @@ export {
|
|
|
4929
4929
|
stopAllSessionsAndWait,
|
|
4930
4930
|
getProjectDir
|
|
4931
4931
|
};
|
|
4932
|
-
//# sourceMappingURL=chunk-
|
|
4932
|
+
//# sourceMappingURL=chunk-3LQYVRKX.js.map
|
|
@@ -77,6 +77,161 @@ function resolveAvatarEnvUrl(raw) {
|
|
|
77
77
|
// ../../packages/core/dist/provisioning/platform-storage.js
|
|
78
78
|
var PLATFORM_STORAGE_RULE = "Store durable, reusable work you build (repeatable procedures, recurring responsibilities, scheduled automation, orchestration scripts) through the Augmented Team platform tools, never as loose local files, unless the user explicitly requests a different destination. Platform artifacts are versioned, reviewable, and survive re-provisioning; loose local files are wiped on the next provision rebuild, reach no one else, and bypass review. Ephemeral scratch files for the task at hand are fine on disk.";
|
|
79
79
|
|
|
80
|
+
// ../../packages/core/dist/memory/identifier-capture.js
|
|
81
|
+
var URL_RE = /\bhttps?:\/\/[^\s<>"'`]+/gi;
|
|
82
|
+
var TRAILING_PUNCT = /* @__PURE__ */ new Set([".", ",", ";", ":", "!", "?", ")", "]", "}", ">", '"', "'", "\u2019", "\u201D"]);
|
|
83
|
+
function trimUrlPunctuation(raw) {
|
|
84
|
+
let out = raw;
|
|
85
|
+
for (; ; ) {
|
|
86
|
+
const last = out.at(-1);
|
|
87
|
+
if (last === void 0 || !TRAILING_PUNCT.has(last))
|
|
88
|
+
return out;
|
|
89
|
+
if (last === ")" && countOf(out, "(") >= countOf(out, ")"))
|
|
90
|
+
return out;
|
|
91
|
+
out = out.slice(0, -1);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function countOf(s, ch) {
|
|
95
|
+
let n = 0;
|
|
96
|
+
for (const c of s)
|
|
97
|
+
if (c === ch)
|
|
98
|
+
n += 1;
|
|
99
|
+
return n;
|
|
100
|
+
}
|
|
101
|
+
function findIdentifierUrls(text) {
|
|
102
|
+
const seen = /* @__PURE__ */ new Set();
|
|
103
|
+
const out = [];
|
|
104
|
+
for (const m of text.matchAll(URL_RE)) {
|
|
105
|
+
const url = trimUrlPunctuation(m[0]);
|
|
106
|
+
if (!url || seen.has(url))
|
|
107
|
+
continue;
|
|
108
|
+
seen.add(url);
|
|
109
|
+
out.push(url);
|
|
110
|
+
}
|
|
111
|
+
return out;
|
|
112
|
+
}
|
|
113
|
+
var SECRET_PARAM_TOKENS = /* @__PURE__ */ new Set([
|
|
114
|
+
"token",
|
|
115
|
+
"password",
|
|
116
|
+
"passwd",
|
|
117
|
+
"pwd",
|
|
118
|
+
"secret",
|
|
119
|
+
"auth",
|
|
120
|
+
"bearer",
|
|
121
|
+
"signature",
|
|
122
|
+
"sig",
|
|
123
|
+
"credential",
|
|
124
|
+
"credentials",
|
|
125
|
+
"session",
|
|
126
|
+
"jwt",
|
|
127
|
+
"apikey",
|
|
128
|
+
// An OAuth authorization code and a one-time passcode are credentials, not
|
|
129
|
+
// identifiers (CodeRabbit). `code` does have benign uses (`?code=US`,
|
|
130
|
+
// `?code=PROMO10`); redacting those costs a query value, whereas persisting a
|
|
131
|
+
// real authorization code into a durable, searchable store is a credential in
|
|
132
|
+
// the memory table. Redaction is the cheaper error.
|
|
133
|
+
"code",
|
|
134
|
+
"otp"
|
|
135
|
+
]);
|
|
136
|
+
var SECRET_PARAM_SUBSTRINGS = ["apikey", "accesstoken", "authtoken", "sessiontoken"];
|
|
137
|
+
var REDACTED_PARAM_VALUE = "redacted";
|
|
138
|
+
function isSecretParamName(name) {
|
|
139
|
+
const n = name.toLowerCase();
|
|
140
|
+
const tokens = n.split(/[^a-z0-9]+/).filter(Boolean);
|
|
141
|
+
if (tokens.some((t) => SECRET_PARAM_TOKENS.has(t)))
|
|
142
|
+
return true;
|
|
143
|
+
return SECRET_PARAM_SUBSTRINGS.some((h) => n.includes(h));
|
|
144
|
+
}
|
|
145
|
+
function scrubUrlSecrets(url) {
|
|
146
|
+
let u;
|
|
147
|
+
try {
|
|
148
|
+
u = new URL(url);
|
|
149
|
+
} catch {
|
|
150
|
+
return url;
|
|
151
|
+
}
|
|
152
|
+
let touched = false;
|
|
153
|
+
if (u.username || u.password) {
|
|
154
|
+
u.username = "";
|
|
155
|
+
u.password = "";
|
|
156
|
+
touched = true;
|
|
157
|
+
}
|
|
158
|
+
for (const key of [...u.searchParams.keys()]) {
|
|
159
|
+
if (isSecretParamName(key)) {
|
|
160
|
+
u.searchParams.set(key, REDACTED_PARAM_VALUE);
|
|
161
|
+
touched = true;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (u.hash.includes("=")) {
|
|
165
|
+
const frag = new URLSearchParams(u.hash.replace(/^#/, ""));
|
|
166
|
+
let fragTouched = false;
|
|
167
|
+
for (const key of [...frag.keys()]) {
|
|
168
|
+
if (isSecretParamName(key)) {
|
|
169
|
+
frag.set(key, REDACTED_PARAM_VALUE);
|
|
170
|
+
fragTouched = true;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (fragTouched) {
|
|
174
|
+
u.hash = `#${frag.toString()}`;
|
|
175
|
+
touched = true;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return touched ? u.toString() : url;
|
|
179
|
+
}
|
|
180
|
+
function scrubPreservingIdentifiers(text, blobPatterns) {
|
|
181
|
+
const spans = [];
|
|
182
|
+
for (const m of text.matchAll(URL_RE)) {
|
|
183
|
+
const trimmed = trimUrlPunctuation(m[0]);
|
|
184
|
+
if (!trimmed)
|
|
185
|
+
continue;
|
|
186
|
+
const start = m.index ?? -1;
|
|
187
|
+
if (start < 0)
|
|
188
|
+
continue;
|
|
189
|
+
spans.push([start, start + trimmed.length]);
|
|
190
|
+
}
|
|
191
|
+
if (spans.length === 0)
|
|
192
|
+
return applyAll(text, blobPatterns);
|
|
193
|
+
let out = "";
|
|
194
|
+
let cursor = 0;
|
|
195
|
+
for (const [start, end] of spans) {
|
|
196
|
+
if (start < cursor)
|
|
197
|
+
continue;
|
|
198
|
+
out += applyAll(text.slice(cursor, start), blobPatterns);
|
|
199
|
+
out += scrubUrlSecrets(text.slice(start, end));
|
|
200
|
+
cursor = end;
|
|
201
|
+
}
|
|
202
|
+
return out + applyAll(text.slice(cursor), blobPatterns);
|
|
203
|
+
}
|
|
204
|
+
function applyAll(text, patterns) {
|
|
205
|
+
let out = text;
|
|
206
|
+
for (const re of patterns)
|
|
207
|
+
out = out.replace(re, "[redacted]");
|
|
208
|
+
return out;
|
|
209
|
+
}
|
|
210
|
+
function fnv1a64(s) {
|
|
211
|
+
const PRIME = 0x100000001b3n;
|
|
212
|
+
const MASK = 0xffffffffffffffffn;
|
|
213
|
+
let h = 0xcbf29ce484222325n;
|
|
214
|
+
for (let i = 0; i < s.length; i += 1) {
|
|
215
|
+
h ^= BigInt(s.charCodeAt(i));
|
|
216
|
+
h = h * PRIME & MASK;
|
|
217
|
+
}
|
|
218
|
+
return h.toString(16).padStart(16, "0");
|
|
219
|
+
}
|
|
220
|
+
var IDENTIFIER_MEMORY_NAME_PREFIX = "link:";
|
|
221
|
+
function identifierMemoryName(url) {
|
|
222
|
+
let host = "";
|
|
223
|
+
try {
|
|
224
|
+
host = new URL(url).host.replace(/^www\./, "");
|
|
225
|
+
} catch {
|
|
226
|
+
host = "link";
|
|
227
|
+
}
|
|
228
|
+
const digest = fnv1a64(url);
|
|
229
|
+
const name = `${IDENTIFIER_MEMORY_NAME_PREFIX} ${host} ${digest}`;
|
|
230
|
+
return name.length <= 80 ? name : `${IDENTIFIER_MEMORY_NAME_PREFIX} ${digest}`;
|
|
231
|
+
}
|
|
232
|
+
var AGENT_IDENTIFIER_RULE = "An identifier the work depends on is never an ephemeral detail: when a message gives you a URL, file, folder, document or ticket id, save the identifier itself, verbatim, before you reply \u2014 as its own short entry, not folded into prose. A note that a link is coming is not a substitute for the link. You can always re-derive a summary; you can never re-derive an identifier without asking the person for it again.";
|
|
233
|
+
var EXTRACTOR_IDENTIFIER_RULE = 'An identifier is ALWAYS durable, and is the one exception to "no one-off task details": if the conversation contains a URL, file, folder, document or ticket id that the work depends on, emit it as a "reference" memory with the identifier copied EXACTLY as it appeared \u2014 never paraphrased, never shortened, never described. Conversation history does not survive a restart, so an identifier that is only described is lost.';
|
|
234
|
+
|
|
80
235
|
// ../../packages/core/dist/provisioning/frameworks/claudecode/identity.js
|
|
81
236
|
var SCRATCH_RETENTION_DAYS = 7;
|
|
82
237
|
var CLAUDE_MD_CHARS_PER_TOKEN = 3.57;
|
|
@@ -121,7 +276,7 @@ context. Two Markdown file types:
|
|
|
121
276
|
**Save** when the user says "remember this", and proactively for decisions,
|
|
122
277
|
preferences, non-obvious conventions, corrections to your approach, and important
|
|
123
278
|
outcomes. **Don't save** what's derivable from the codebase or git history,
|
|
124
|
-
ephemeral task details, or anything already in CHARTER.md / TOOLS.md.
|
|
279
|
+
ephemeral task details, or anything already in CHARTER.md / TOOLS.md. ${AGENT_IDENTIFIER_RULE}
|
|
125
280
|
|
|
126
281
|
**Writing:** append to the daily log (create if missing); update \`MEMORY.md\` by
|
|
127
282
|
topic, editing or removing stale entries rather than only appending. Before the
|
|
@@ -12908,6 +13063,10 @@ export {
|
|
|
12908
13063
|
MAX_AVATAR_ENV_URL_BYTES,
|
|
12909
13064
|
resolveAvatarEnvUrl,
|
|
12910
13065
|
PLATFORM_STORAGE_RULE,
|
|
13066
|
+
findIdentifierUrls,
|
|
13067
|
+
scrubPreservingIdentifiers,
|
|
13068
|
+
identifierMemoryName,
|
|
13069
|
+
EXTRACTOR_IDENTIFIER_RULE,
|
|
12911
13070
|
SCRATCH_RETENTION_DAYS,
|
|
12912
13071
|
CLAUDE_MD_CONTEXT_ALARM_CHARS,
|
|
12913
13072
|
INTEGRATIONS_SECTION_START,
|
|
@@ -13052,4 +13211,4 @@ export {
|
|
|
13052
13211
|
peekCurrentSession,
|
|
13053
13212
|
readDailySessionPin
|
|
13054
13213
|
};
|
|
13055
|
-
//# sourceMappingURL=chunk-
|
|
13214
|
+
//# sourceMappingURL=chunk-DFOBTAPL.js.map
|