pantheon-cli 0.2.70 → 0.2.72

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.
Files changed (2) hide show
  1. package/dist/pantheon.mjs +18 -10
  2. package/package.json +1 -1
package/dist/pantheon.mjs CHANGED
@@ -43695,10 +43695,11 @@ import {
43695
43695
  writeFileSync as writeFileSync6
43696
43696
  } from "node:fs";
43697
43697
  import { dirname as dirname3, join as join7, relative as relative2, resolve as resolve3, sep } from "node:path";
43698
+ import { gzipSync } from "node:zlib";
43698
43699
 
43699
43700
  // ../core/src/drive-protocol.ts
43700
- var DRIVE_MAX_FILE_BYTES = 4 * 1024 * 1024;
43701
- var DRIVE_MAX_CHANGE_BYTES = 12 * 1024 * 1024;
43701
+ var DRIVE_MAX_FILE_BYTES = 200 * 1024 * 1024;
43702
+ var DRIVE_MAX_CHANGE_BYTES = 256 * 1024 * 1024;
43702
43703
  var DRIVE_MAX_CHANGES = 100;
43703
43704
  var CONTROL_NAMES = /* @__PURE__ */ new Set([
43704
43705
  ".git",
@@ -43819,7 +43820,6 @@ function walk(home, directory = home) {
43819
43820
  }
43820
43821
  function scanDriveWorkspace(home) {
43821
43822
  const entries = {};
43822
- let total = 0;
43823
43823
  for (const path of walk(home).sort()) {
43824
43824
  const bytes = readFileSync6(join7(home, ...path.split("/")));
43825
43825
  if (bytes.length > DRIVE_MAX_FILE_BYTES) {
@@ -43827,12 +43827,6 @@ function scanDriveWorkspace(home) {
43827
43827
  `Workspace file ${path} exceeds the ${DRIVE_MAX_FILE_BYTES / 1024 / 1024}MB file limit.`
43828
43828
  );
43829
43829
  }
43830
- total += bytes.length;
43831
- if (total > DRIVE_MAX_CHANGE_BYTES) {
43832
- throw new Error(
43833
- `Workspace changes exceed the ${DRIVE_MAX_CHANGE_BYTES / 1024 / 1024}MB sync limit.`
43834
- );
43835
- }
43836
43830
  entries[path] = {
43837
43831
  path,
43838
43832
  sha256: sha256(bytes),
@@ -43844,12 +43838,26 @@ function scanDriveWorkspace(home) {
43844
43838
  function diffDriveManifest(home, manifest) {
43845
43839
  const local = scanDriveWorkspace(home);
43846
43840
  const changes = [];
43841
+ let total = 0;
43847
43842
  for (const [path, entry] of Object.entries(local)) {
43848
43843
  if (manifest.entries[path]?.sha256 === entry.sha256 && manifest.entries[path]?.size === entry.size) {
43849
43844
  continue;
43850
43845
  }
43851
43846
  const bytes = readFileSync6(join7(home, ...path.split("/")));
43852
- changes.push({ ...entry, content: bytes.toString("base64") });
43847
+ total += bytes.length;
43848
+ if (total > DRIVE_MAX_CHANGE_BYTES) {
43849
+ throw new Error(
43850
+ `Workspace changes exceed the ${DRIVE_MAX_CHANGE_BYTES / 1024 / 1024}MB sync limit.`
43851
+ );
43852
+ }
43853
+ const compressed = gzipSync(bytes);
43854
+ changes.push(
43855
+ compressed.length < bytes.length ? {
43856
+ ...entry,
43857
+ content: compressed.toString("base64"),
43858
+ encoding: "gzip-base64"
43859
+ } : { ...entry, content: bytes.toString("base64") }
43860
+ );
43853
43861
  }
43854
43862
  const deletes = Object.keys(manifest.entries).filter((path) => !(path in local)).sort();
43855
43863
  if (changes.length + deletes.length > DRIVE_MAX_CHANGES) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pantheon-cli",
3
- "version": "0.2.70",
3
+ "version": "0.2.72",
4
4
  "description": "Carry agent conscience between AI coding agents. Hand off a conversation in one agent, resume it in another.",
5
5
  "license": "MIT",
6
6
  "type": "module",