@integrity-labs/agt-cli 0.28.1158 → 0.28.1160

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/mcp/index.js CHANGED
@@ -36058,7 +36058,7 @@ function renderKnowledgeBody(content) {
36058
36058
 
36059
36059
  // src/index.ts
36060
36060
  import { homedir as homedir5 } from "os";
36061
- import { basename, isAbsolute as isAbsolute2, join as join10, resolve as pathResolve, sep as sep2 } from "path";
36061
+ import { isAbsolute as isAbsolute2, join as join10, resolve as pathResolve, sep as sep2 } from "path";
36062
36062
 
36063
36063
  // src/host-file-path.ts
36064
36064
  var SKILL_BODY_PATH_MAX_BYTES = 512 * 1024;
@@ -46999,6 +46999,30 @@ function pendingExportText(n) {
46999
46999
  return lines.join("\n");
47000
47000
  }
47001
47001
 
47002
+ // src/safe-download-name.ts
47003
+ import { basename } from "path";
47004
+ var SAFE_DOWNLOAD_NAME_MAX_BYTES = 200;
47005
+ function stemOf(name) {
47006
+ const dot = name.lastIndexOf(".");
47007
+ return dot > 0 && name.length - dot <= 8 ? name.slice(0, dot) : name;
47008
+ }
47009
+ var READABLE = /[\p{L}\p{N}]/u;
47010
+ function safeDownloadName(name, fallback) {
47011
+ let base = basename(name).replace(/[^\p{L}\p{N}\p{M}._-]/gu, "_").replace(/^\.+/, "");
47012
+ if (!READABLE.test(stemOf(base))) return fallback;
47013
+ if (Buffer.byteLength(base, "utf8") > SAFE_DOWNLOAD_NAME_MAX_BYTES) {
47014
+ const dot = base.lastIndexOf(".");
47015
+ const ext = dot > 0 && base.length - dot <= 8 ? base.slice(dot) : "";
47016
+ const chars = Array.from(ext ? base.slice(0, dot) : base);
47017
+ while (chars.length > 0 && Buffer.byteLength(chars.join("") + ext, "utf8") > SAFE_DOWNLOAD_NAME_MAX_BYTES) {
47018
+ chars.pop();
47019
+ }
47020
+ base = chars.join("") + ext;
47021
+ if (!READABLE.test(stemOf(base))) return fallback;
47022
+ }
47023
+ return base;
47024
+ }
47025
+
47002
47026
  // src/mutation-commit-state.ts
47003
47027
  var API_GATEWAY_INTEGRATION_TIMEOUT_MS = 29e3;
47004
47028
  var GATEWAY_TIMEOUT_MARGIN_MS = 3e3;
@@ -52332,10 +52356,6 @@ server.tool(
52332
52356
  })
52333
52357
  );
52334
52358
  var ARTEFACT_DOWNLOAD_MAX_ITEMS = 50;
52335
- function safeDownloadName(name, fallback) {
52336
- const base = basename(name).replace(/[^a-zA-Z0-9._-]/g, "_").replace(/^\.+/, "");
52337
- return base.length > 0 ? base : fallback;
52338
- }
52339
52359
  async function exportArtefactToFile(dir, artefactId, format, item) {
52340
52360
  const data = await apiPost(
52341
52361
  `/host/artefact/${encodeURIComponent(artefactId)}/export`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1158",
3
+ "version": "0.28.1160",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {