@fabiofiorita/porcelain 0.86.0 → 0.86.1

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 (31) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/server/src/cli/main.mjs +48 -40
  4. package/web/dist/assets/_paired-DWswEbzN.js +40 -0
  5. package/web/dist/assets/_paired-ZmeyB00u.js +1 -0
  6. package/web/dist/assets/{_section-CSYz6Oeh.js → _section-D47SqYl7.js} +1 -1
  7. package/web/dist/assets/{_section-BJGYxFqw.js → _section-DTj4ugBZ.js} +2 -2
  8. package/web/dist/assets/access-DVT-swgC.js +26 -0
  9. package/web/dist/assets/confirmed-read-Bzepd0UX.js +133 -0
  10. package/web/dist/assets/{edit-file-DnKfwF-q.js → edit-file-D-nxcJV1.js} +2 -2
  11. package/web/dist/assets/{file-editor-DmcXimvv.js → file-editor-CiBGDJYR.js} +2 -2
  12. package/web/dist/assets/{index-DXIE4nD7.js → index-CGOpw9T5.js} +4 -4
  13. package/web/dist/assets/{lazyRouteComponent-8_52WjPQ.js → lazyRouteComponent-CQjWq9qY.js} +1 -1
  14. package/web/dist/assets/pair-CfSf_lMF.js +2 -0
  15. package/web/dist/assets/pair-CiIv76QK.js +1 -0
  16. package/web/dist/assets/pair-ZmeyB00u.js +1 -0
  17. package/web/dist/assets/search-DLabBBhS.js +1298 -0
  18. package/web/dist/assets/settings-page-BtmgbGJF.js +13 -0
  19. package/web/dist/assets/{useMatch-CEGDklCl.js → useMatch-Cdu0gSjC.js} +1 -1
  20. package/web/dist/assets/workspace-error-B0k2YgKf.js +1 -0
  21. package/web/dist/index.html +10 -10
  22. package/web/dist/assets/_paired-Bvfav40c.js +0 -1
  23. package/web/dist/assets/_paired-d5PXo1sB.js +0 -40
  24. package/web/dist/assets/access-eccLSfi_.js +0 -26
  25. package/web/dist/assets/confirmed-read-7exEnrey.js +0 -133
  26. package/web/dist/assets/pair-B_O6rPVP.js +0 -1
  27. package/web/dist/assets/pair-Bvfav40c.js +0 -1
  28. package/web/dist/assets/pair-C-2BSIoY.js +0 -2
  29. package/web/dist/assets/search-D8TAbIxv.js +0 -1298
  30. package/web/dist/assets/settings-page-DTHetAW7.js +0 -13
  31. package/web/dist/assets/workspace-error-B8Itqdu-.js +0 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @fabiofiorita/porcelain (0.86.0)
1
+ # @fabiofiorita/porcelain (0.86.1)
2
2
 
3
3
  The Porcelain server and bundled web app for a plain Node installation. A
4
4
  fresh, read-only agent writes a Walkthrough of what your coding agent changed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabiofiorita/porcelain",
3
- "version": "0.86.0",
3
+ "version": "0.86.1",
4
4
  "description": "A fresh, read-only agent explains what your coding agent changed. Read it from a browser, Mac or phone.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -13016,6 +13016,8 @@ var parseWorktreeList = Effect69.fn("Git.parseWorktreeList")(function* (output3)
13016
13016
 
13017
13017
  // packages/git/src/shared/commands/gitdir.ts
13018
13018
  import { Effect as Effect70, FileSystem as FileSystem21, Path as Path16 } from "effect";
13019
+ import { constants as constants3 } from "node:fs";
13020
+ import { open } from "node:fs/promises";
13019
13021
  function parseGitdirFile(text) {
13020
13022
  const pointer = text.trim();
13021
13023
  if (!pointer.startsWith("gitdir:")) return void 0;
@@ -13039,12 +13041,18 @@ var readCommonDirectory = Effect70.fn("Git.readCommonDirectory")(
13039
13041
  }
13040
13042
  );
13041
13043
  var readGitdirPointer = Effect70.fn("Git.readGitdirPointer")(function* (administrativeDirectory) {
13042
- const fs = yield* FileSystem21.FileSystem;
13043
13044
  const path = yield* Path16.Path;
13044
- const pointer = yield* fs.readFileString(path.join(administrativeDirectory, "gitdir")).pipe(
13045
- Effect70.map((text) => text.trim()),
13046
- Effect70.orElseSucceed(() => "")
13047
- );
13045
+ const pointerPath = path.join(administrativeDirectory, "gitdir");
13046
+ const pointer = yield* Effect70.acquireUseRelease(
13047
+ Effect70.tryPromise(
13048
+ () => open(pointerPath, constants3.O_RDONLY | constants3.O_NONBLOCK)
13049
+ ),
13050
+ (file) => Effect70.tryPromise(async (signal) => {
13051
+ if (!(await file.stat()).isFile()) return "";
13052
+ return (await file.readFile({ encoding: "utf8", signal })).trim();
13053
+ }),
13054
+ (file) => Effect70.tryPromise(() => file.close())
13055
+ ).pipe(Effect70.orElseSucceed(() => ""));
13048
13056
  if (pointer === "") return null;
13049
13057
  return path.resolve(administrativeDirectory, pointer, "..");
13050
13058
  });
@@ -13824,7 +13832,7 @@ var ghPullRequestReaderLayer = (limits) => Layer28.effect(
13824
13832
  read: (input) => readPull(input, detailQuery, detailSchema),
13825
13833
  checks: (input) => readPull(input, CHECKS_QUERY, checksSchema),
13826
13834
  list: Effect81.fn("GitHubReader.list")(function* (input) {
13827
- const open2 = [];
13835
+ const open3 = [];
13828
13836
  let cursor;
13829
13837
  let recent = [];
13830
13838
  let truncated = false;
@@ -13847,7 +13855,7 @@ var ghPullRequestReaderLayer = (limits) => Layer28.effect(
13847
13855
  )
13848
13856
  );
13849
13857
  const page = decoded.data.repository;
13850
- open2.push(...page.open.nodes);
13858
+ open3.push(...page.open.nodes);
13851
13859
  if (cursor === void 0) {
13852
13860
  recent = page.recent.nodes;
13853
13861
  truncated = page.recent.pageInfo.hasNextPage;
@@ -13858,7 +13866,7 @@ var ghPullRequestReaderLayer = (limits) => Layer28.effect(
13858
13866
  return yield* new GitHubReadError({ reason: "invalid-response" });
13859
13867
  cursor = next;
13860
13868
  } while (true);
13861
- return { open: open2, recent, truncated };
13869
+ return { open: open3, recent, truncated };
13862
13870
  })
13863
13871
  });
13864
13872
  })
@@ -15521,10 +15529,10 @@ var httpRouteListenerRunnerLayer = (target) => Layer63.effect(
15521
15529
  const scope = yield* Scope3.Scope;
15522
15530
  const routes = /* @__PURE__ */ new Map();
15523
15531
  const close = Effect120.fn("HttpRouteListenerRunner.close")(function* (input) {
15524
- const open2 = routes.get(input.route);
15532
+ const open3 = routes.get(input.route);
15525
15533
  routes.delete(input.route);
15526
15534
  yield* Effect120.forEach(
15527
- open2?.values() ?? [],
15535
+ open3?.values() ?? [],
15528
15536
  (bound) => Scope3.close(bound.scope, Exit6.void),
15529
15537
  { discard: true }
15530
15538
  );
@@ -15602,26 +15610,26 @@ var httpRouteListenerRunnerLayer = (target) => Layer63.effect(
15602
15610
  const shared = yield* wantedPort(input.port);
15603
15611
  return yield* Effect120.uninterruptible(
15604
15612
  Effect120.gen(function* () {
15605
- const open2 = routes.get(input.route) ?? /* @__PURE__ */ new Map();
15606
- routes.set(input.route, open2);
15607
- for (const [address, bound2] of open2) {
15613
+ const open3 = routes.get(input.route) ?? /* @__PURE__ */ new Map();
15614
+ routes.set(input.route, open3);
15615
+ for (const [address, bound2] of open3) {
15608
15616
  if (!input.addresses.includes(address) || shared !== 0 && bound2.port !== shared) {
15609
- open2.delete(address);
15617
+ open3.delete(address);
15610
15618
  yield* Scope3.close(bound2.scope, Exit6.void);
15611
15619
  }
15612
15620
  }
15613
15621
  const failures = [];
15614
15622
  for (const address of input.addresses) {
15615
- if (open2.has(address)) continue;
15623
+ if (open3.has(address)) continue;
15616
15624
  const result = yield* bind(address, shared);
15617
- if (result.kind === "bound") open2.set(address, result.bound);
15625
+ if (result.kind === "bound") open3.set(address, result.bound);
15618
15626
  else failures.push(result.failure);
15619
15627
  }
15620
15628
  const failure3 = failures.includes("address-in-use") ? "address-in-use" : failures[0];
15621
15629
  const bound = input.addresses.filter(
15622
- (address) => open2.has(address)
15630
+ (address) => open3.has(address)
15623
15631
  );
15624
- const first = bound[0] === void 0 ? void 0 : open2.get(bound[0]);
15632
+ const first = bound[0] === void 0 ? void 0 : open3.get(bound[0]);
15625
15633
  return {
15626
15634
  port: input.port === "server" || !first ? shared : first.port,
15627
15635
  bound,
@@ -18095,8 +18103,8 @@ var GuardedFilesystemError = class extends Data2.TaggedError(
18095
18103
  };
18096
18104
 
18097
18105
  // apps/server/src/adapters/files/guarded-filesystem-syscalls.ts
18098
- import { constants as constants3 } from "node:fs";
18099
- import { open, opendir } from "node:fs/promises";
18106
+ import { constants as constants4 } from "node:fs";
18107
+ import { open as open2, opendir } from "node:fs/promises";
18100
18108
  function syscall(work) {
18101
18109
  return Effect158.uninterruptible(
18102
18110
  Effect158.tryPromise({
@@ -18107,7 +18115,7 @@ function syscall(work) {
18107
18115
  }
18108
18116
  var openGuardedFile = (path, flags, mode) => Effect158.acquireRelease(
18109
18117
  syscall(
18110
- () => open(path, flags | constants3.O_NOFOLLOW | constants3.O_NONBLOCK, mode)
18118
+ () => open2(path, flags | constants4.O_NOFOLLOW | constants4.O_NONBLOCK, mode)
18111
18119
  ),
18112
18120
  (handle) => syscall(() => handle.close()).pipe(Effect158.orDie)
18113
18121
  );
@@ -30352,7 +30360,7 @@ function toGitChange(comparison) {
30352
30360
  }
30353
30361
 
30354
30362
  // apps/server/src/adapters/changes/git-change-diff-reader.ts
30355
- var gitChangeDiffReaderLayer = (open2) => Layer252.effect(
30363
+ var gitChangeDiffReaderLayer = (open3) => Layer252.effect(
30356
30364
  ChangeDiffReader,
30357
30365
  Effect370.gen(function* () {
30358
30366
  const provideGit = yield* captureGitPlatform();
@@ -30361,7 +30369,7 @@ var gitChangeDiffReaderLayer = (open2) => Layer252.effect(
30361
30369
  (input) => readGitEffect(
30362
30370
  input.worktreeId,
30363
30371
  Effect370.gen(function* () {
30364
- const { checkout, limits } = yield* open2(input.worktreeId);
30372
+ const { checkout, limits } = yield* open3(input.worktreeId);
30365
30373
  yield* checkout.verify();
30366
30374
  const diffs = yield* readDiffs(
30367
30375
  checkout,
@@ -30378,7 +30386,7 @@ var gitChangeDiffReaderLayer = (open2) => Layer252.effect(
30378
30386
 
30379
30387
  // apps/server/src/adapters/changes/git-change-status-reader.ts
30380
30388
  import { Effect as Effect371, Layer as Layer253 } from "effect";
30381
- var gitChangeStatusReaderLayer = (open2) => Layer253.effect(
30389
+ var gitChangeStatusReaderLayer = (open3) => Layer253.effect(
30382
30390
  ChangeStatusReader,
30383
30391
  Effect371.gen(function* () {
30384
30392
  const provideGit = yield* captureGitPlatform();
@@ -30387,7 +30395,7 @@ var gitChangeStatusReaderLayer = (open2) => Layer253.effect(
30387
30395
  (input) => readGitEffect(
30388
30396
  input.worktreeId,
30389
30397
  Effect371.gen(function* () {
30390
- const { checkout, limits } = yield* open2(input.worktreeId);
30398
+ const { checkout, limits } = yield* open3(input.worktreeId);
30391
30399
  return yield* readWorktreeSummary(checkout, limits);
30392
30400
  }).pipe(provideGit)
30393
30401
  )
@@ -30396,7 +30404,7 @@ var gitChangeStatusReaderLayer = (open2) => Layer253.effect(
30396
30404
  (input) => readGitEffect(
30397
30405
  input.worktreeId,
30398
30406
  Effect371.gen(function* () {
30399
- const { checkout, limits } = yield* open2(input.worktreeId);
30407
+ const { checkout, limits } = yield* open3(input.worktreeId);
30400
30408
  const status2 = yield* readCheckoutStatus(checkout, limits);
30401
30409
  return {
30402
30410
  statusToken: status2.statusToken,
@@ -30418,7 +30426,7 @@ var gitChangeStatusReaderLayer = (open2) => Layer253.effect(
30418
30426
  (input) => readGitEffect(
30419
30427
  input.worktreeId,
30420
30428
  Effect371.gen(function* () {
30421
- const { checkout, limits } = yield* open2(input.worktreeId);
30429
+ const { checkout, limits } = yield* open3(input.worktreeId);
30422
30430
  const details = yield* readBranchDetails(
30423
30431
  checkout,
30424
30432
  input.branchName ?? null,
@@ -30447,7 +30455,7 @@ import { join as join8 } from "node:path";
30447
30455
  // apps/server/src/adapters/changes/worktree-files.ts
30448
30456
  import { Effect as Effect373 } from "effect";
30449
30457
  import { createHash as createHash10 } from "node:crypto";
30450
- import { constants as constants4 } from "node:fs";
30458
+ import { constants as constants5 } from "node:fs";
30451
30459
  import { lstat as lstat5, readlink } from "node:fs/promises";
30452
30460
  import { dirname as dirname3, join as join7, sep as sep3 } from "node:path";
30453
30461
 
@@ -30624,7 +30632,7 @@ var stampPath = Effect373.fn("stampPath")(
30624
30632
  var digestFile = Effect373.fn("readWorktreeFiles.digestFile")(
30625
30633
  (full, classified, maxBytes, buffer) => Effect373.scoped(
30626
30634
  Effect373.gen(function* () {
30627
- const handle = yield* openGuardedFile(full, constants4.O_RDONLY);
30635
+ const handle = yield* openGuardedFile(full, constants5.O_RDONLY);
30628
30636
  const opened = yield* syscall(() => handle.stat({ bigint: true }));
30629
30637
  if (!opened.isFile() || !sameFile(classified, opened))
30630
30638
  return { kind: "other" };
@@ -30652,7 +30660,7 @@ var digestFile = Effect373.fn("readWorktreeFiles.digestFile")(
30652
30660
  );
30653
30661
 
30654
30662
  // apps/server/src/adapters/changes/git-worktree-side-reader.ts
30655
- var gitWorktreeSideReaderLayer = (open2, options) => Layer254.effect(
30663
+ var gitWorktreeSideReaderLayer = (open3, options) => Layer254.effect(
30656
30664
  WorktreeSideReader,
30657
30665
  Effect374.gen(function* () {
30658
30666
  const provideGit = yield* captureGitPlatform();
@@ -30660,7 +30668,7 @@ var gitWorktreeSideReaderLayer = (open2, options) => Layer254.effect(
30660
30668
  readEntries: Effect374.fn("GitWorktreeSideReader.readEntries")(function* (input) {
30661
30669
  const { worktree } = yield* readGitEffect(
30662
30670
  input.worktreeId,
30663
- open2(input.worktreeId).pipe(provideGit)
30671
+ open3(input.worktreeId).pipe(provideGit)
30664
30672
  );
30665
30673
  return yield* readWorktreeFiles(
30666
30674
  worktree.path,
@@ -30675,7 +30683,7 @@ var gitWorktreeSideReaderLayer = (open2, options) => Layer254.effect(
30675
30683
  return yield* readGitEffect(
30676
30684
  input.worktreeId,
30677
30685
  Effect374.gen(function* () {
30678
- const { checkout, limits } = yield* open2(input.worktreeId);
30686
+ const { checkout, limits } = yield* open3(input.worktreeId);
30679
30687
  yield* checkout.verify();
30680
30688
  return yield* readSubmoduleHeads(checkout, input.paths, limits);
30681
30689
  }).pipe(provideGit)
@@ -30685,7 +30693,7 @@ var gitWorktreeSideReaderLayer = (open2, options) => Layer254.effect(
30685
30693
  function* (input) {
30686
30694
  const { worktree } = yield* readGitEffect(
30687
30695
  input.worktreeId,
30688
- open2(input.worktreeId).pipe(provideGit)
30696
+ open3(input.worktreeId).pipe(provideGit)
30689
30697
  );
30690
30698
  return yield* stampPath(
30691
30699
  join8(worktree.administrativeDirectory, "index")
@@ -31025,7 +31033,7 @@ var ReadTextFileService = class _ReadTextFileService extends Context308.Service(
31025
31033
  };
31026
31034
 
31027
31035
  // apps/server/src/adapters/files/filesystem-file-reader.ts
31028
- import { constants as constants5 } from "node:fs";
31036
+ import { constants as constants6 } from "node:fs";
31029
31037
  import { Effect as Effect382, Layer as Layer261 } from "effect";
31030
31038
 
31031
31039
  // apps/server/src/adapters/files/read-guarded-worktree.ts
@@ -31063,7 +31071,7 @@ var filesystemFileReaderLayer = (worktrees) => Layer261.sync(FileReader, () => {
31063
31071
  return { kind: "failed", failure: "unreadable" };
31064
31072
  const handle = yield* openGuardedFile(
31065
31073
  before.path,
31066
- constants5.O_RDONLY
31074
+ constants6.O_RDONLY
31067
31075
  );
31068
31076
  const opened = yield* syscall(() => handle.stat({ bigint: true }));
31069
31077
  if (!opened.isFile() || !sameFile(before.info, opened))
@@ -31116,7 +31124,7 @@ function decodedText(bytes) {
31116
31124
 
31117
31125
  // apps/server/src/adapters/files/git-head-text-reader.ts
31118
31126
  import { Effect as Effect383, Layer as Layer262 } from "effect";
31119
- var gitHeadTextReaderLayer = (open2) => Layer262.effect(
31127
+ var gitHeadTextReaderLayer = (open3) => Layer262.effect(
31120
31128
  HeadTextReader,
31121
31129
  Effect383.gen(function* () {
31122
31130
  const provideGit = yield* captureGitPlatform();
@@ -31125,7 +31133,7 @@ var gitHeadTextReaderLayer = (open2) => Layer262.effect(
31125
31133
  (input) => readGitEffect(
31126
31134
  input.worktreeId,
31127
31135
  Effect383.gen(function* () {
31128
- const { checkout, limits } = yield* open2(input.worktreeId);
31136
+ const { checkout, limits } = yield* open3(input.worktreeId);
31129
31137
  yield* checkout.verify();
31130
31138
  const blob = yield* readBlobAtOid(
31131
31139
  checkout,
@@ -32420,7 +32428,7 @@ function entryKind(entry) {
32420
32428
  // apps/server/src/adapters/files/filesystem-file-writer.ts
32421
32429
  import { Effect as Effect408, Layer as Layer286 } from "effect";
32422
32430
  import { randomUUID as randomUUID10 } from "node:crypto";
32423
- import { constants as constants6 } from "node:fs";
32431
+ import { constants as constants7 } from "node:fs";
32424
32432
  import {
32425
32433
  link,
32426
32434
  lstat as lstat7,
@@ -32433,7 +32441,7 @@ import {
32433
32441
  } from "node:fs/promises";
32434
32442
  import { basename as basename2, dirname as dirname4, join as join10 } from "node:path";
32435
32443
  import trash from "trash";
32436
- var exclusiveWrite = constants6.O_WRONLY | constants6.O_CREAT | constants6.O_EXCL;
32444
+ var exclusiveWrite = constants7.O_WRONLY | constants7.O_CREAT | constants7.O_EXCL;
32437
32445
  var parent = Effect408.fn("FilesystemFileWriter.parent")(function* (target) {
32438
32446
  const folder = dirname4(target.path);
32439
32447
  const inspected = yield* inspectPath({
@@ -32700,7 +32708,7 @@ var filesystemFileWriterLayer = (worktrees, options) => Layer286.sync(FileWriter
32700
32708
  destinationParent.path,
32701
32709
  basename2(input.destination)
32702
32710
  );
32703
- const reading = yield* openGuardedFile(source, constants6.O_RDONLY);
32711
+ const reading = yield* openGuardedFile(source, constants7.O_RDONLY);
32704
32712
  if (!sameFile(
32705
32713
  info,
32706
32714
  yield* syscall(() => reading.stat({ bigint: true }))