cortad 0.3.7 → 0.3.8

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/local.mjs +4 -2
  2. package/package.json +1 -1
package/local.mjs CHANGED
@@ -1272,9 +1272,11 @@ for (let off = 0; off < bytes.length; off += PART) {
1272
1272
  const last = off + PART >= bytes.length;
1273
1273
  step(parts > 1 ? `connecting, ${Math.floor(off / PART) + 1} of ${parts}` : "connecting");
1274
1274
  // The last part asks for this machine's key when none is stored yet: minted once the repository
1275
- // row exists, kept in ~/.cortad for the runs a coding agent asks for on later days.
1275
+ // row exists, kept in ~/.cortad for the runs a coding agent asks for on later days. A connect by a
1276
+ // code asks too, since the code may be another account's: the key kept from the account before
1277
+ // signed the coding agent's tools into that one, its runs and its counts.
1276
1278
  const put = await call("PUT", `/local/${box}/tree?last=${last ? 1 : 0}${last ? `&digest=${treeDigest}${head ? `&head=${head}` : ""}` : ""}`, bytes.subarray(off, off + PART),
1277
- { raw: true, timeoutMs: 120_000, ...(last && !viaToken && !stored ? { headers: { "x-cortad-machine": hostname().slice(0, 80) } } : {}) }).catch(unreachable);
1279
+ { raw: true, timeoutMs: 120_000, ...(last && !viaToken && (!stored || code) ? { headers: { "x-cortad-machine": hostname().slice(0, 80) } } : {}) }).catch(unreachable);
1278
1280
  if (!put.ok) fail(put.data?.error ?? `upload failed (${put.status})`);
1279
1281
  if (last) {
1280
1282
  resumed = put.data?.resumed === true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortad",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Connects the AI app on your machine to Cortad for test conversations, and gives your coding agent the MCP and skill to run them. No dependencies.",
5
5
  "bin": {
6
6
  "cortad": "local.mjs"