@integrity-labs/agt-cli 0.28.945 → 0.28.946

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 CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-U5ETXDXQ.js";
43
+ } from "../chunk-RTMBVYTR.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5470,7 +5470,7 @@ import { execFileSync, execSync } from "child_process";
5470
5470
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5471
5471
  import chalk18 from "chalk";
5472
5472
  import ora16 from "ora";
5473
- var cliVersion = true ? "0.28.945" : "dev";
5473
+ var cliVersion = true ? "0.28.946" : "dev";
5474
5474
  async function fetchLatestVersion() {
5475
5475
  const host2 = getHost();
5476
5476
  if (!host2) return null;
@@ -6730,7 +6730,7 @@ function handleError(err) {
6730
6730
  }
6731
6731
 
6732
6732
  // src/bin/agt.ts
6733
- var cliVersion2 = true ? "0.28.945" : "dev";
6733
+ var cliVersion2 = true ? "0.28.946" : "dev";
6734
6734
  var program = new Command();
6735
6735
  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");
6736
6736
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6965,7 +6965,7 @@ function exchangeFailureKind(err) {
6965
6965
  }
6966
6966
 
6967
6967
  // src/lib/api-client.ts
6968
- var agtCliVersion = true ? "0.28.945" : "dev";
6968
+ var agtCliVersion = true ? "0.28.946" : "dev";
6969
6969
  var lastConfigHash = null;
6970
6970
  function setConfigHash(hash) {
6971
6971
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -11664,4 +11664,4 @@ export {
11664
11664
  managerInstallSystemUnitCommand,
11665
11665
  managerUninstallSystemUnitCommand
11666
11666
  };
11667
- //# sourceMappingURL=chunk-U5ETXDXQ.js.map
11667
+ //# sourceMappingURL=chunk-RTMBVYTR.js.map
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-U5ETXDXQ.js";
66
+ } from "../chunk-RTMBVYTR.js";
67
67
  import {
68
68
  getProjectDir as getProjectDir2,
69
69
  getReadyTasks,
@@ -13942,7 +13942,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13942
13942
  var lastVersionCheckAt = 0;
13943
13943
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13944
13944
  var lastResponsivenessProbeAt = 0;
13945
- var agtCliVersion = true ? "0.28.945" : "dev";
13945
+ var agtCliVersion = true ? "0.28.946" : "dev";
13946
13946
  function resolveBrewPath(execFileSync2) {
13947
13947
  try {
13948
13948
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
package/dist/mcp/index.js CHANGED
@@ -46423,6 +46423,11 @@ function describeAssignHumanResult(resp, email2) {
46423
46423
  // src/artefact-source.ts
46424
46424
  var SOURCE_READBACK_MAX_CHUNKS = 128;
46425
46425
  var SOURCE_READBACK_CHUNK_BYTES = 65536;
46426
+ function codePointLength(text) {
46427
+ let n = 0;
46428
+ for (const ch of text) n += ch ? 1 : 0;
46429
+ return n;
46430
+ }
46426
46431
  async function assembleArtefactSource(fetchChunk, maxChunks = SOURCE_READBACK_MAX_CHUNKS) {
46427
46432
  const parts = [];
46428
46433
  let offset = 0;
@@ -46436,12 +46441,12 @@ async function assembleArtefactSource(fetchChunk, maxChunks = SOURCE_READBACK_MA
46436
46441
  if (data.end_of_content) break;
46437
46442
  if (data.length <= 0) {
46438
46443
  throw new Error(
46439
- `source read stalled at offset ${offset} of ${totalLength} bytes (server returned an empty chunk without signalling end of content)`
46444
+ `source read stalled at offset ${offset} of ${totalLength} characters (server returned an empty chunk without signalling end of content)`
46440
46445
  );
46441
46446
  }
46442
46447
  if (chunks >= maxChunks) {
46443
46448
  throw new Error(
46444
- `source read exceeded ${maxChunks} chunks (${totalLength} bytes reported); refusing to continue`
46449
+ `source read exceeded ${maxChunks} chunks (${totalLength} characters reported); refusing to continue`
46445
46450
  );
46446
46451
  }
46447
46452
  offset = data.offset + data.length;
@@ -46452,14 +46457,14 @@ function classifyRevision(before, after) {
46452
46457
  if (before === null || after === null) return "unknown";
46453
46458
  return before === after ? "stable" : "changed";
46454
46459
  }
46455
- function describeSourceIntegrity(bytes, totalLength, revisionState = "stable") {
46460
+ function describeSourceIntegrity(assembledChars, totalLength, revisionState = "stable") {
46456
46461
  if (revisionState === "changed") {
46457
46462
  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";
46458
46463
  }
46459
46464
  if (revisionState === "unknown") {
46460
- 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`;
46465
+ return assembledChars === 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 ${assembledChars} characters but the server reports ${totalLength}, and the revision marker could not be read - do NOT re-publish this as-is`;
46461
46466
  }
46462
- return bytes === totalLength ? "complete" : `WARNING: assembled ${bytes} bytes but the server reports ${totalLength} - do NOT re-publish this as-is`;
46467
+ return assembledChars === totalLength ? "complete" : `WARNING: assembled ${assembledChars} characters but the server reports ${totalLength} - do NOT re-publish this as-is`;
46463
46468
  }
46464
46469
 
46465
46470
  // src/directory.ts
@@ -49894,7 +49899,7 @@ async function getPublishedArtefactSourceChunkText(artefactId, offset, limit) {
49894
49899
  const trailer = data.end_of_content ? "\n\n---\n(end of source)" : `
49895
49900
 
49896
49901
  ---
49897
- (more \u2014 next offset: ${data.offset + data.length}, total: ${data.total_length} bytes)`;
49902
+ (more \u2014 next offset: ${data.offset + data.length}, total: ${data.total_length} characters)`;
49898
49903
  return data.chunk + trailer;
49899
49904
  }
49900
49905
  function formatDwellMs(ms) {
@@ -49991,8 +49996,8 @@ server.tool(
49991
49996
  "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.",
49992
49997
  {
49993
49998
  artefact_id: external_exports.string().uuid().describe("The artefact id returned by artefacts_list"),
49994
- offset: external_exports.number().int().min(0).describe("Byte offset into the source HTML to start from"),
49995
- limit: external_exports.number().int().min(1).max(65536).optional().describe("Max bytes to return (default 32KB, max 64KB)")
49999
+ offset: external_exports.number().int().min(0).describe('Character offset into the source HTML to start from (continue from the "next offset" the previous chunk reported)'),
50000
+ limit: external_exports.number().int().min(1).max(65536).optional().describe("Max characters to return (default 32K, max 64K)")
49996
50001
  },
49997
50002
  async (params) => ({
49998
50003
  content: [
@@ -50036,6 +50041,7 @@ async function saveArtefactSourceToFile(artefactId) {
50036
50041
  return {
50037
50042
  path: filePath,
50038
50043
  bytes: Buffer.byteLength(result.html, "utf8"),
50044
+ characters: codePointLength(result.html),
50039
50045
  totalLength: result.totalLength,
50040
50046
  chunks: result.chunks,
50041
50047
  revisionState: result.revisionState
@@ -50043,10 +50049,10 @@ async function saveArtefactSourceToFile(artefactId) {
50043
50049
  }
50044
50050
  async function saveArtefactSourceText(artefactId) {
50045
50051
  const r = await saveArtefactSourceToFile(artefactId);
50046
- const integrity = describeSourceIntegrity(r.bytes, r.totalLength, r.revisionState);
50052
+ const integrity = describeSourceIntegrity(r.characters, r.totalLength, r.revisionState);
50047
50053
  return [
50048
50054
  `Saved source HTML to ${r.path}`,
50049
- `${r.bytes} bytes in ${r.chunks} chunk(s) \u2014 ${integrity}`,
50055
+ `${r.characters} characters (${r.bytes} bytes) in ${r.chunks} chunk(s) \u2014 ${integrity}`,
50050
50056
  "Read/edit that file, then pass the edited HTML back as `content` to agt_live_publish with the same slug."
50051
50057
  ].join("\n");
50052
50058
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.945",
3
+ "version": "0.28.946",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {