@integrity-labs/agt-cli 0.28.752 → 0.28.754
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 +9 -5
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-5CTWPH6B.js → chunk-BNXP2TOA.js} +27 -6
- package/dist/{chunk-5CTWPH6B.js.map → chunk-BNXP2TOA.js.map} +1 -1
- package/dist/{chunk-BAURV6HK.js → chunk-GPDHLGBD.js} +3 -1
- package/dist/{chunk-BAURV6HK.js.map → chunk-GPDHLGBD.js.map} +1 -1
- package/dist/{chunk-NUSPIGZR.js → chunk-VA6UHKFG.js} +2 -2
- package/dist/{claude-pair-runtime-6CV4AHYS.js → claude-pair-runtime-7MWDR3RS.js} +2 -2
- package/dist/lib/manager-worker.js +25 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +2 -0
- package/dist/mcp/index.js +104 -4
- package/dist/mcp/origami.js +2 -0
- package/dist/mcp/slack-channel.js +2 -0
- package/dist/mcp/telegram-channel.js +2 -0
- package/dist/{persistent-session-VTK6RTLW.js → persistent-session-6YR3ZHZV.js} +3 -3
- package/dist/{responsiveness-probe-TW2EAZTE.js → responsiveness-probe-Y5M7V5EC.js} +3 -3
- package/dist/{session-auth-dead-5BTBCHBT.js → session-auth-dead-EDLHHI3H.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-NUSPIGZR.js.map → chunk-VA6UHKFG.js.map} +0 -0
- /package/dist/{claude-pair-runtime-6CV4AHYS.js.map → claude-pair-runtime-7MWDR3RS.js.map} +0 -0
- /package/dist/{persistent-session-VTK6RTLW.js.map → persistent-session-6YR3ZHZV.js.map} +0 -0
- /package/dist/{responsiveness-probe-TW2EAZTE.js.map → responsiveness-probe-Y5M7V5EC.js.map} +0 -0
- /package/dist/{session-auth-dead-5BTBCHBT.js.map → session-auth-dead-EDLHHI3H.js.map} +0 -0
|
@@ -31812,6 +31812,7 @@ var ROLE_PERMISSIONS = {
|
|
|
31812
31812
|
"agent.pause",
|
|
31813
31813
|
"agent.impersonate",
|
|
31814
31814
|
"agent.viewAuditLog",
|
|
31815
|
+
"agent.viewMemories",
|
|
31815
31816
|
"template.manage",
|
|
31816
31817
|
"audit_log.view",
|
|
31817
31818
|
"host.create",
|
|
@@ -31839,6 +31840,7 @@ var ROLE_PERMISSIONS = {
|
|
|
31839
31840
|
"agent.pause",
|
|
31840
31841
|
"agent.impersonate",
|
|
31841
31842
|
"agent.viewAuditLog",
|
|
31843
|
+
"agent.viewMemories",
|
|
31842
31844
|
"template.manage",
|
|
31843
31845
|
"audit_log.view",
|
|
31844
31846
|
"host.create",
|
package/dist/mcp/index.js
CHANGED
|
@@ -37767,6 +37767,48 @@ function describeAssignHumanResult(resp, email2) {
|
|
|
37767
37767
|
};
|
|
37768
37768
|
}
|
|
37769
37769
|
|
|
37770
|
+
// src/artefact-source.ts
|
|
37771
|
+
var SOURCE_READBACK_MAX_CHUNKS = 128;
|
|
37772
|
+
var SOURCE_READBACK_CHUNK_BYTES = 65536;
|
|
37773
|
+
async function assembleArtefactSource(fetchChunk, maxChunks = SOURCE_READBACK_MAX_CHUNKS) {
|
|
37774
|
+
const parts = [];
|
|
37775
|
+
let offset = 0;
|
|
37776
|
+
let totalLength = 0;
|
|
37777
|
+
let chunks = 0;
|
|
37778
|
+
for (; ; ) {
|
|
37779
|
+
const data = await fetchChunk(offset);
|
|
37780
|
+
parts.push(data.chunk);
|
|
37781
|
+
totalLength = data.total_length;
|
|
37782
|
+
chunks += 1;
|
|
37783
|
+
if (data.end_of_content) break;
|
|
37784
|
+
if (data.length <= 0) {
|
|
37785
|
+
throw new Error(
|
|
37786
|
+
`source read stalled at offset ${offset} of ${totalLength} bytes (server returned an empty chunk without signalling end of content)`
|
|
37787
|
+
);
|
|
37788
|
+
}
|
|
37789
|
+
if (chunks >= maxChunks) {
|
|
37790
|
+
throw new Error(
|
|
37791
|
+
`source read exceeded ${maxChunks} chunks (${totalLength} bytes reported); refusing to continue`
|
|
37792
|
+
);
|
|
37793
|
+
}
|
|
37794
|
+
offset = data.offset + data.length;
|
|
37795
|
+
}
|
|
37796
|
+
return { html: parts.join(""), totalLength, chunks };
|
|
37797
|
+
}
|
|
37798
|
+
function classifyRevision(before, after) {
|
|
37799
|
+
if (before === null || after === null) return "unknown";
|
|
37800
|
+
return before === after ? "stable" : "changed";
|
|
37801
|
+
}
|
|
37802
|
+
function describeSourceIntegrity(bytes, totalLength, revisionState = "stable") {
|
|
37803
|
+
if (revisionState === "changed") {
|
|
37804
|
+
return "WARNING: the artefact was re-published while this was being read, so the file may mix two versions - re-read it before editing, and do NOT re-publish this copy";
|
|
37805
|
+
}
|
|
37806
|
+
if (revisionState === "unknown") {
|
|
37807
|
+
return bytes === totalLength ? "assembled OK, but UNVERIFIED: the revision marker could not be read, so we cannot confirm the artefact stayed unchanged during the read - safe to read, but re-read before re-publishing" : `WARNING: assembled ${bytes} bytes but the server reports ${totalLength}, and the revision marker could not be read - do NOT re-publish this as-is`;
|
|
37808
|
+
}
|
|
37809
|
+
return bytes === totalLength ? "complete" : `WARNING: assembled ${bytes} bytes but the server reports ${totalLength} - do NOT re-publish this as-is`;
|
|
37810
|
+
}
|
|
37811
|
+
|
|
37770
37812
|
// ../core/dist/types/agent.js
|
|
37771
37813
|
var FRAMEWORK_MODEL_SLOTS = {
|
|
37772
37814
|
"claude-code": ["primary", "small_fast"],
|
|
@@ -39204,6 +39246,7 @@ var ROLE_PERMISSIONS = {
|
|
|
39204
39246
|
"agent.pause",
|
|
39205
39247
|
"agent.impersonate",
|
|
39206
39248
|
"agent.viewAuditLog",
|
|
39249
|
+
"agent.viewMemories",
|
|
39207
39250
|
"template.manage",
|
|
39208
39251
|
"audit_log.view",
|
|
39209
39252
|
"host.create",
|
|
@@ -39231,6 +39274,7 @@ var ROLE_PERMISSIONS = {
|
|
|
39231
39274
|
"agent.pause",
|
|
39232
39275
|
"agent.impersonate",
|
|
39233
39276
|
"agent.viewAuditLog",
|
|
39277
|
+
"agent.viewMemories",
|
|
39234
39278
|
"template.manage",
|
|
39235
39279
|
"audit_log.view",
|
|
39236
39280
|
"host.create",
|
|
@@ -47006,6 +47050,7 @@ var LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
47006
47050
|
"artefacts_list",
|
|
47007
47051
|
"artefacts_get",
|
|
47008
47052
|
"artefacts_get_source_chunk",
|
|
47053
|
+
"artefacts_get_source",
|
|
47009
47054
|
"artefacts_download",
|
|
47010
47055
|
"artefacts_resolve",
|
|
47011
47056
|
"artefacts_analytics",
|
|
@@ -47125,7 +47170,7 @@ async function getPublishedArtefactText(artefactId) {
|
|
|
47125
47170
|
`Published: ${p2.published_at}`,
|
|
47126
47171
|
p2.expires_at ? `Expires: ${p2.expires_at}` : null,
|
|
47127
47172
|
`Last modified: ${p2.last_modified_at}`,
|
|
47128
|
-
p2.has_source_html ? `Source HTML: ${p2.source_html_length} bytes (call
|
|
47173
|
+
p2.has_source_html ? `Source HTML: ${p2.source_html_length} bytes (call artefacts_get_source to save it to a file)` : "(source HTML not preserved for this artefact)"
|
|
47129
47174
|
].filter((s) => s !== null).join("\n");
|
|
47130
47175
|
}
|
|
47131
47176
|
async function getPublishedArtefactSourceChunkText(artefactId, offset, limit) {
|
|
@@ -47210,7 +47255,7 @@ server.tool(
|
|
|
47210
47255
|
);
|
|
47211
47256
|
server.tool(
|
|
47212
47257
|
"artefacts_get",
|
|
47213
|
-
"Fetch metadata for a single published artefact. Returns the artefact record without the source HTML \u2014 call
|
|
47258
|
+
"Fetch metadata for a single published artefact. Returns the artefact record without the source HTML \u2014 call artefacts_get_source to save the HTML to a file when you need to modify it.",
|
|
47214
47259
|
{
|
|
47215
47260
|
artefact_id: external_exports.string().uuid().describe("The artefact id returned by artefacts_list")
|
|
47216
47261
|
},
|
|
@@ -47231,7 +47276,7 @@ server.tool(
|
|
|
47231
47276
|
);
|
|
47232
47277
|
server.tool(
|
|
47233
47278
|
"artefacts_get_source_chunk",
|
|
47234
|
-
"Fetch
|
|
47279
|
+
"Fetch ONE chunk of source HTML for a published artefact. For editing a page, prefer artefacts_get_source, which saves the whole document to a file in a single call - assembling a large document from chunks by hand costs one round trip per 64KB and puts every byte in your context.",
|
|
47235
47280
|
{
|
|
47236
47281
|
artefact_id: external_exports.string().uuid().describe("The artefact id returned by artefacts_list"),
|
|
47237
47282
|
offset: external_exports.number().int().min(0).describe("Byte offset into the source HTML to start from"),
|
|
@@ -47243,6 +47288,61 @@ server.tool(
|
|
|
47243
47288
|
]
|
|
47244
47289
|
})
|
|
47245
47290
|
);
|
|
47291
|
+
async function fetchArtefactRevision(artefactId) {
|
|
47292
|
+
try {
|
|
47293
|
+
const data = await apiPost(
|
|
47294
|
+
`/host/published-artefact/${encodeURIComponent(artefactId)}`,
|
|
47295
|
+
{ agent_id: AGT_AGENT_ID }
|
|
47296
|
+
);
|
|
47297
|
+
return data.artefact?.last_modified_at ?? null;
|
|
47298
|
+
} catch {
|
|
47299
|
+
return null;
|
|
47300
|
+
}
|
|
47301
|
+
}
|
|
47302
|
+
async function saveArtefactSourceToFile(artefactId) {
|
|
47303
|
+
const dir = await mkdtemp(join4(tmpdir(), "augmented-artefact-source-"));
|
|
47304
|
+
const readOnce = async () => {
|
|
47305
|
+
const before = await fetchArtefactRevision(artefactId);
|
|
47306
|
+
const assembled = await assembleArtefactSource(
|
|
47307
|
+
(offset) => apiPost(
|
|
47308
|
+
`/host/published-artefact/${encodeURIComponent(artefactId)}/source-chunk`,
|
|
47309
|
+
{ agent_id: AGT_AGENT_ID, offset, limit: SOURCE_READBACK_CHUNK_BYTES }
|
|
47310
|
+
)
|
|
47311
|
+
);
|
|
47312
|
+
const after = await fetchArtefactRevision(artefactId);
|
|
47313
|
+
return { ...assembled, revisionState: classifyRevision(before, after) };
|
|
47314
|
+
};
|
|
47315
|
+
let result = await readOnce();
|
|
47316
|
+
if (result.revisionState !== "stable") result = await readOnce();
|
|
47317
|
+
const filePath = join4(dir, safeDownloadName(`${artefactId}.html`, `${artefactId}.html`));
|
|
47318
|
+
await writeFile(filePath, result.html, "utf8");
|
|
47319
|
+
return {
|
|
47320
|
+
path: filePath,
|
|
47321
|
+
bytes: Buffer.byteLength(result.html, "utf8"),
|
|
47322
|
+
totalLength: result.totalLength,
|
|
47323
|
+
chunks: result.chunks,
|
|
47324
|
+
revisionState: result.revisionState
|
|
47325
|
+
};
|
|
47326
|
+
}
|
|
47327
|
+
async function saveArtefactSourceText(artefactId) {
|
|
47328
|
+
const r = await saveArtefactSourceToFile(artefactId);
|
|
47329
|
+
const integrity = describeSourceIntegrity(r.bytes, r.totalLength, r.revisionState);
|
|
47330
|
+
return [
|
|
47331
|
+
`Saved source HTML to ${r.path}`,
|
|
47332
|
+
`${r.bytes} bytes in ${r.chunks} chunk(s) \u2014 ${integrity}`,
|
|
47333
|
+
"Read/edit that file, then pass the edited HTML back as `content` to agt_live_publish with the same slug."
|
|
47334
|
+
].join("\n");
|
|
47335
|
+
}
|
|
47336
|
+
server.tool(
|
|
47337
|
+
"artefacts_get_source",
|
|
47338
|
+
"Save a published artefact's FULL source HTML to a file on this host and return the path \u2014 one call, no paging. Use this when you need to EDIT a page you published: read the file, change it, then re-publish with the same slug. Works on your own gated artefacts (the content URL does not). Prefer this over artefacts_get_source_chunk, which exists for the rare case you want to inspect a slice without loading the document.",
|
|
47339
|
+
{
|
|
47340
|
+
artefact_id: external_exports.string().uuid().describe("The artefact id returned by artefacts_list")
|
|
47341
|
+
},
|
|
47342
|
+
async (params) => ({
|
|
47343
|
+
content: [{ type: "text", text: await saveArtefactSourceText(params.artefact_id) }]
|
|
47344
|
+
})
|
|
47345
|
+
);
|
|
47246
47346
|
var ARTEFACT_DOWNLOAD_MAX_ITEMS = 50;
|
|
47247
47347
|
function safeDownloadName(name, fallback) {
|
|
47248
47348
|
const base = basename(name).replace(/[^a-zA-Z0-9._-]/g, "_").replace(/^\.+/, "");
|
|
@@ -47317,7 +47417,7 @@ async function downloadArtefactText(params) {
|
|
|
47317
47417
|
}
|
|
47318
47418
|
server.tool(
|
|
47319
47419
|
"artefacts_download",
|
|
47320
|
-
|
|
47420
|
+
'Download a published artefact as a PDF or image (PNG) file(s) on this host, returning the saved file path(s) so you can attach, upload, or send them. pdf gives one multi-page document (one page per carousel item). png with an item index gives that single page. png with NO item index gives one PNG per item for a multi-item carousel (or a single PNG for a one-item artefact). TO PREVIEW A DOCUMENT before sending it, call this with format="png" and NO item: you get one image per section in a single call, which is what to check a contract with rather than exporting pages one index at a time. Capped at the first 50 sections - a longer document returns 50 PNGs and says so, so do not read "no more files" as "no more pages". Video downloads are not supported yet (tracked in ENG-6776).',
|
|
47321
47421
|
{
|
|
47322
47422
|
artefact_id: external_exports.string().uuid().describe("The artefact id returned by artefacts_list"),
|
|
47323
47423
|
format: external_exports.enum(["pdf", "png"]).describe('Output format: "pdf" (carousel document) or "png" (image)'),
|
package/dist/mcp/origami.js
CHANGED
|
@@ -37996,6 +37996,7 @@ var ROLE_PERMISSIONS = {
|
|
|
37996
37996
|
"agent.pause",
|
|
37997
37997
|
"agent.impersonate",
|
|
37998
37998
|
"agent.viewAuditLog",
|
|
37999
|
+
"agent.viewMemories",
|
|
37999
38000
|
"template.manage",
|
|
38000
38001
|
"audit_log.view",
|
|
38001
38002
|
"host.create",
|
|
@@ -38023,6 +38024,7 @@ var ROLE_PERMISSIONS = {
|
|
|
38023
38024
|
"agent.pause",
|
|
38024
38025
|
"agent.impersonate",
|
|
38025
38026
|
"agent.viewAuditLog",
|
|
38027
|
+
"agent.viewMemories",
|
|
38026
38028
|
"template.manage",
|
|
38027
38029
|
"audit_log.view",
|
|
38028
38030
|
"host.create",
|
|
@@ -32106,6 +32106,7 @@ var ROLE_PERMISSIONS = {
|
|
|
32106
32106
|
"agent.pause",
|
|
32107
32107
|
"agent.impersonate",
|
|
32108
32108
|
"agent.viewAuditLog",
|
|
32109
|
+
"agent.viewMemories",
|
|
32109
32110
|
"template.manage",
|
|
32110
32111
|
"audit_log.view",
|
|
32111
32112
|
"host.create",
|
|
@@ -32133,6 +32134,7 @@ var ROLE_PERMISSIONS = {
|
|
|
32133
32134
|
"agent.pause",
|
|
32134
32135
|
"agent.impersonate",
|
|
32135
32136
|
"agent.viewAuditLog",
|
|
32137
|
+
"agent.viewMemories",
|
|
32136
32138
|
"template.manage",
|
|
32137
32139
|
"audit_log.view",
|
|
32138
32140
|
"host.create",
|
|
@@ -32270,6 +32270,7 @@ var ROLE_PERMISSIONS = {
|
|
|
32270
32270
|
"agent.pause",
|
|
32271
32271
|
"agent.impersonate",
|
|
32272
32272
|
"agent.viewAuditLog",
|
|
32273
|
+
"agent.viewMemories",
|
|
32273
32274
|
"template.manage",
|
|
32274
32275
|
"audit_log.view",
|
|
32275
32276
|
"host.create",
|
|
@@ -32297,6 +32298,7 @@ var ROLE_PERMISSIONS = {
|
|
|
32297
32298
|
"agent.pause",
|
|
32298
32299
|
"agent.impersonate",
|
|
32299
32300
|
"agent.viewAuditLog",
|
|
32301
|
+
"agent.viewMemories",
|
|
32300
32302
|
"template.manage",
|
|
32301
32303
|
"audit_log.view",
|
|
32302
32304
|
"host.create",
|
|
@@ -49,8 +49,8 @@ import {
|
|
|
49
49
|
writeDirectChatSessionState,
|
|
50
50
|
writeEgressAllowlist,
|
|
51
51
|
writePersistentClaudeWrapper
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-
|
|
52
|
+
} from "./chunk-VA6UHKFG.js";
|
|
53
|
+
import "./chunk-GPDHLGBD.js";
|
|
54
54
|
import "./chunk-XWVM4KPK.js";
|
|
55
55
|
export {
|
|
56
56
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -104,4 +104,4 @@ export {
|
|
|
104
104
|
writeEgressAllowlist,
|
|
105
105
|
writePersistentClaudeWrapper
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=persistent-session-
|
|
107
|
+
//# sourceMappingURL=persistent-session-6YR3ZHZV.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-VA6UHKFG.js";
|
|
4
|
+
import "./chunk-GPDHLGBD.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -745,4 +745,4 @@ export {
|
|
|
745
745
|
readAndResetSlackReplyBindingClassifications,
|
|
746
746
|
readAndResetSlackReplyTargetClassifications
|
|
747
747
|
};
|
|
748
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
748
|
+
//# sourceMappingURL=responsiveness-probe-Y5M7V5EC.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GPDHLGBD.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/session-auth-dead.ts
|
|
6
6
|
import { closeSync, openSync, readSync, readdirSync, statSync } from "fs";
|
|
@@ -203,4 +203,4 @@ export {
|
|
|
203
203
|
decideSessionAuthState,
|
|
204
204
|
probeSessionAuth
|
|
205
205
|
};
|
|
206
|
-
//# sourceMappingURL=session-auth-dead-
|
|
206
|
+
//# sourceMappingURL=session-auth-dead-EDLHHI3H.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|