@agimon-ai/po-git 0.0.0-alpha.22 → 0.0.0-alpha.24

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.
@@ -1,11 +1,12 @@
1
1
  import { createApiClient, defineActivityGroup, defineChannelFile, defineFill, defineGlobalStore, defineNativePlugin, defineSessionStore, defineWebLifecycle, nativeApiTransport, sessionApiAddress } from "@agimon-ai/po-core/native";
2
- import { BranchIcon, Button, Dot, Input, ListRow, Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle, Textarea, fontOf } from "@agimon-ai/po-native-components";
2
+ import { ArrowRightIcon, BranchIcon, Button, Dot, Input, ListRow, Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle, Textarea, fontOf } from "@agimon-ai/po-native-components";
3
3
  import { createElement, useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { View } from "react-native-unistyles/components/native/View";
5
5
  import { Text } from "react-native-unistyles/components/native/Text";
6
6
  import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
7
7
  import { StyleSheet } from "react-native-unistyles";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ import { Pressable } from "react-native-unistyles/components/native/Pressable";
9
10
  //#region src/types/webWorktrees.ts
10
11
  /**
11
12
  * The cockpit's view of this session's worktrees.
@@ -170,7 +171,7 @@ function WorktreesPanel({ sessionId, sessionReservationId, openSession }) {
170
171
  const [closing, setClosing] = useState();
171
172
  const busy = state.pending !== void 0;
172
173
  return /* @__PURE__ */ jsxs(ScrollView, {
173
- contentContainerStyle: styles$1.body,
174
+ contentContainerStyle: styles$2.body,
174
175
  children: [
175
176
  /* @__PURE__ */ jsx(Button, {
176
177
  testID: "git-worktree-create",
@@ -179,15 +180,15 @@ function WorktreesPanel({ sessionId, sessionReservationId, openSession }) {
179
180
  children: "Create a worktree"
180
181
  }),
181
182
  state.pending ? /* @__PURE__ */ jsx(Text, {
182
- style: styles$1.meta,
183
+ style: styles$2.meta,
183
184
  children: state.pending
184
185
  }) : null,
185
186
  state.error ? /* @__PURE__ */ jsx(Text, {
186
- style: styles$1.error,
187
+ style: styles$2.error,
187
188
  children: state.error
188
189
  }) : null,
189
190
  state.worktrees.map((worktree) => /* @__PURE__ */ jsxs(View, {
190
- style: styles$1.card,
191
+ style: styles$2.card,
191
192
  children: [
192
193
  /* @__PURE__ */ jsx(ListRow, {
193
194
  title: worktree.branch,
@@ -208,14 +209,14 @@ function WorktreesPanel({ sessionId, sessionReservationId, openSession }) {
208
209
  ]
209
210
  }, worktree.id)),
210
211
  state.worktrees.length === 0 ? /* @__PURE__ */ jsx(Text, {
211
- style: styles$1.meta,
212
+ style: styles$2.meta,
212
213
  children: "No worktrees yet. A worktree is its own checkout, branch and session."
213
214
  }) : null,
214
215
  /* @__PURE__ */ jsx(Sheet, {
215
216
  open: creating,
216
217
  onOpenChange: setCreating,
217
218
  children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Create a worktree" }) }), /* @__PURE__ */ jsx(SheetBody, { children: /* @__PURE__ */ jsxs(View, {
218
- style: styles$1.body,
219
+ style: styles$2.body,
219
220
  children: [
220
221
  /* @__PURE__ */ jsx(Input, {
221
222
  accessibilityLabel: "Branch",
@@ -230,7 +231,7 @@ function WorktreesPanel({ sessionId, sessionReservationId, openSession }) {
230
231
  onChangeText: setBaseRef
231
232
  }),
232
233
  /* @__PURE__ */ jsx(Text, {
233
- style: styles$1.meta,
234
+ style: styles$2.meta,
234
235
  children: "Creates the worktree outside the repository and starts a session nested under this one."
235
236
  }),
236
237
  /* @__PURE__ */ jsx(Button, {
@@ -255,7 +256,7 @@ function WorktreesPanel({ sessionId, sessionReservationId, openSession }) {
255
256
  if (!open) setClosing(void 0);
256
257
  },
257
258
  children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Close this worktree?" }) }), /* @__PURE__ */ jsxs(SheetBody, { children: [/* @__PURE__ */ jsx(Text, {
258
- style: styles$1.meta,
259
+ style: styles$2.meta,
259
260
  children: "The checkout is removed. Git refuses a dirty worktree."
260
261
  }), /* @__PURE__ */ jsx(Button, {
261
262
  variant: "danger-outline",
@@ -270,7 +271,7 @@ function WorktreesPanel({ sessionId, sessionReservationId, openSession }) {
270
271
  ]
271
272
  });
272
273
  }
273
- const styles$1 = StyleSheet.create((theme) => ({
274
+ const styles$2 = StyleSheet.create((theme) => ({
274
275
  body: {
275
276
  padding: theme.spacing(3),
276
277
  gap: theme.spacing(2),
@@ -708,14 +709,14 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
708
709
  const sync = (action) => requestGitSync(sessionId, action);
709
710
  const forceRequired = activity.error !== dismissedError && activity.errorTarget?.action === "push" && activity.errorTarget.forceRequired === true;
710
711
  return /* @__PURE__ */ jsxs(ScrollView, {
711
- contentContainerStyle: styles.body,
712
+ contentContainerStyle: styles$1.body,
712
713
  children: [
713
714
  /* @__PURE__ */ jsx(Text, {
714
- style: styles.title,
715
+ style: styles$1.title,
715
716
  children: changes?.branch ?? "Detached HEAD"
716
717
  }),
717
718
  /* @__PURE__ */ jsxs(Text, {
718
- style: styles.meta,
719
+ style: styles$1.meta,
719
720
  children: [
720
721
  changes?.base ? `vs ${changes.base}` : "Uncommitted changes",
721
722
  " · +",
@@ -727,7 +728,7 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
727
728
  ]
728
729
  }),
729
730
  /* @__PURE__ */ jsxs(View, {
730
- style: styles.actions,
731
+ style: styles$1.actions,
731
732
  children: [
732
733
  /* @__PURE__ */ jsx(Button, {
733
734
  variant: "outline",
@@ -750,11 +751,11 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
750
751
  ]
751
752
  }),
752
753
  activity.pending ? /* @__PURE__ */ jsx(Text, {
753
- style: styles.meta,
754
+ style: styles$1.meta,
754
755
  children: activity.pending
755
756
  }) : null,
756
757
  activity.error && activity.error !== dismissedError ? /* @__PURE__ */ jsxs(View, { children: [/* @__PURE__ */ jsx(Text, {
757
- style: styles.error,
758
+ style: styles$1.error,
758
759
  children: activity.error
759
760
  }), /* @__PURE__ */ jsx(Button, {
760
761
  variant: "ghost",
@@ -768,10 +769,10 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
768
769
  children: "Force push with lease…"
769
770
  }) : null,
770
771
  paused ? /* @__PURE__ */ jsxs(View, {
771
- style: styles.body,
772
+ style: styles$1.body,
772
773
  children: [
773
774
  /* @__PURE__ */ jsxs(Text, {
774
- style: styles.error,
775
+ style: styles$1.error,
775
776
  children: ["Rebase paused\\n", changes.rebase?.conflicts.join("\n")]
776
777
  }),
777
778
  /* @__PURE__ */ jsx(Button, {
@@ -788,7 +789,7 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
788
789
  ]
789
790
  }) : null,
790
791
  error ? /* @__PURE__ */ jsx(Text, {
791
- style: styles.error,
792
+ style: styles$1.error,
792
793
  children: error
793
794
  }) : null,
794
795
  summary ? summary.files.map((entry) => /* @__PURE__ */ jsxs(Button, {
@@ -805,30 +806,30 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
805
806
  entry.removed
806
807
  ]
807
808
  }, entry.path)) : /* @__PURE__ */ jsx(Text, {
808
- style: styles.meta,
809
+ style: styles$1.meta,
809
810
  children: "Loading changes…"
810
811
  }),
811
812
  summary?.files.length === 0 ? /* @__PURE__ */ jsx(Text, {
812
- style: styles.meta,
813
+ style: styles$1.meta,
813
814
  children: summary.repository ? "No changed files" : "Not a Git checkout"
814
815
  }) : null,
815
816
  summary?.truncated ? /* @__PURE__ */ jsx(Text, {
816
- style: styles.meta,
817
+ style: styles$1.meta,
817
818
  children: "The file list was truncated."
818
819
  }) : null,
819
820
  file ? /* @__PURE__ */ jsxs(View, {
820
- style: styles.body,
821
+ style: styles$1.body,
821
822
  children: [
822
823
  /* @__PURE__ */ jsx(Text, {
823
- style: styles.title,
824
+ style: styles$1.title,
824
825
  children: file.path
825
826
  }),
826
827
  file.binary || file.tooLarge ? /* @__PURE__ */ jsx(Text, {
827
- style: styles.meta,
828
+ style: styles$1.meta,
828
829
  children: file.binary ? "Binary file" : "Diff too large to display"
829
830
  }) : file.hunks.map((hunk, index) => /* @__PURE__ */ jsx(View, { children: hunk.rows.map((row, rowIndex) => /* @__PURE__ */ jsxs(Text, {
830
831
  selectable: true,
831
- style: styles.diff(row.marker),
832
+ style: styles$1.diff(row.marker),
832
833
  onPress: () => {
833
834
  setDraft({
834
835
  path: file.path,
@@ -860,7 +861,7 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
860
861
  ]
861
862
  }) : null,
862
863
  comments.map((item) => /* @__PURE__ */ jsxs(View, { children: [/* @__PURE__ */ jsxs(Text, {
863
- style: styles.meta,
864
+ style: styles$1.meta,
864
865
  children: [
865
866
  item.relPath,
866
867
  item.startLine === void 0 ? "" : `:${item.startLine}-${item.endLine ?? item.startLine}`,
@@ -873,7 +874,7 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
873
874
  children: "Remove comment"
874
875
  })] }, item.id)),
875
876
  comments.length > 0 ? /* @__PURE__ */ jsxs(View, {
876
- style: styles.actions,
877
+ style: styles$1.actions,
877
878
  children: [/* @__PURE__ */ jsx(Button, {
878
879
  onPress: () => {
879
880
  const body = comments.map((item) => {
@@ -894,7 +895,7 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
894
895
  if (!open) setDraft(void 0);
895
896
  },
896
897
  children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Review comment" }) }), /* @__PURE__ */ jsx(SheetBody, { children: /* @__PURE__ */ jsxs(View, {
897
- style: styles.body,
898
+ style: styles$1.body,
898
899
  children: [
899
900
  draft?.rows.length ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Input, {
900
901
  accessibilityLabel: "Start line",
@@ -944,7 +945,7 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
944
945
  if (!open) setConfirm(void 0);
945
946
  },
946
947
  children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: confirm === "force" ? "Force push with lease?" : confirm === "abort" ? "Abort rebase?" : "Discard review?" }) }), /* @__PURE__ */ jsxs(SheetBody, { children: [/* @__PURE__ */ jsx(Text, {
947
- style: styles.meta,
948
+ style: styles$1.meta,
948
949
  children: confirm === "force" ? "Git refuses this if the remote holds commits you never fetched and integrated." : confirm === "abort" ? "Abort discards any conflict resolution in progress." : "Your queued comments will be removed."
949
950
  }), /* @__PURE__ */ jsx(Button, {
950
951
  variant: "danger-outline",
@@ -960,7 +961,7 @@ function GitReviewPanel({ sessionId, sendSessionFrame }) {
960
961
  ]
961
962
  });
962
963
  }
963
- const styles = StyleSheet.create((theme) => ({
964
+ const styles$1 = StyleSheet.create((theme) => ({
964
965
  body: {
965
966
  padding: theme.spacing(3),
966
967
  gap: theme.spacing(2),
@@ -1002,38 +1003,129 @@ function WorktreesActivitySection({ sessionId, openTransientTab }) {
1002
1003
  const git = useGitChanges(sessionId);
1003
1004
  const state = useWorktrees(sessionId);
1004
1005
  const worktrees = state.worktrees.filter((item) => item.sessionId !== sessionId);
1005
- return /* @__PURE__ */ jsxs(View, { children: [
1006
- git.changes ? /* @__PURE__ */ jsxs(Button, {
1007
- variant: "ghost",
1008
- testID: "activity-diff-changes",
1009
- onPress: () => openTransientTab(reviewTab()),
1010
- children: [
1011
- git.changes.branch ?? "Detached HEAD",
1012
- " · +",
1013
- git.changes.added,
1014
- " -",
1015
- git.changes.removed
1016
- ]
1017
- }) : null,
1018
- state.pending ? /* @__PURE__ */ jsx(ListRow, { title: state.pending }) : null,
1019
- worktrees.map((item) => /* @__PURE__ */ jsx(ListRow, {
1020
- leading: /* @__PURE__ */ jsx(Dot, { tone: item.orphaned ? "red" : item.sessionId === null ? "muted" : "blue" }),
1021
- title: /* @__PURE__ */ jsx(Button, {
1022
- variant: "ghost",
1023
- onPress: () => openTransientTab(worktreesTab()),
1024
- children: item.branch
1025
- }),
1026
- description: [item.orphaned ? "Orphaned" : "", item.unowned ? "Unowned" : ""].filter(Boolean).join(" · ")
1027
- }, item.id)),
1028
- worktrees.length === 0 && state.pending === void 0 ? /* @__PURE__ */ jsx(Button, {
1029
- variant: "ghost",
1030
- testID: "activity-git-create",
1031
- disabled: sessionId === null,
1032
- onPress: () => openTransientTab(worktreesTab()),
1033
- children: "Create a worktree"
1034
- }) : null
1035
- ] });
1006
+ return /* @__PURE__ */ jsxs(View, {
1007
+ style: styles.section,
1008
+ children: [
1009
+ git.changes ? /* @__PURE__ */ jsxs(Pressable, {
1010
+ accessibilityRole: "button",
1011
+ accessibilityLabel: `${git.changes.branch ?? "Detached HEAD"}, ${git.changes.added} added, ${git.changes.removed} removed`,
1012
+ testID: "activity-diff-changes",
1013
+ onPress: () => openTransientTab(reviewTab()),
1014
+ style: styles.changes,
1015
+ children: [
1016
+ /* @__PURE__ */ jsx(Text, {
1017
+ numberOfLines: 1,
1018
+ style: styles.branch,
1019
+ children: git.changes.branch ?? "Detached HEAD"
1020
+ }),
1021
+ /* @__PURE__ */ jsxs(Text, {
1022
+ style: styles.added,
1023
+ children: ["+", git.changes.added]
1024
+ }),
1025
+ /* @__PURE__ */ jsxs(Text, {
1026
+ style: styles.removed,
1027
+ children: ["-", git.changes.removed]
1028
+ })
1029
+ ]
1030
+ }) : null,
1031
+ state.pending ? /* @__PURE__ */ jsx(ListRow, { title: state.pending }) : null,
1032
+ worktrees.map((item) => /* @__PURE__ */ jsx(ListRow, {
1033
+ leading: /* @__PURE__ */ jsx(Dot, { tone: item.orphaned ? "red" : item.sessionId === null ? "muted" : "blue" }),
1034
+ title: /* @__PURE__ */ jsx(Button, {
1035
+ variant: "ghost",
1036
+ onPress: () => openTransientTab(worktreesTab()),
1037
+ children: item.branch
1038
+ }),
1039
+ description: [item.orphaned ? "Orphaned" : "", item.unowned ? "Unowned" : ""].filter(Boolean).join(" · ")
1040
+ }, item.id)),
1041
+ worktrees.length === 0 && state.pending === void 0 ? /* @__PURE__ */ jsxs(View, {
1042
+ style: styles.idle,
1043
+ children: [/* @__PURE__ */ jsx(Text, {
1044
+ style: styles.status,
1045
+ children: "Idle"
1046
+ }), /* @__PURE__ */ jsxs(Pressable, {
1047
+ accessibilityRole: "button",
1048
+ accessibilityState: { disabled: sessionId === null },
1049
+ testID: "activity-git-create",
1050
+ disabled: sessionId === null,
1051
+ hitSlop: 10,
1052
+ onPress: () => openTransientTab(worktreesTab()),
1053
+ style: styles.action,
1054
+ children: [/* @__PURE__ */ jsx(Text, {
1055
+ style: styles.actionText(sessionId === null),
1056
+ children: "Create a worktree"
1057
+ }), /* @__PURE__ */ jsx(ArrowRightIcon, {
1058
+ size: 14,
1059
+ color: sessionId === null ? "dim" : "green"
1060
+ })]
1061
+ })]
1062
+ }) : null
1063
+ ]
1064
+ });
1036
1065
  }
1066
+ const styles = StyleSheet.create((theme) => {
1067
+ const sm = {
1068
+ fontFamily: fontOf(theme.fontFamily.sans),
1069
+ fontSize: theme.fontSize.sm,
1070
+ lineHeight: theme.lineHeight.sm
1071
+ };
1072
+ return {
1073
+ section: {
1074
+ gap: theme.spacing(1.5),
1075
+ uni__dependencies: [0]
1076
+ },
1077
+ changes: {
1078
+ flexDirection: "row",
1079
+ alignItems: "center",
1080
+ gap: theme.spacing(2),
1081
+ uni__dependencies: [0]
1082
+ },
1083
+ branch: {
1084
+ ...sm,
1085
+ flex: 1,
1086
+ fontFamily: fontOf(theme.fontFamily.mono),
1087
+ fontWeight: theme.fontWeight.semibold,
1088
+ color: theme.colors.hi,
1089
+ uni__dependencies: [0]
1090
+ },
1091
+ added: {
1092
+ ...sm,
1093
+ color: theme.colors.green,
1094
+ uni__dependencies: [0]
1095
+ },
1096
+ removed: {
1097
+ ...sm,
1098
+ color: theme.colors.red,
1099
+ uni__dependencies: [0]
1100
+ },
1101
+ idle: {
1102
+ flexDirection: "row",
1103
+ alignItems: "center",
1104
+ flexWrap: "wrap",
1105
+ gap: theme.spacing(4),
1106
+ uni__dependencies: [0]
1107
+ },
1108
+ status: {
1109
+ ...sm,
1110
+ color: theme.colors.dim,
1111
+ uni__dependencies: [0]
1112
+ },
1113
+ action: {
1114
+ flexDirection: "row",
1115
+ alignItems: "center",
1116
+ gap: theme.spacing(1),
1117
+ uni__dependencies: [0]
1118
+ },
1119
+ actionText: (disabled) => ({
1120
+ fontFamily: fontOf(theme.fontFamily.sans),
1121
+ fontSize: theme.fontSize.base,
1122
+ lineHeight: theme.lineHeight.base,
1123
+ fontWeight: theme.fontWeight.medium,
1124
+ color: disabled ? theme.colors.dim : theme.colors.green,
1125
+ uni__dependencies: [0]
1126
+ })
1127
+ };
1128
+ });
1037
1129
  //#endregion
1038
1130
  //#region src/extensions/workspaces/sessions/(frontend)/fill/Worktrees.activity.git.native.tsx
1039
1131
  var Worktrees_activity_git_native_default = defineFill({ component: WorktreesActivitySection });
@@ -1 +1 @@
1
- {"version":3,"file":"native.mjs","names":["isRecord","optionalText","optionalErrorTarget","WebPluginSlotProps","Button","Input","ListRow","Sheet","SheetBody","SheetContent","SheetHeader","SheetTitle","useCallback","useState","useSyncExternalStore","StyleSheet","requestWorktreeClose","requestWorktreeCreate","worktreeActivity","useWorktrees","sessionId","subscribe","listener","sub","store","unsubscribe","select","state","worktreesTab","Parameters","id","label","panel","WorktreesPanel","sessionReservationId","openSession","creating","setCreating","branch","setBranch","baseRef","setBaseRef","closing","setClosing","busy","pending","undefined","styles","body","meta","error","worktrees","map","worktree","card","path","orphaned","unowned","length","trim","open","create","theme","padding","spacing","gap","uni__dependencies","borderWidth","borderColor","colors","borderRadius","md","backgroundColor","color","dim","fontSize","sm","red","styles","isRecord","WebPluginSlotProps","Button","Input","Sheet","SheetBody","SheetContent","SheetHeader","SheetTitle","Textarea","fontOf","useCallback","useEffect","useRef","useState","useSyncExternalStore","StyleSheet","GitDiffRow","GitReviewFileDiff","GitReviewSummary","GitSyncAction","gitChanges","requestGitSync","fetchReviewFile","fetchReviewSummary","addReviewComment","clearReviewComments","gitReview","removeReviewComment","conflictPrompt","deliverToAgent","reviewHeading","useGitChanges","sessionId","subscribe","listener","sub","store","unsubscribe","select","state","reviewTab","Parameters","id","label","panel","GitReviewPanel","sendSessionFrame","activity","comments","summary","setSummary","file","setFile","error","setError","dismissedError","setDismissedError","confirm","setConfirm","draft","setDraft","path","rows","comment","setComment","start","setStart","end","setEnd","request","AbortController","undefined","fingerprint","JSON","stringify","changes","controller","signal","then","result","aborted","ok","catch","cause","Error","message","String","abort","current","loadFile","diff","busy","pending","paused","rebase","send","onSent","failure","sync","action","forceRequired","errorTarget","styles","body","title","branch","meta","base","added","removed","upstream","ahead","behind","ref","actions","conflicts","join","files","map","entry","status","length","repository","truncated","binary","tooLarge","hunks","hunk","index","row","rowIndex","marker","line","content","item","relPath","startLine","endLine","anchor","side","quoted","snippet","split","slice","trim","open","Boolean","Number","isInteger","filter","kept","numbered","Math","min","max","create","theme","padding","spacing","gap","uni__dependencies","flexDirection","flexWrap","color","colors","hi","fontSize","fontWeight","dim","sm","red","fontFamily","mono","green","text","paddingVertical","WebPluginSlotProps","Button","Dot","ListRow","reviewTab","useGitChanges","useWorktrees","worktreesTab","WorktreesActivitySection","sessionId","openTransientTab","git","state","worktrees","filter","item","changes","branch","added","removed","pending","map","id","orphaned","unowned","Boolean","join","length","undefined","activityGroupGit","channelGitChanges","channelGitWorktrees","fillWorktrees","lifecycleStart"],"sources":["../../src/types/webWorktrees.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/worktreesActivityStore.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/WorktreesPanel.native.tsx","../../src/types/gitReview.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/gitChangesStore.native.ts","../../src/extensions/workspaces/sessions/(frontend)/activity-group/git.native.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/git-changes.native.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/git-worktrees.native.ts","../../src/types/apiRoutes.ts","../../generated/client.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/gitReviewApi.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/gitReviewStore.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/gitReviewView.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/GitReviewPanel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/WorktreesActivitySection.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/Worktrees.activity.git.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.native.ts","../../generated/native.ts"],"sourcesContent":["/**\n * The cockpit's view of this session's worktrees.\n *\n * DESIGN PATTERNS:\n * - Declarations only. The channel frame type is a constant so the hub and the\n * page cannot drift apart on a string.\n * - A view is the subset of a record the dock needs, not the record. The\n * registry may hold paths and provenance the page has no business rendering.\n *\n * AVOID:\n * - Adding behaviour here. This file is imported by browser code, so it must\n * stay free of node builtins.\n */\n\n/** The data channel carrying one session's worktrees to the page. */\nexport const GIT_WORKTREES_TYPE = 'git_worktrees';\n\n/** One worktree, as the activity dock and its panel render it. */\nexport interface WorktreeView {\n id: string;\n branch: string;\n path: string;\n /** The session the hub started for this worktree, when it is still live. */\n sessionId: string | null;\n /** True once the directory the record names has gone missing. */\n orphaned: boolean;\n /**\n * True when the session that asked for this worktree is gone.\n *\n * An owned worktree is only ever shown to its own session. This flag marks\n * the exception: once the parent is dead nobody would see the worktree at\n * all, so every session in the repository does, and may close it.\n */\n unowned: boolean;\n}\n\n/**\n * What the panel asks the hub channel to do.\n *\n * The dock acts through its own channel rather than through the agent: a\n * worktree made from the panel and one made by the tool take the same\n * `worktreeOperations` path, but the panel no longer has to spend a turn of\n * the conversation to get there.\n */\nexport type GitWorktreesCommand =\n | { action: 'create'; branch: string; baseRef?: string; reservationId?: string }\n | { action: 'close'; id: string; force?: boolean };\n\nexport type WorktreeErrorTarget = { action: 'create' } | { action: 'close'; id: string };\n\nexport interface GitWorktreesPayload {\n worktrees: WorktreeView[];\n /** Label of the operation in flight, absent when the session is idle. */\n pending?: string;\n /** The last failure, cleared when the next command starts. */\n error?: string;\n /** The operation that produced the last failure, when known. */\n errorTarget?: WorktreeErrorTarget;\n}\n","/**\n * The dock's view of this session's worktrees, and the commands it sends.\n *\n * DESIGN PATTERNS:\n * - Session-scoped store fed by one hub channel. The hub is authoritative; the\n * page never reads a registry and never guesses.\n * - Actions are channel frames, not prompts. The hub half owns the tool's\n * operations, so the panel names the work and the hub performs it; a\n * worktree made from the dock is the same object the tool makes, without\n * spending a turn of the conversation to ask for it.\n * - The sender lives in a store rather than a module variable, because a web\n * plugin keeps no mutable module state and the page may reconnect.\n *\n * AVOID:\n * - Calling the hub package API from here. A dock slot gets no sealed request\n * transport, and raw fetch breaks the remote cockpit.\n * - `sendSessionFrame` for a command. It envelopes the frame as a session\n * command bound for the agent, which never reaches a channel's `receive`.\n */\nimport { defineGlobalStore, defineSessionStore, type WebPluginRuntime } from '@agimon-ai/po-core/native';\n\nimport {\n GIT_WORKTREES_TYPE,\n type GitWorktreesCommand,\n type WorktreeErrorTarget,\n type WorktreeView,\n} from '../../../../../types/webWorktrees';\n\nexport interface WorktreesSession {\n /** The worktrees the hub last reported for this session's repository. */\n worktrees: WorktreeView[];\n /** Label of the operation the hub is running for this session. */\n pending: string | undefined;\n /** The last failure the hub reported, shown until the next command. */\n error: string | undefined;\n /** The operation that produced the last failure, when known. */\n errorTarget?: WorktreeErrorTarget;\n}\n\nexport const worktreeActivity = defineSessionStore<WorktreesSession>({\n worktrees: [],\n pending: undefined,\n error: undefined,\n errorTarget: undefined,\n});\n\n/** Captures the clicked card, so a focus change cannot retarget an open dialog. */\nexport const worktreeCreateDialog = defineGlobalStore<{ sessionId: string; reservationId?: string } | null>(null);\n/**\n * The page's hub socket sender, held for as long as the plugin runs.\n *\n * Undefined before `startWorktreeRuntime` and after it disposes; a command\n * sent in that window is dropped rather than queued, because a queue would\n * replay a worktree create against a socket that has since changed sessions.\n */\nconst worktreeSender = defineGlobalStore<WebPluginRuntime['sendHubFrame'] | undefined>(undefined);\n\n/** Binds the page's hub socket. The plugin host calls this once per page. */\nexport function startWorktreeRuntime(runtime: WebPluginRuntime): () => void {\n // Wrapped rather than referenced: an unbound method would lose the runtime\n // it belongs to the moment the store hands it back.\n const send = (frame: Record<string, unknown>): void => {\n runtime.sendHubFrame(frame);\n };\n worktreeSender.update(() => send);\n return () => {\n worktreeSender.update((current) => (current === send ? undefined : current));\n worktreeCreateDialog.update(() => null);\n };\n}\n\n/**\n * Whether this session has worktree work in flight.\n *\n * A standing worktree is state, not work: it sits there until someone closes\n * it, so counting it would leave the session reading as busy forever, with a\n * \"background work is still running\" notice under a conversation where\n * nothing is running. Only a create or close actually in progress counts.\n *\n * The group stays visible either way. Declaring an active source at all is\n * what keeps it in the dock; this answers how it is drawn, not whether it is\n * there.\n */\nexport const worktreeActivitySource = {\n subscribe(listener: () => void) {\n const subscription = worktreeActivity.store.subscribe(listener);\n return () => subscription.unsubscribe();\n },\n isActive(sessionId: string | null) {\n return worktreeActivity.select(worktreeActivity.store.state, sessionId).pending !== undefined;\n },\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction optionalText(value: unknown): string | undefined {\n return typeof value === 'string' && value !== '' ? value : undefined;\n}\n\nfunction optionalErrorTarget(value: unknown): WorktreeErrorTarget | undefined {\n if (!isRecord(value)) return undefined;\n if (value.action === 'create') return { action: 'create' };\n if (value.action === 'close' && typeof value.id === 'string' && value.id !== '') {\n return { action: 'close', id: value.id };\n }\n return undefined;\n}\n\n/** The plugin's session data channel: 'git_worktrees' payloads into the store. */\nexport const worktreesChannel = worktreeActivity.channel<WorktreesSession>({\n channel: GIT_WORKTREES_TYPE,\n parse(input) {\n if (!isRecord(input) || !Array.isArray(input.worktrees)) return null;\n return {\n worktrees: input.worktrees.filter(isRecord) as unknown as WorktreeView[],\n pending: optionalText(input.pending),\n error: optionalText(input.error),\n errorTarget: optionalErrorTarget(input.errorTarget),\n };\n },\n reduce(_current, next) {\n return next;\n },\n});\n\n/** Sends one command to the session's worktrees channel. */\nfunction command(sessionId: string, payload: GitWorktreesCommand): void {\n worktreeSender.store.state?.({ type: GIT_WORKTREES_TYPE, sessionId, payload });\n}\n\n/** Asks the hub for a worktree. The hub answers on the same channel. */\nexport function requestWorktreeCreate(\n sessionId: string,\n branch: string,\n baseRef: string,\n reservationId?: string,\n): void {\n const trimmedBase = baseRef.trim();\n command(sessionId, {\n action: 'create',\n branch: branch.trim(),\n ...(trimmedBase === '' ? {} : { baseRef: trimmedBase }),\n ...(reservationId === undefined ? {} : { reservationId }),\n });\n}\n\n/** Asks the hub to close one worktree. Refusal on a dirty tree stays the hub's call. */\nexport function requestWorktreeClose(sessionId: string, id: string): void {\n command(sessionId, { action: 'close', id });\n}\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport {\n Button,\n Input,\n ListRow,\n Sheet,\n SheetBody,\n SheetContent,\n SheetHeader,\n SheetTitle,\n} from '@agimon-ai/po-native-components';\nimport { useCallback, useState, useSyncExternalStore } from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { requestWorktreeClose, requestWorktreeCreate, worktreeActivity } from '../_lib/worktreesActivityStore.native';\n\nexport function useWorktrees(sessionId: string | null) {\n const subscribe = useCallback((listener: () => void) => {\n const sub = worktreeActivity.store.subscribe(listener);\n return () => sub.unsubscribe();\n }, []);\n return useSyncExternalStore(subscribe, () => worktreeActivity.select(worktreeActivity.store.state, sessionId));\n}\nexport function worktreesTab(): Parameters<WebPluginSlotProps['openTransientTab']>[0] {\n return { id: 'git-worktrees', label: 'worktrees', panel: WorktreesPanel };\n}\nexport function WorktreesPanel({ sessionId, sessionReservationId, openSession }: WebPluginSlotProps) {\n const state = useWorktrees(sessionId);\n const [creating, setCreating] = useState(false);\n const [branch, setBranch] = useState('');\n const [baseRef, setBaseRef] = useState('');\n const [closing, setClosing] = useState<string>();\n const busy = state.pending !== undefined;\n return (\n <ScrollView contentContainerStyle={styles.body}>\n <Button testID=\"git-worktree-create\" disabled={sessionId === null || busy} onPress={() => setCreating(true)}>\n Create a worktree\n </Button>\n {state.pending ? <Text style={styles.meta}>{state.pending}</Text> : null}\n {state.error ? <Text style={styles.error}>{state.error}</Text> : null}\n {state.worktrees.map((worktree) => (\n <View key={worktree.id} style={styles.card}>\n <ListRow\n title={worktree.branch}\n description={`${worktree.path}${worktree.orphaned ? '\\nOrphaned' : ''}${worktree.unowned ? '\\nUnowned' : ''}`}\n />\n {worktree.sessionId && openSession ? (\n <Button variant=\"outline\" onPress={() => openSession(worktree.sessionId!)}>\n Open session\n </Button>\n ) : null}\n <Button\n variant=\"danger-outline\"\n disabled={sessionId === null || busy}\n testID={`git-worktree-close-${worktree.id}`}\n onPress={() => setClosing(worktree.id)}\n >\n Close worktree\n </Button>\n </View>\n ))}\n {state.worktrees.length === 0 ? (\n <Text style={styles.meta}>No worktrees yet. A worktree is its own checkout, branch and session.</Text>\n ) : null}\n <Sheet open={creating} onOpenChange={setCreating}>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Create a worktree</SheetTitle>\n </SheetHeader>\n <SheetBody>\n <View style={styles.body}>\n <Input accessibilityLabel=\"Branch\" placeholder=\"wt/fix-auth\" value={branch} onChangeText={setBranch} />\n <Input\n accessibilityLabel=\"Base ref\"\n placeholder=\"Base (current)\"\n value={baseRef}\n onChangeText={setBaseRef}\n />\n <Text style={styles.meta}>\n Creates the worktree outside the repository and starts a session nested under this one.\n </Text>\n <Button\n disabled={sessionId === null || busy || branch.trim() === ''}\n onPress={() => {\n if (sessionId === null) return;\n requestWorktreeCreate(sessionId, branch, baseRef, sessionReservationId);\n setCreating(false);\n if (sessionReservationId === undefined) {\n setBranch('');\n setBaseRef('');\n }\n }}\n >\n Create\n </Button>\n </View>\n </SheetBody>\n </SheetContent>\n </Sheet>\n <Sheet\n open={closing !== undefined}\n onOpenChange={(open) => {\n if (!open) setClosing(undefined);\n }}\n >\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Close this worktree?</SheetTitle>\n </SheetHeader>\n <SheetBody>\n <Text style={styles.meta}>The checkout is removed. Git refuses a dirty worktree.</Text>\n <Button\n variant=\"danger-outline\"\n disabled={busy}\n onPress={() => {\n if (sessionId !== null && closing !== undefined) requestWorktreeClose(sessionId, closing);\n setClosing(undefined);\n }}\n >\n Close worktree\n </Button>\n </SheetBody>\n </SheetContent>\n </Sheet>\n </ScrollView>\n );\n}\nconst styles = StyleSheet.create((theme) => ({\n body: { padding: theme.spacing(3), gap: theme.spacing(2) },\n card: {\n borderWidth: 1,\n borderColor: theme.colors['border-soft'],\n borderRadius: theme.borderRadius.md,\n backgroundColor: theme.colors.panel,\n padding: theme.spacing(2),\n gap: theme.spacing(1),\n },\n meta: { color: theme.colors.dim, fontSize: theme.fontSize.sm },\n error: { color: theme.colors.red, fontSize: theme.fontSize.sm },\n}));\n","/**\n * The cockpit's view of what this session changed against its base: the counts\n * the '# diff' group shows, what the review tab lists and draws, and the manual\n * sync that sits beside them.\n *\n * DESIGN PATTERNS:\n * - Declarations only, shared by the hub and the page.\n * - Its own channel, apart from worktrees. Worktrees are repository\n * management; the diff is this session's code change.\n * - A diff row carries one line number whose file follows from its marker: the\n * new file's for context and additions, the old file's for removals. It is\n * the same shape the shared DiffView draws.\n *\n * AVOID:\n * - Behaviour or node builtins. Browser code imports this file.\n */\n\n/** The session channel carrying this checkout's changes and the sync around them. */\nexport const GIT_CHANGES_TYPE = 'git_changes';\n\n/** The sync actions the review tab offers. */\nexport type GitSyncAction = 'pull' | 'push' | 'rebase' | 'abort-rebase';\n\n/** What the review tab asks the hub to run. `force` only follows a confirmed rejected push. */\nexport type GitChangesCommand =\n | { action: 'pull' }\n | { action: 'push'; force?: true }\n | { action: 'rebase' }\n | { action: 'abort-rebase' };\n\nexport type GitSyncErrorTarget =\n | { action: 'pull' | 'rebase' | 'abort-rebase' }\n /** A push the remote rejected as non-fast-forward; the tab offers a lease force after a confirm. */\n | { action: 'push'; forceRequired?: true };\n\nexport interface GitChangesPayload {\n /** Absent outside a git checkout. */\n changes?: GitChangesView;\n /** Label of the sync command in flight. */\n pending?: string;\n /** The last sync failure, cleared when the next command starts. */\n error?: string;\n errorTarget?: GitSyncErrorTarget;\n}\n\n/** What the session changed since its base, as the '# diff' lane and the review header show it. */\nexport interface GitChangesView {\n /** The checked-out branch; absent on a detached HEAD. */\n branch?: string;\n /** The ref the changes are measured against; absent when none resolved, so only uncommitted work counts. */\n base?: string;\n added: number;\n removed: number;\n files: number;\n /** More files changed than were counted. */\n truncated?: boolean;\n /** The branch's upstream and how far apart the two are. */\n upstream?: { ref: string; ahead: number; behind: number };\n /** Present while a rebase is paused on conflicts. */\n rebase?: { conflicts: string[] };\n}\n\nexport type GitReviewFileStatus = 'added' | 'modified' | 'deleted' | 'untracked' | 'conflicted';\n\n/** One changed file in the review list. */\nexport interface GitReviewFileEntry {\n /** Repository-relative, forward slashes. */\n path: string;\n status: GitReviewFileStatus;\n added: number;\n removed: number;\n binary?: boolean;\n}\n\n/** The review tab's file list. */\nexport interface GitReviewSummary {\n /** False when the session's directory is not a git checkout. */\n repository: boolean;\n branch?: string;\n base?: string;\n /** Short sha of the commit the diff starts from. */\n mergeBase?: string;\n files: GitReviewFileEntry[];\n truncated?: boolean;\n}\n\nexport interface GitDiffRow {\n marker: '+' | '-' | ' ';\n line: number;\n content: string;\n}\n\nexport interface GitDiffHunk {\n start: number;\n rows: GitDiffRow[];\n}\n\n/** One file's hunks, fetched when the reader expands it. */\nexport interface GitReviewFileDiff {\n path: string;\n hunks: GitDiffHunk[];\n binary?: true;\n /** The diff was past the size cap and is not drawn. */\n tooLarge?: true;\n}\n","/**\n * This session's code change against its base, and the manual sync beside it.\n *\n * DESIGN PATTERNS:\n * - Its own session store and hub channel, apart from worktrees. Worktrees are\n * repository management; this is the session's diff.\n * - The hub is authoritative: it computes the counts, runs pull, push and\n * rebase one at a time, and reports pending, errors and a paused rebase here.\n * - The sender lives in a store rather than a module variable, because a web\n * plugin keeps no mutable module state and the page may reconnect.\n *\n * AVOID:\n * - `sendSessionFrame` for a sync command. That frame is bound for the agent\n * and never reaches a channel's `receive`.\n */\nimport { defineGlobalStore, defineSessionStore, type WebPluginRuntime } from '@agimon-ai/po-core/native';\n\nimport {\n GIT_CHANGES_TYPE,\n type GitChangesCommand,\n type GitChangesView,\n type GitSyncAction,\n type GitSyncErrorTarget,\n} from '../../../../../types/gitReview';\n\nexport interface GitChangesSession {\n /** Absent until the hub reports, and outside a git checkout. */\n changes: GitChangesView | undefined;\n pending: string | undefined;\n error: string | undefined;\n errorTarget: GitSyncErrorTarget | undefined;\n}\n\nexport const gitChanges = defineSessionStore<GitChangesSession>({\n changes: undefined,\n pending: undefined,\n error: undefined,\n errorTarget: undefined,\n});\n\n/** The page's hub socket sender; undefined before start and after dispose, when a command is dropped. */\nconst changesSender = defineGlobalStore<WebPluginRuntime['sendHubFrame'] | undefined>(undefined);\n\n/** Binds the page's hub socket for sync commands. The plugin host calls this once per page. */\nexport function startGitChangesRuntime(runtime: WebPluginRuntime): () => void {\n const send = (frame: Record<string, unknown>): void => {\n runtime.sendHubFrame(frame);\n };\n changesSender.update(() => send);\n return () => {\n changesSender.update((current) => (current === send ? undefined : current));\n };\n}\n\n/** Whether a sync command is running for this session. */\nexport const gitChangesActivitySource = {\n subscribe(listener: () => void) {\n const subscription = gitChanges.store.subscribe(listener);\n return () => subscription.unsubscribe();\n },\n isActive(sessionId: string | null) {\n return gitChanges.select(gitChanges.store.state, sessionId).pending !== undefined;\n },\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction optionalText(value: unknown): string | undefined {\n return typeof value === 'string' && value !== '' ? value : undefined;\n}\n\nfunction count(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isInteger(value) && value >= 0 ? value : undefined;\n}\n\n/** The page never trusts a frame's shape: a malformed field drops, the rest still renders. */\nconst MAX_CONFLICTS = 100;\n\nfunction optionalChanges(value: unknown): GitChangesView | undefined {\n if (!isRecord(value)) return undefined;\n const added = count(value.added);\n const removed = count(value.removed);\n const files = count(value.files);\n if (added === undefined || removed === undefined || files === undefined) return undefined;\n const branch = optionalText(value.branch);\n const base = optionalText(value.base);\n const upstream = isRecord(value.upstream) ? value.upstream : undefined;\n const ahead = count(upstream?.ahead);\n const behind = count(upstream?.behind);\n const upstreamRef = optionalText(upstream?.ref);\n const conflicts =\n isRecord(value.rebase) && Array.isArray(value.rebase.conflicts)\n ? value.rebase.conflicts.filter((file): file is string => typeof file === 'string').slice(0, MAX_CONFLICTS)\n : undefined;\n return {\n added,\n removed,\n files,\n ...(branch === undefined ? {} : { branch }),\n ...(base === undefined ? {} : { base }),\n ...(value.truncated === true ? { truncated: true } : {}),\n ...(upstreamRef === undefined || ahead === undefined || behind === undefined\n ? {}\n : { upstream: { ref: upstreamRef, ahead, behind } }),\n ...(conflicts === undefined ? {} : { rebase: { conflicts } }),\n };\n}\n\nfunction optionalErrorTarget(value: unknown): GitSyncErrorTarget | undefined {\n if (!isRecord(value)) return undefined;\n if (value.action === 'pull' || value.action === 'rebase' || value.action === 'abort-rebase')\n return { action: value.action };\n if (value.action === 'push')\n return value.forceRequired === true ? { action: 'push', forceRequired: true } : { action: 'push' };\n return undefined;\n}\n\n/** The session data channel: 'git_changes' payloads into the store. */\nexport const gitChangesChannel = gitChanges.channel<GitChangesSession>({\n channel: GIT_CHANGES_TYPE,\n parse(input) {\n if (!isRecord(input)) return null;\n return {\n changes: optionalChanges(input.changes),\n pending: optionalText(input.pending),\n error: optionalText(input.error),\n errorTarget: optionalErrorTarget(input.errorTarget),\n };\n },\n reduce(_current, next) {\n return next;\n },\n});\n\n/**\n * Asks the hub to pull, push, rebase or abort a paused rebase. `force` is only\n * ever sent after the reader confirmed a lease force for a rejected push.\n */\nexport function requestGitSync(sessionId: string, action: GitSyncAction, force = false): void {\n const payload: GitChangesCommand = action === 'push' && force ? { action: 'push', force: true } : { action };\n changesSender.store.state?.({ type: GIT_CHANGES_TYPE, sessionId, payload });\n}\n","import { defineActivityGroup } from '@agimon-ai/po-core/native';\nimport { BranchIcon } from '@agimon-ai/po-native-components';\nimport { createElement } from 'react';\n\nimport { worktreesTab } from '../_components/WorktreesPanel.native';\nimport { gitChangesActivitySource } from '../_lib/gitChangesStore.native';\nimport { worktreeActivitySource } from '../_lib/worktreesActivityStore.native';\n\nexport default defineActivityGroup({\n keys: 'g w',\n icon: () => createElement(BranchIcon),\n activeSource: {\n subscribe(listener) {\n const stopWorktrees = worktreeActivitySource.subscribe(listener);\n const stopChanges = gitChangesActivitySource.subscribe(listener);\n return () => {\n stopWorktrees();\n stopChanges();\n };\n },\n isActive(sessionId) {\n return worktreeActivitySource.isActive(sessionId) || gitChangesActivitySource.isActive(sessionId);\n },\n },\n marksBackgroundWork: false,\n transientTab: worktreesTab,\n order: 30,\n});\n","import { defineChannelFile } from '@agimon-ai/po-core/native';\n\nimport { gitChangesChannel } from '../_lib/gitChangesStore.native';\nexport default defineChannelFile(gitChangesChannel);\n","import { defineChannelFile } from '@agimon-ai/po-core/native';\n\nimport { worktreesChannel } from '../_lib/worktreesActivityStore.native';\nexport default defineChannelFile(worktreesChannel);\n","import type { ApiResponseOf, ApiRoutes } from '@agimon-ai/po-core/web';\n\nimport type { GitAuthView } from './gitAuth';\nimport type { GitReviewFileDiff, GitReviewSummary } from './gitReview';\nimport type { GitBranchesResponse, GitSessionCreated } from './gitSessions';\n\n/**\n * The routes the page calls, as data.\n *\n * No scope and no base path: the build reads both off\n * `src/extensions/(backend)/api/git/`, which mounts at global scope and so\n * answers workspace and session requests too. Each route answers only where it\n * belongs (auth on a workspace mount, the review on a session mount), so a\n * client accessor on the wrong scope gets a 404 rather than a second way in.\n *\n * Only what the browser calls is listed. The worktree routes stay HTTP for\n * other callers, but the dock drives worktrees over its channel.\n */\nconst routes = {\n /** Workspace: the new-session dialog's branch list. */\n branches: {\n method: 'GET',\n path: '/branches',\n response: undefined as unknown as ApiResponseOf<GitBranchesResponse>,\n },\n /** Workspace: a top-level worktree session on an existing or new branch. */\n createSession: {\n method: 'POST',\n path: '/sessions',\n response: undefined as unknown as ApiResponseOf<GitSessionCreated>,\n },\n /** Workspace: that workspace's saved remote auth, never the token itself. */\n auth: {\n method: 'GET',\n path: '/auth',\n query: ['repositoryId'],\n response: undefined as unknown as ApiResponseOf<GitAuthView>,\n },\n /** Workspace: replaces that workspace's remote auth. Passkey step-up gated for remote devices. */\n saveAuth: {\n method: 'PUT',\n path: '/auth',\n query: ['repositoryId'],\n response: undefined as unknown as ApiResponseOf<GitAuthView>,\n },\n /** Session: the files this session's checkout changed against its base. */\n review: {\n method: 'GET',\n path: '/review',\n response: undefined as unknown as ApiResponseOf<GitReviewSummary>,\n },\n /** Session: one changed file's hunks. */\n reviewFile: {\n method: 'GET',\n path: '/review/file',\n query: ['path'],\n response: undefined as unknown as ApiResponseOf<GitReviewFileDiff>,\n },\n} as const satisfies ApiRoutes;\n\nexport default routes;\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { createApiClient, nativeApiTransport, sessionApiAddress } from '@agimon-ai/po-core/native';\n\nimport routes from '../src/types/apiRoutes';\n\n/** Scopes the tree mounts 'git' at. */\nexport const apiScopes = ['global', 'workspace', 'session'] as const;\n\nexport const api = createApiClient(routes, {\n scopes: apiScopes,\n basePath: 'git',\n transport: nativeApiTransport,\n sessionAddress: sessionApiAddress,\n});\n","import { api } from '../../../../../../generated/client.native';\nimport type { GitReviewFileDiff, GitReviewSummary } from '../../../../../types/gitReview';\n\n/**\n * The review tab's half of the session API: the changed-file list and one\n * file's hunks.\n *\n * The generated client owns the URL and the sealed transport, so nothing here\n * spells a route or reaches for `fetch`. What travels is file contents, which a\n * tunnel's relay must never see in the clear.\n */\n\nconst UNREACHABLE = 'The session is unreachable.';\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** The message a reader is shown: the route's own words, or why there were none. */\nfunction messageOf(result: { status: number; error: string }): string {\n if (result.status === 0) return UNREACHABLE;\n return result.error === '' ? `The session answered ${String(result.status)}.` : result.error;\n}\n\nexport type ReviewSummaryResult = { ok: true; summary: GitReviewSummary } | { ok: false; error: string };\n\nexport async function fetchReviewSummary(sessionId: string, signal?: AbortSignal): Promise<ReviewSummaryResult> {\n const result = await api.session(sessionId).review(signal === undefined ? {} : { signal });\n if (!result.ok) return { ok: false, error: messageOf(result) };\n if (!isRecord(result.data) || !Array.isArray(result.data.files)) {\n return { ok: false, error: 'The session answered with no file list.' };\n }\n return { ok: true, summary: result.data };\n}\n\nexport type ReviewFileResult = { ok: true; diff: GitReviewFileDiff } | { ok: false; error: string };\n\nexport async function fetchReviewFile(\n sessionId: string,\n path: string,\n signal?: AbortSignal,\n): Promise<ReviewFileResult> {\n const result = await api\n .session(sessionId)\n .reviewFile({ query: { path }, ...(signal === undefined ? {} : { signal }) });\n if (!result.ok) return { ok: false, error: messageOf(result) };\n if (!isRecord(result.data) || !Array.isArray(result.data.hunks)) {\n return { ok: false, error: 'The session answered with no diff.' };\n }\n return { ok: true, diff: result.data };\n}\n","import { defineSessionStore } from '@agimon-ai/po-core/native';\n/**\n * Review comments queued on this session, waiting to go to the agent as one\n * message.\n *\n * DESIGN PATTERNS:\n * - Session-scoped and in memory: comments survive closing and reopening the\n * review tab, not a page reload. The same trade the files tab makes.\n * - Comments are cleared only after a send the host accepted, never before.\n */\nimport type { ReviewComment } from '@agimon-ai/po-web-components';\n\nexport interface GitReviewSession {\n comments: ReviewComment[];\n}\n\nexport const gitReview = defineSessionStore<GitReviewSession>({ comments: [] });\n\nexport function addReviewComment(sessionId: string, comment: Omit<ReviewComment, 'id'>): void {\n const id = `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n gitReview.update(sessionId, (current) => ({ comments: [...current.comments, { ...comment, id }] }));\n}\n\nexport function removeReviewComment(sessionId: string, id: string): void {\n gitReview.update(sessionId, (current) => ({ comments: current.comments.filter((comment) => comment.id !== id) }));\n}\n\nexport function clearReviewComments(sessionId: string): void {\n gitReview.update(sessionId, () => ({ comments: [] }));\n}\n","import type { SessionFrameSender } from '@agimon-ai/po-core/web';\n\n/**\n * Pure wording for what the review tab sends the agent, and the one send.\n *\n * Both messages go as `follow_up`: the host starts a turn when idle, or after\n * the current one, without treating a review send as an explicit Queue action.\n * A `prompt` frame instead fails while a turn runs.\n */\n\n/** The opening line of a review, naming what was reviewed. */\nexport function reviewHeading(count: number, branch: string | undefined, base: string | undefined): string {\n const what = branch === undefined ? 'this checkout' : `branch ${branch}`;\n const against = base === undefined ? 'its uncommitted changes' : `its changes against ${base}`;\n const comments = count === 1 ? 'one review comment' : `${String(count)} review comments`;\n const address = count === 1 ? 'Please address it.' : 'Please address them all.';\n return `I reviewed ${what} (${against}) and left ${comments}. ${address}`;\n}\n\n/** What \"ask agent to resolve\" sends: the files, and the steps that finish a paused rebase. */\nexport function conflictPrompt(branch: string | undefined, conflicts: readonly string[]): string {\n const files =\n conflicts.length === 0 ? '- (git reports no unmerged paths yet)' : conflicts.map((file) => `- ${file}`).join('\\n');\n return [\n `A rebase of ${branch ?? 'this checkout'} stopped on conflicts in:`,\n '',\n files,\n '',\n 'Please resolve them:',\n '1. Fix the conflict markers in each file, keeping the intent of both sides.',\n '2. `git add` each resolved file.',\n '3. Run `GIT_EDITOR=true git rebase --continue`, and repeat if it stops again.',\n '',\n 'Do not push. I will push from the cockpit once the rebase is done.',\n ].join('\\n');\n}\n\n/**\n * Hands one deferred follow-up to the session. Returns the reason it failed,\n * or undefined once sent. The sender throws when the session is disconnected.\n */\nexport function deliverToAgent(send: SessionFrameSender, sessionId: string, message: string): string | undefined {\n try {\n send(sessionId, { type: 'follow_up', message });\n return undefined;\n } catch (error) {\n return error instanceof Error ? error.message : 'The session did not take the message.';\n }\n}\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport {\n Button,\n Input,\n Sheet,\n SheetBody,\n SheetContent,\n SheetHeader,\n SheetTitle,\n Textarea,\n fontOf,\n} from '@agimon-ai/po-native-components';\nimport { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport type { GitDiffRow, GitReviewFileDiff, GitReviewSummary, GitSyncAction } from '../../../../../types/gitReview';\nimport { gitChanges, requestGitSync } from '../_lib/gitChangesStore.native';\nimport { fetchReviewFile, fetchReviewSummary } from '../_lib/gitReviewApi.native';\nimport { addReviewComment, clearReviewComments, gitReview, removeReviewComment } from '../_lib/gitReviewStore.native';\nimport { conflictPrompt, deliverToAgent, reviewHeading } from '../_lib/gitReviewView';\n\nexport function useGitChanges(sessionId: string | null) {\n const subscribe = useCallback((listener: () => void) => {\n const sub = gitChanges.store.subscribe(listener);\n return () => sub.unsubscribe();\n }, []);\n return useSyncExternalStore(subscribe, () => gitChanges.select(gitChanges.store.state, sessionId));\n}\nexport function reviewTab(): Parameters<WebPluginSlotProps['openTransientTab']>[0] {\n return { id: 'git-review', label: 'review', panel: GitReviewPanel };\n}\nexport function GitReviewPanel({ sessionId, sendSessionFrame }: WebPluginSlotProps) {\n const activity = useGitChanges(sessionId);\n const subscribe = useCallback((listener: () => void) => {\n const sub = gitReview.store.subscribe(listener);\n return () => sub.unsubscribe();\n }, []);\n const comments = useSyncExternalStore(subscribe, () => gitReview.select(gitReview.store.state, sessionId).comments);\n const [summary, setSummary] = useState<GitReviewSummary>();\n const [file, setFile] = useState<GitReviewFileDiff>();\n const [error, setError] = useState<string>();\n const [dismissedError, setDismissedError] = useState<string>();\n const [confirm, setConfirm] = useState<'force' | 'abort' | 'discard'>();\n const [draft, setDraft] = useState<{ path: string; rows: GitDiffRow[] }>();\n const [comment, setComment] = useState('');\n const [start, setStart] = useState('');\n const [end, setEnd] = useState('');\n const request = useRef<AbortController | undefined>(undefined);\n const fingerprint = JSON.stringify(activity.changes);\n useEffect(() => {\n if (sessionId === null) return undefined;\n const controller = new AbortController();\n void fetchReviewSummary(sessionId, controller.signal)\n .then((result) => {\n if (!controller.signal.aborted) {\n if (result.ok) setSummary(result.summary);\n else setError(result.error);\n }\n })\n .catch((cause: unknown) => {\n if (!controller.signal.aborted) setError(cause instanceof Error ? cause.message : String(cause));\n });\n return () => {\n controller.abort();\n request.current?.abort();\n };\n }, [sessionId, fingerprint]);\n const loadFile = async (path: string) => {\n if (sessionId === null) return;\n request.current?.abort();\n const controller = new AbortController();\n request.current = controller;\n setFile(undefined);\n setError(undefined);\n try {\n const result = await fetchReviewFile(sessionId, path, controller.signal);\n if (!controller.signal.aborted) {\n if (result.ok) setFile(result.diff);\n else setError(result.error);\n }\n } catch (cause) {\n if (!controller.signal.aborted) setError(cause instanceof Error ? cause.message : String(cause));\n }\n };\n if (sessionId === null) return null;\n const changes = activity.changes;\n const busy = activity.pending !== undefined;\n const paused = changes?.rebase !== undefined;\n const send = (message: string, onSent?: () => void) => {\n const failure = deliverToAgent(sendSessionFrame, sessionId, message);\n setError(failure);\n if (failure === undefined) onSent?.();\n };\n const sync = (action: GitSyncAction) => requestGitSync(sessionId, action);\n const forceRequired =\n activity.error !== dismissedError &&\n activity.errorTarget?.action === 'push' &&\n activity.errorTarget.forceRequired === true;\n return (\n <ScrollView contentContainerStyle={styles.body}>\n <Text style={styles.title}>{changes?.branch ?? 'Detached HEAD'}</Text>\n <Text style={styles.meta}>\n {changes?.base ? `vs ${changes.base}` : 'Uncommitted changes'} · +{changes?.added ?? 0} -{changes?.removed ?? 0}\n \\n\n {changes?.upstream\n ? `↑${changes.upstream.ahead} ↓${changes.upstream.behind} ${changes.upstream.ref}`\n : 'No upstream yet'}\n </Text>\n <View style={styles.actions}>\n <Button\n variant=\"outline\"\n disabled={busy || paused || changes?.upstream === undefined}\n onPress={() => sync('pull')}\n >\n Pull\n </Button>\n <Button\n variant=\"outline\"\n disabled={busy || paused || changes?.branch === undefined}\n onPress={() => sync('push')}\n >\n Push\n </Button>\n <Button\n variant=\"outline\"\n disabled={busy || paused || changes?.base === undefined}\n onPress={() => sync('rebase')}\n >\n Rebase\n </Button>\n </View>\n {activity.pending ? <Text style={styles.meta}>{activity.pending}</Text> : null}\n {activity.error && activity.error !== dismissedError ? (\n <View>\n <Text style={styles.error}>{activity.error}</Text>\n <Button variant=\"ghost\" onPress={() => setDismissedError(activity.error)}>\n Dismiss\n </Button>\n </View>\n ) : null}\n {forceRequired ? (\n <Button variant=\"danger-outline\" disabled={busy} onPress={() => setConfirm('force')}>\n Force push with lease…\n </Button>\n ) : null}\n {paused ? (\n <View style={styles.body}>\n <Text style={styles.error}>Rebase paused\\n{changes.rebase?.conflicts.join('\\n')}</Text>\n <Button disabled={busy} onPress={() => send(conflictPrompt(changes.branch, changes.rebase?.conflicts ?? []))}>\n Ask agent to resolve\n </Button>\n <Button variant=\"danger-outline\" disabled={busy} onPress={() => setConfirm('abort')}>\n Abort rebase…\n </Button>\n </View>\n ) : null}\n {error ? <Text style={styles.error}>{error}</Text> : null}\n {summary ? (\n summary.files.map((entry) => (\n <Button\n key={entry.path}\n variant=\"ghost\"\n testID={`git-review-file-${entry.path}`}\n onPress={() => void loadFile(entry.path)}\n >\n {entry.path} · {entry.status} · +{entry.added} -{entry.removed}\n </Button>\n ))\n ) : (\n <Text style={styles.meta}>Loading changes…</Text>\n )}\n {summary?.files.length === 0 ? (\n <Text style={styles.meta}>{summary.repository ? 'No changed files' : 'Not a Git checkout'}</Text>\n ) : null}\n {summary?.truncated ? <Text style={styles.meta}>The file list was truncated.</Text> : null}\n {file ? (\n <View style={styles.body}>\n <Text style={styles.title}>{file.path}</Text>\n {file.binary || file.tooLarge ? (\n <Text style={styles.meta}>{file.binary ? 'Binary file' : 'Diff too large to display'}</Text>\n ) : (\n file.hunks.map((hunk, index) => (\n <View key={index}>\n {hunk.rows.map((row, rowIndex) => (\n <Text\n selectable\n key={rowIndex}\n style={styles.diff(row.marker)}\n onPress={() => {\n setDraft({ path: file.path, rows: hunk.rows });\n setStart(String(row.line));\n setEnd(String(row.line));\n }}\n >\n {row.marker} {row.line} {row.content}\n </Text>\n ))}\n </View>\n ))\n )}\n <Button\n variant=\"outline\"\n onPress={() => {\n setDraft({ path: file.path, rows: [] });\n setStart('');\n setEnd('');\n }}\n >\n Comment on file\n </Button>\n </View>\n ) : null}\n {comments.map((item) => (\n <View key={item.id}>\n <Text style={styles.meta}>\n {item.relPath}\n {item.startLine === undefined ? '' : `:${item.startLine}-${item.endLine ?? item.startLine}`}\\n{item.body}\n </Text>\n <Button variant=\"ghost\" onPress={() => removeReviewComment(sessionId, item.id)}>\n Remove comment\n </Button>\n </View>\n ))}\n {comments.length > 0 ? (\n <View style={styles.actions}>\n <Button\n onPress={() => {\n const body = comments\n .map((item) => {\n const anchor =\n item.startLine === undefined\n ? item.relPath\n : item.side === 'old'\n ? `${item.relPath} (removed lines ${item.startLine}-${item.endLine ?? item.startLine})`\n : `${item.relPath}:${item.startLine}-${item.endLine ?? item.startLine}`;\n const quoted = item.snippet\n .split('\\n')\n .slice(0, 20)\n .join('\\n')\n .slice(0, 2000)\n .split('\\n')\n .map((line) => `> ${line}`)\n .join('\\n');\n return `### ${anchor}\\n\\n${quoted}\\n\\n${item.body.trim()}`;\n })\n .join('\\n\\n');\n send(`${reviewHeading(comments.length, summary?.branch, summary?.base)}\\n\\n${body}`, () =>\n clearReviewComments(sessionId),\n );\n }}\n >\n Send review\n </Button>\n <Button variant=\"outline\" onPress={() => setConfirm('discard')}>\n Discard review…\n </Button>\n </View>\n ) : null}\n <Sheet\n open={draft !== undefined}\n onOpenChange={(open) => {\n if (!open) setDraft(undefined);\n }}\n >\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Review comment</SheetTitle>\n </SheetHeader>\n <SheetBody>\n <View style={styles.body}>\n {draft?.rows.length ? (\n <>\n <Input\n accessibilityLabel=\"Start line\"\n value={start}\n onChangeText={setStart}\n keyboardType=\"number-pad\"\n />\n <Input accessibilityLabel=\"End line\" value={end} onChangeText={setEnd} keyboardType=\"number-pad\" />\n </>\n ) : null}\n <Textarea accessibilityLabel=\"Comment\" value={comment} onChangeText={setComment} />\n <Button\n disabled={\n comment.trim() === '' ||\n (Boolean(draft?.rows.length) &&\n (!Number.isInteger(Number(start)) ||\n Number(start) < 1 ||\n !Number.isInteger(Number(end)) ||\n Number(end) < Number(start)))\n }\n onPress={() => {\n if (!draft) return;\n const rows = draft.rows.filter((row) => row.line >= Number(start) && row.line <= Number(end));\n const kept = rows.filter((row) => row.marker !== '-');\n const numbered = kept.length > 0 ? kept : rows;\n addReviewComment(sessionId, {\n path: draft.path,\n relPath: draft.path,\n body: comment.trim(),\n snippet: numbered.map((row) => row.content).join('\\n'),\n ...(numbered.length === 0\n ? {}\n : {\n side: kept.length > 0 ? 'new' : 'old',\n startLine: Math.min(...numbered.map((row) => row.line)),\n endLine: Math.max(...numbered.map((row) => row.line)),\n }),\n });\n setDraft(undefined);\n setComment('');\n }}\n >\n Add comment\n </Button>\n </View>\n </SheetBody>\n </SheetContent>\n </Sheet>\n <Sheet\n open={confirm !== undefined}\n onOpenChange={(open) => {\n if (!open) setConfirm(undefined);\n }}\n >\n <SheetContent>\n <SheetHeader>\n <SheetTitle>\n {confirm === 'force'\n ? 'Force push with lease?'\n : confirm === 'abort'\n ? 'Abort rebase?'\n : 'Discard review?'}\n </SheetTitle>\n </SheetHeader>\n <SheetBody>\n <Text style={styles.meta}>\n {confirm === 'force'\n ? 'Git refuses this if the remote holds commits you never fetched and integrated.'\n : confirm === 'abort'\n ? 'Abort discards any conflict resolution in progress.'\n : 'Your queued comments will be removed.'}\n </Text>\n <Button\n variant=\"danger-outline\"\n onPress={() => {\n if (confirm === 'force') requestGitSync(sessionId, 'push', true);\n else if (confirm === 'abort') sync('abort-rebase');\n else clearReviewComments(sessionId);\n setConfirm(undefined);\n }}\n >\n Confirm\n </Button>\n </SheetBody>\n </SheetContent>\n </Sheet>\n </ScrollView>\n );\n}\nconst styles = StyleSheet.create((theme) => ({\n body: { padding: theme.spacing(3), gap: theme.spacing(2) },\n actions: { flexDirection: 'row', flexWrap: 'wrap', gap: theme.spacing(1) },\n title: { color: theme.colors.hi, fontSize: theme.fontSize.base, fontWeight: '600' },\n meta: { color: theme.colors.dim, fontSize: theme.fontSize.sm },\n error: { color: theme.colors.red, fontSize: theme.fontSize.sm },\n diff: (marker: GitDiffRow['marker']) => ({\n fontFamily: fontOf(theme.fontFamily.mono),\n fontSize: theme.fontSize.sm,\n color: marker === '+' ? theme.colors.green : marker === '-' ? theme.colors.red : theme.colors.text,\n paddingVertical: theme.spacing(1),\n }),\n}));\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport { Button, Dot, ListRow } from '@agimon-ai/po-native-components';\nimport { View } from 'react-native';\n\nimport { reviewTab, useGitChanges } from '../../_components/GitReviewPanel.native';\nimport { useWorktrees, worktreesTab } from '../../_components/WorktreesPanel.native';\n\nexport function WorktreesActivitySection({ sessionId, openTransientTab }: WebPluginSlotProps) {\n const git = useGitChanges(sessionId);\n const state = useWorktrees(sessionId);\n const worktrees = state.worktrees.filter((item) => item.sessionId !== sessionId);\n return (\n <View>\n {git.changes ? (\n <Button variant=\"ghost\" testID=\"activity-diff-changes\" onPress={() => openTransientTab(reviewTab())}>\n {git.changes.branch ?? 'Detached HEAD'} · +{git.changes.added} -{git.changes.removed}\n </Button>\n ) : null}\n {state.pending ? <ListRow title={state.pending} /> : null}\n {worktrees.map((item) => (\n <ListRow\n key={item.id}\n leading={<Dot tone={item.orphaned ? 'red' : item.sessionId === null ? 'muted' : 'blue'} />}\n title={\n <Button variant=\"ghost\" onPress={() => openTransientTab(worktreesTab())}>\n {item.branch}\n </Button>\n }\n description={[item.orphaned ? 'Orphaned' : '', item.unowned ? 'Unowned' : ''].filter(Boolean).join(' · ')}\n />\n ))}\n {worktrees.length === 0 && state.pending === undefined ? (\n <Button\n variant=\"ghost\"\n testID=\"activity-git-create\"\n disabled={sessionId === null}\n onPress={() => openTransientTab(worktreesTab())}\n >\n Create a worktree\n </Button>\n ) : null}\n </View>\n );\n}\n","import { defineFill } from '@agimon-ai/po-core/native';\n\nimport { WorktreesActivitySection } from './_components/WorktreesActivitySection.native';\nexport default defineFill({ component: WorktreesActivitySection });\n","import { defineWebLifecycle } from '@agimon-ai/po-core/native';\n\nimport { startGitChangesRuntime } from '../_lib/gitChangesStore.native';\nimport { startWorktreeRuntime } from '../_lib/worktreesActivityStore.native';\nexport default defineWebLifecycle((runtime) => {\n const stopWorktrees = startWorktreeRuntime(runtime);\n const stopChanges = startGitChangesRuntime(runtime);\n return () => {\n stopChanges();\n stopWorktrees();\n };\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport activityGroupGit from '../src/extensions/workspaces/sessions/(frontend)/activity-group/git.native';\nimport channelGitChanges from '../src/extensions/workspaces/sessions/(frontend)/channel/git-changes.native';\nimport channelGitWorktrees from '../src/extensions/workspaces/sessions/(frontend)/channel/git-worktrees.native';\nimport fillWorktrees from '../src/extensions/workspaces/sessions/(frontend)/fill/Worktrees.activity.git.native';\nimport lifecycleStart from '../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'git',\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'git' }, activityGroupGit)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'git_changes' }, channelGitChanges), via({ channel: 'git_worktrees' }, channelGitWorktrees)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.git', id: 'worktrees' }, fillWorktrees)];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AAC,CAACV,OAAOW,OAAO,CAAC,CAACC,KAAK,KAAK;EAAE,GAPrGX,KAAKO,EAOgG,CAE7G;EACAT,UAAUc,WAAW,KAAKf,MAAMQ,YAAYQ,KAAAA,IAC3C,oBAAC,QAAD;GACE,SAAQ;GACR,QAAO;GACP,UAAUnB,cAAc;GACxB,eAAeC,iBAAiBH,aAAa,CAAC;GAAE,UAAA;EAG1C,CAAA,IACN;CACA,EAAA,CAAA;AAEV;;;ACxCA,IAAA,wCAAe,WAAW,EAAE,WAAW,yBAAyB,CAAC;;;ACCjE,IAAA,uBAAe,oBAAoB,YAAY;CAC7C,MAAM,gBAAgB,qBAAqB,OAAO;CAClD,MAAM,cAAc,uBAAuB,OAAO;CAClD,aAAa;EACX,YAAY;EACZ,cAAc;CAChB;AACF,CAAC;;;ACFD,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,SAAS;EACP,IAAI,iBAA2D;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,MAAM,GAAGsB,kBAAgB,CAAC;EAAG;EAClH,IAAI,WAA+C;GAAE,OAAO,CAAC,IAAI,EAAE,SAAS,cAAc,GAAGC,0BAAiB,GAAG,IAAI,EAAE,SAAS,gBAAgB,GAAGC,4BAAmB,CAAC;EAAG;EAC1K,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI;IAAE,MAAM;IAAgB,IAAI;GAAY,GAAGC,qCAAa,CAAC;EAAG;EACvH,IAAI,QAAyC;GAAE,OAAOC;EAAgB;CACxE;AACF,CAAC"}
1
+ {"version":3,"file":"native.mjs","names":["isRecord","optionalText","optionalErrorTarget","WebPluginSlotProps","Button","Input","ListRow","Sheet","SheetBody","SheetContent","SheetHeader","SheetTitle","useCallback","useState","useSyncExternalStore","StyleSheet","requestWorktreeClose","requestWorktreeCreate","worktreeActivity","useWorktrees","sessionId","subscribe","listener","sub","store","unsubscribe","select","state","worktreesTab","Parameters","id","label","panel","WorktreesPanel","sessionReservationId","openSession","creating","setCreating","branch","setBranch","baseRef","setBaseRef","closing","setClosing","busy","pending","undefined","styles","body","meta","error","worktrees","map","worktree","card","path","orphaned","unowned","length","trim","open","create","theme","padding","spacing","gap","uni__dependencies","borderWidth","borderColor","colors","borderRadius","md","backgroundColor","color","dim","fontSize","sm","red","styles","isRecord","WebPluginSlotProps","Button","Input","Sheet","SheetBody","SheetContent","SheetHeader","SheetTitle","Textarea","fontOf","useCallback","useEffect","useRef","useState","useSyncExternalStore","StyleSheet","GitDiffRow","GitReviewFileDiff","GitReviewSummary","GitSyncAction","gitChanges","requestGitSync","fetchReviewFile","fetchReviewSummary","addReviewComment","clearReviewComments","gitReview","removeReviewComment","conflictPrompt","deliverToAgent","reviewHeading","useGitChanges","sessionId","subscribe","listener","sub","store","unsubscribe","select","state","reviewTab","Parameters","id","label","panel","GitReviewPanel","sendSessionFrame","activity","comments","summary","setSummary","file","setFile","error","setError","dismissedError","setDismissedError","confirm","setConfirm","draft","setDraft","path","rows","comment","setComment","start","setStart","end","setEnd","request","AbortController","undefined","fingerprint","JSON","stringify","changes","controller","signal","then","result","aborted","ok","catch","cause","Error","message","String","abort","current","loadFile","diff","busy","pending","paused","rebase","send","onSent","failure","sync","action","forceRequired","errorTarget","styles","body","title","branch","meta","base","added","removed","upstream","ahead","behind","ref","actions","conflicts","join","files","map","entry","status","length","repository","truncated","binary","tooLarge","hunks","hunk","index","row","rowIndex","marker","line","content","item","relPath","startLine","endLine","anchor","side","quoted","snippet","split","slice","trim","open","Boolean","Number","isInteger","filter","kept","numbered","Math","min","max","create","theme","padding","spacing","gap","uni__dependencies","flexDirection","flexWrap","color","colors","hi","fontSize","fontWeight","dim","sm","red","fontFamily","mono","green","text","paddingVertical","styles","WebPluginSlotProps","ArrowRightIcon","Button","Dot","fontOf","ListRow","PoNativeTheme","StyleSheet","reviewTab","useGitChanges","useWorktrees","worktreesTab","WorktreesActivitySection","sessionId","openTransientTab","git","state","worktrees","filter","item","styles","section","changes","branch","added","removed","pending","map","id","orphaned","unowned","Boolean","join","length","undefined","idle","status","disabled","action","actionText","create","theme","sm","fontFamily","sans","fontSize","lineHeight","gap","spacing","uni__dependencies","flexDirection","alignItems","flex","mono","fontWeight","semibold","color","colors","hi","green","red","flexWrap","dim","base","medium","activityGroupGit","channelGitChanges","channelGitWorktrees","fillWorktrees","lifecycleStart"],"sources":["../../src/types/webWorktrees.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/worktreesActivityStore.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/WorktreesPanel.native.tsx","../../src/types/gitReview.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/gitChangesStore.native.ts","../../src/extensions/workspaces/sessions/(frontend)/activity-group/git.native.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/git-changes.native.ts","../../src/extensions/workspaces/sessions/(frontend)/channel/git-worktrees.native.ts","../../src/types/apiRoutes.ts","../../generated/client.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/gitReviewApi.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/gitReviewStore.native.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/gitReviewView.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/GitReviewPanel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/WorktreesActivitySection.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/Worktrees.activity.git.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.native.ts","../../generated/native.ts"],"sourcesContent":["/**\n * The cockpit's view of this session's worktrees.\n *\n * DESIGN PATTERNS:\n * - Declarations only. The channel frame type is a constant so the hub and the\n * page cannot drift apart on a string.\n * - A view is the subset of a record the dock needs, not the record. The\n * registry may hold paths and provenance the page has no business rendering.\n *\n * AVOID:\n * - Adding behaviour here. This file is imported by browser code, so it must\n * stay free of node builtins.\n */\n\n/** The data channel carrying one session's worktrees to the page. */\nexport const GIT_WORKTREES_TYPE = 'git_worktrees';\n\n/** One worktree, as the activity dock and its panel render it. */\nexport interface WorktreeView {\n id: string;\n branch: string;\n path: string;\n /** The session the hub started for this worktree, when it is still live. */\n sessionId: string | null;\n /** True once the directory the record names has gone missing. */\n orphaned: boolean;\n /**\n * True when the session that asked for this worktree is gone.\n *\n * An owned worktree is only ever shown to its own session. This flag marks\n * the exception: once the parent is dead nobody would see the worktree at\n * all, so every session in the repository does, and may close it.\n */\n unowned: boolean;\n}\n\n/**\n * What the panel asks the hub channel to do.\n *\n * The dock acts through its own channel rather than through the agent: a\n * worktree made from the panel and one made by the tool take the same\n * `worktreeOperations` path, but the panel no longer has to spend a turn of\n * the conversation to get there.\n */\nexport type GitWorktreesCommand =\n | { action: 'create'; branch: string; baseRef?: string; reservationId?: string }\n | { action: 'close'; id: string; force?: boolean };\n\nexport type WorktreeErrorTarget = { action: 'create' } | { action: 'close'; id: string };\n\nexport interface GitWorktreesPayload {\n worktrees: WorktreeView[];\n /** Label of the operation in flight, absent when the session is idle. */\n pending?: string;\n /** The last failure, cleared when the next command starts. */\n error?: string;\n /** The operation that produced the last failure, when known. */\n errorTarget?: WorktreeErrorTarget;\n}\n","/**\n * The dock's view of this session's worktrees, and the commands it sends.\n *\n * DESIGN PATTERNS:\n * - Session-scoped store fed by one hub channel. The hub is authoritative; the\n * page never reads a registry and never guesses.\n * - Actions are channel frames, not prompts. The hub half owns the tool's\n * operations, so the panel names the work and the hub performs it; a\n * worktree made from the dock is the same object the tool makes, without\n * spending a turn of the conversation to ask for it.\n * - The sender lives in a store rather than a module variable, because a web\n * plugin keeps no mutable module state and the page may reconnect.\n *\n * AVOID:\n * - Calling the hub package API from here. A dock slot gets no sealed request\n * transport, and raw fetch breaks the remote cockpit.\n * - `sendSessionFrame` for a command. It envelopes the frame as a session\n * command bound for the agent, which never reaches a channel's `receive`.\n */\nimport { defineGlobalStore, defineSessionStore, type WebPluginRuntime } from '@agimon-ai/po-core/native';\n\nimport {\n GIT_WORKTREES_TYPE,\n type GitWorktreesCommand,\n type WorktreeErrorTarget,\n type WorktreeView,\n} from '../../../../../types/webWorktrees';\n\nexport interface WorktreesSession {\n /** The worktrees the hub last reported for this session's repository. */\n worktrees: WorktreeView[];\n /** Label of the operation the hub is running for this session. */\n pending: string | undefined;\n /** The last failure the hub reported, shown until the next command. */\n error: string | undefined;\n /** The operation that produced the last failure, when known. */\n errorTarget?: WorktreeErrorTarget;\n}\n\nexport const worktreeActivity = defineSessionStore<WorktreesSession>({\n worktrees: [],\n pending: undefined,\n error: undefined,\n errorTarget: undefined,\n});\n\n/** Captures the clicked card, so a focus change cannot retarget an open dialog. */\nexport const worktreeCreateDialog = defineGlobalStore<{ sessionId: string; reservationId?: string } | null>(null);\n/**\n * The page's hub socket sender, held for as long as the plugin runs.\n *\n * Undefined before `startWorktreeRuntime` and after it disposes; a command\n * sent in that window is dropped rather than queued, because a queue would\n * replay a worktree create against a socket that has since changed sessions.\n */\nconst worktreeSender = defineGlobalStore<WebPluginRuntime['sendHubFrame'] | undefined>(undefined);\n\n/** Binds the page's hub socket. The plugin host calls this once per page. */\nexport function startWorktreeRuntime(runtime: WebPluginRuntime): () => void {\n // Wrapped rather than referenced: an unbound method would lose the runtime\n // it belongs to the moment the store hands it back.\n const send = (frame: Record<string, unknown>): void => {\n runtime.sendHubFrame(frame);\n };\n worktreeSender.update(() => send);\n return () => {\n worktreeSender.update((current) => (current === send ? undefined : current));\n worktreeCreateDialog.update(() => null);\n };\n}\n\n/**\n * Whether this session has worktree work in flight.\n *\n * A standing worktree is state, not work: it sits there until someone closes\n * it, so counting it would leave the session reading as busy forever, with a\n * \"background work is still running\" notice under a conversation where\n * nothing is running. Only a create or close actually in progress counts.\n *\n * The group stays visible either way. Declaring an active source at all is\n * what keeps it in the dock; this answers how it is drawn, not whether it is\n * there.\n */\nexport const worktreeActivitySource = {\n subscribe(listener: () => void) {\n const subscription = worktreeActivity.store.subscribe(listener);\n return () => subscription.unsubscribe();\n },\n isActive(sessionId: string | null) {\n return worktreeActivity.select(worktreeActivity.store.state, sessionId).pending !== undefined;\n },\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction optionalText(value: unknown): string | undefined {\n return typeof value === 'string' && value !== '' ? value : undefined;\n}\n\nfunction optionalErrorTarget(value: unknown): WorktreeErrorTarget | undefined {\n if (!isRecord(value)) return undefined;\n if (value.action === 'create') return { action: 'create' };\n if (value.action === 'close' && typeof value.id === 'string' && value.id !== '') {\n return { action: 'close', id: value.id };\n }\n return undefined;\n}\n\n/** The plugin's session data channel: 'git_worktrees' payloads into the store. */\nexport const worktreesChannel = worktreeActivity.channel<WorktreesSession>({\n channel: GIT_WORKTREES_TYPE,\n parse(input) {\n if (!isRecord(input) || !Array.isArray(input.worktrees)) return null;\n return {\n worktrees: input.worktrees.filter(isRecord) as unknown as WorktreeView[],\n pending: optionalText(input.pending),\n error: optionalText(input.error),\n errorTarget: optionalErrorTarget(input.errorTarget),\n };\n },\n reduce(_current, next) {\n return next;\n },\n});\n\n/** Sends one command to the session's worktrees channel. */\nfunction command(sessionId: string, payload: GitWorktreesCommand): void {\n worktreeSender.store.state?.({ type: GIT_WORKTREES_TYPE, sessionId, payload });\n}\n\n/** Asks the hub for a worktree. The hub answers on the same channel. */\nexport function requestWorktreeCreate(\n sessionId: string,\n branch: string,\n baseRef: string,\n reservationId?: string,\n): void {\n const trimmedBase = baseRef.trim();\n command(sessionId, {\n action: 'create',\n branch: branch.trim(),\n ...(trimmedBase === '' ? {} : { baseRef: trimmedBase }),\n ...(reservationId === undefined ? {} : { reservationId }),\n });\n}\n\n/** Asks the hub to close one worktree. Refusal on a dirty tree stays the hub's call. */\nexport function requestWorktreeClose(sessionId: string, id: string): void {\n command(sessionId, { action: 'close', id });\n}\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport {\n Button,\n Input,\n ListRow,\n Sheet,\n SheetBody,\n SheetContent,\n SheetHeader,\n SheetTitle,\n} from '@agimon-ai/po-native-components';\nimport { useCallback, useState, useSyncExternalStore } from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { requestWorktreeClose, requestWorktreeCreate, worktreeActivity } from '../_lib/worktreesActivityStore.native';\n\nexport function useWorktrees(sessionId: string | null) {\n const subscribe = useCallback((listener: () => void) => {\n const sub = worktreeActivity.store.subscribe(listener);\n return () => sub.unsubscribe();\n }, []);\n return useSyncExternalStore(subscribe, () => worktreeActivity.select(worktreeActivity.store.state, sessionId));\n}\nexport function worktreesTab(): Parameters<WebPluginSlotProps['openTransientTab']>[0] {\n return { id: 'git-worktrees', label: 'worktrees', panel: WorktreesPanel };\n}\nexport function WorktreesPanel({ sessionId, sessionReservationId, openSession }: WebPluginSlotProps) {\n const state = useWorktrees(sessionId);\n const [creating, setCreating] = useState(false);\n const [branch, setBranch] = useState('');\n const [baseRef, setBaseRef] = useState('');\n const [closing, setClosing] = useState<string>();\n const busy = state.pending !== undefined;\n return (\n <ScrollView contentContainerStyle={styles.body}>\n <Button testID=\"git-worktree-create\" disabled={sessionId === null || busy} onPress={() => setCreating(true)}>\n Create a worktree\n </Button>\n {state.pending ? <Text style={styles.meta}>{state.pending}</Text> : null}\n {state.error ? <Text style={styles.error}>{state.error}</Text> : null}\n {state.worktrees.map((worktree) => (\n <View key={worktree.id} style={styles.card}>\n <ListRow\n title={worktree.branch}\n description={`${worktree.path}${worktree.orphaned ? '\\nOrphaned' : ''}${worktree.unowned ? '\\nUnowned' : ''}`}\n />\n {worktree.sessionId && openSession ? (\n <Button variant=\"outline\" onPress={() => openSession(worktree.sessionId!)}>\n Open session\n </Button>\n ) : null}\n <Button\n variant=\"danger-outline\"\n disabled={sessionId === null || busy}\n testID={`git-worktree-close-${worktree.id}`}\n onPress={() => setClosing(worktree.id)}\n >\n Close worktree\n </Button>\n </View>\n ))}\n {state.worktrees.length === 0 ? (\n <Text style={styles.meta}>No worktrees yet. A worktree is its own checkout, branch and session.</Text>\n ) : null}\n <Sheet open={creating} onOpenChange={setCreating}>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Create a worktree</SheetTitle>\n </SheetHeader>\n <SheetBody>\n <View style={styles.body}>\n <Input accessibilityLabel=\"Branch\" placeholder=\"wt/fix-auth\" value={branch} onChangeText={setBranch} />\n <Input\n accessibilityLabel=\"Base ref\"\n placeholder=\"Base (current)\"\n value={baseRef}\n onChangeText={setBaseRef}\n />\n <Text style={styles.meta}>\n Creates the worktree outside the repository and starts a session nested under this one.\n </Text>\n <Button\n disabled={sessionId === null || busy || branch.trim() === ''}\n onPress={() => {\n if (sessionId === null) return;\n requestWorktreeCreate(sessionId, branch, baseRef, sessionReservationId);\n setCreating(false);\n if (sessionReservationId === undefined) {\n setBranch('');\n setBaseRef('');\n }\n }}\n >\n Create\n </Button>\n </View>\n </SheetBody>\n </SheetContent>\n </Sheet>\n <Sheet\n open={closing !== undefined}\n onOpenChange={(open) => {\n if (!open) setClosing(undefined);\n }}\n >\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Close this worktree?</SheetTitle>\n </SheetHeader>\n <SheetBody>\n <Text style={styles.meta}>The checkout is removed. Git refuses a dirty worktree.</Text>\n <Button\n variant=\"danger-outline\"\n disabled={busy}\n onPress={() => {\n if (sessionId !== null && closing !== undefined) requestWorktreeClose(sessionId, closing);\n setClosing(undefined);\n }}\n >\n Close worktree\n </Button>\n </SheetBody>\n </SheetContent>\n </Sheet>\n </ScrollView>\n );\n}\nconst styles = StyleSheet.create((theme) => ({\n body: { padding: theme.spacing(3), gap: theme.spacing(2) },\n card: {\n borderWidth: 1,\n borderColor: theme.colors['border-soft'],\n borderRadius: theme.borderRadius.md,\n backgroundColor: theme.colors.panel,\n padding: theme.spacing(2),\n gap: theme.spacing(1),\n },\n meta: { color: theme.colors.dim, fontSize: theme.fontSize.sm },\n error: { color: theme.colors.red, fontSize: theme.fontSize.sm },\n}));\n","/**\n * The cockpit's view of what this session changed against its base: the counts\n * the '# diff' group shows, what the review tab lists and draws, and the manual\n * sync that sits beside them.\n *\n * DESIGN PATTERNS:\n * - Declarations only, shared by the hub and the page.\n * - Its own channel, apart from worktrees. Worktrees are repository\n * management; the diff is this session's code change.\n * - A diff row carries one line number whose file follows from its marker: the\n * new file's for context and additions, the old file's for removals. It is\n * the same shape the shared DiffView draws.\n *\n * AVOID:\n * - Behaviour or node builtins. Browser code imports this file.\n */\n\n/** The session channel carrying this checkout's changes and the sync around them. */\nexport const GIT_CHANGES_TYPE = 'git_changes';\n\n/** The sync actions the review tab offers. */\nexport type GitSyncAction = 'pull' | 'push' | 'rebase' | 'abort-rebase';\n\n/** What the review tab asks the hub to run. `force` only follows a confirmed rejected push. */\nexport type GitChangesCommand =\n | { action: 'pull' }\n | { action: 'push'; force?: true }\n | { action: 'rebase' }\n | { action: 'abort-rebase' };\n\nexport type GitSyncErrorTarget =\n | { action: 'pull' | 'rebase' | 'abort-rebase' }\n /** A push the remote rejected as non-fast-forward; the tab offers a lease force after a confirm. */\n | { action: 'push'; forceRequired?: true };\n\nexport interface GitChangesPayload {\n /** Absent outside a git checkout. */\n changes?: GitChangesView;\n /** Label of the sync command in flight. */\n pending?: string;\n /** The last sync failure, cleared when the next command starts. */\n error?: string;\n errorTarget?: GitSyncErrorTarget;\n}\n\n/** What the session changed since its base, as the '# diff' lane and the review header show it. */\nexport interface GitChangesView {\n /** The checked-out branch; absent on a detached HEAD. */\n branch?: string;\n /** The ref the changes are measured against; absent when none resolved, so only uncommitted work counts. */\n base?: string;\n added: number;\n removed: number;\n files: number;\n /** More files changed than were counted. */\n truncated?: boolean;\n /** The branch's upstream and how far apart the two are. */\n upstream?: { ref: string; ahead: number; behind: number };\n /** Present while a rebase is paused on conflicts. */\n rebase?: { conflicts: string[] };\n}\n\nexport type GitReviewFileStatus = 'added' | 'modified' | 'deleted' | 'untracked' | 'conflicted';\n\n/** One changed file in the review list. */\nexport interface GitReviewFileEntry {\n /** Repository-relative, forward slashes. */\n path: string;\n status: GitReviewFileStatus;\n added: number;\n removed: number;\n binary?: boolean;\n}\n\n/** The review tab's file list. */\nexport interface GitReviewSummary {\n /** False when the session's directory is not a git checkout. */\n repository: boolean;\n branch?: string;\n base?: string;\n /** Short sha of the commit the diff starts from. */\n mergeBase?: string;\n files: GitReviewFileEntry[];\n truncated?: boolean;\n}\n\nexport interface GitDiffRow {\n marker: '+' | '-' | ' ';\n line: number;\n content: string;\n}\n\nexport interface GitDiffHunk {\n start: number;\n rows: GitDiffRow[];\n}\n\n/** One file's hunks, fetched when the reader expands it. */\nexport interface GitReviewFileDiff {\n path: string;\n hunks: GitDiffHunk[];\n binary?: true;\n /** The diff was past the size cap and is not drawn. */\n tooLarge?: true;\n}\n","/**\n * This session's code change against its base, and the manual sync beside it.\n *\n * DESIGN PATTERNS:\n * - Its own session store and hub channel, apart from worktrees. Worktrees are\n * repository management; this is the session's diff.\n * - The hub is authoritative: it computes the counts, runs pull, push and\n * rebase one at a time, and reports pending, errors and a paused rebase here.\n * - The sender lives in a store rather than a module variable, because a web\n * plugin keeps no mutable module state and the page may reconnect.\n *\n * AVOID:\n * - `sendSessionFrame` for a sync command. That frame is bound for the agent\n * and never reaches a channel's `receive`.\n */\nimport { defineGlobalStore, defineSessionStore, type WebPluginRuntime } from '@agimon-ai/po-core/native';\n\nimport {\n GIT_CHANGES_TYPE,\n type GitChangesCommand,\n type GitChangesView,\n type GitSyncAction,\n type GitSyncErrorTarget,\n} from '../../../../../types/gitReview';\n\nexport interface GitChangesSession {\n /** Absent until the hub reports, and outside a git checkout. */\n changes: GitChangesView | undefined;\n pending: string | undefined;\n error: string | undefined;\n errorTarget: GitSyncErrorTarget | undefined;\n}\n\nexport const gitChanges = defineSessionStore<GitChangesSession>({\n changes: undefined,\n pending: undefined,\n error: undefined,\n errorTarget: undefined,\n});\n\n/** The page's hub socket sender; undefined before start and after dispose, when a command is dropped. */\nconst changesSender = defineGlobalStore<WebPluginRuntime['sendHubFrame'] | undefined>(undefined);\n\n/** Binds the page's hub socket for sync commands. The plugin host calls this once per page. */\nexport function startGitChangesRuntime(runtime: WebPluginRuntime): () => void {\n const send = (frame: Record<string, unknown>): void => {\n runtime.sendHubFrame(frame);\n };\n changesSender.update(() => send);\n return () => {\n changesSender.update((current) => (current === send ? undefined : current));\n };\n}\n\n/** Whether a sync command is running for this session. */\nexport const gitChangesActivitySource = {\n subscribe(listener: () => void) {\n const subscription = gitChanges.store.subscribe(listener);\n return () => subscription.unsubscribe();\n },\n isActive(sessionId: string | null) {\n return gitChanges.select(gitChanges.store.state, sessionId).pending !== undefined;\n },\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction optionalText(value: unknown): string | undefined {\n return typeof value === 'string' && value !== '' ? value : undefined;\n}\n\nfunction count(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isInteger(value) && value >= 0 ? value : undefined;\n}\n\n/** The page never trusts a frame's shape: a malformed field drops, the rest still renders. */\nconst MAX_CONFLICTS = 100;\n\nfunction optionalChanges(value: unknown): GitChangesView | undefined {\n if (!isRecord(value)) return undefined;\n const added = count(value.added);\n const removed = count(value.removed);\n const files = count(value.files);\n if (added === undefined || removed === undefined || files === undefined) return undefined;\n const branch = optionalText(value.branch);\n const base = optionalText(value.base);\n const upstream = isRecord(value.upstream) ? value.upstream : undefined;\n const ahead = count(upstream?.ahead);\n const behind = count(upstream?.behind);\n const upstreamRef = optionalText(upstream?.ref);\n const conflicts =\n isRecord(value.rebase) && Array.isArray(value.rebase.conflicts)\n ? value.rebase.conflicts.filter((file): file is string => typeof file === 'string').slice(0, MAX_CONFLICTS)\n : undefined;\n return {\n added,\n removed,\n files,\n ...(branch === undefined ? {} : { branch }),\n ...(base === undefined ? {} : { base }),\n ...(value.truncated === true ? { truncated: true } : {}),\n ...(upstreamRef === undefined || ahead === undefined || behind === undefined\n ? {}\n : { upstream: { ref: upstreamRef, ahead, behind } }),\n ...(conflicts === undefined ? {} : { rebase: { conflicts } }),\n };\n}\n\nfunction optionalErrorTarget(value: unknown): GitSyncErrorTarget | undefined {\n if (!isRecord(value)) return undefined;\n if (value.action === 'pull' || value.action === 'rebase' || value.action === 'abort-rebase')\n return { action: value.action };\n if (value.action === 'push')\n return value.forceRequired === true ? { action: 'push', forceRequired: true } : { action: 'push' };\n return undefined;\n}\n\n/** The session data channel: 'git_changes' payloads into the store. */\nexport const gitChangesChannel = gitChanges.channel<GitChangesSession>({\n channel: GIT_CHANGES_TYPE,\n parse(input) {\n if (!isRecord(input)) return null;\n return {\n changes: optionalChanges(input.changes),\n pending: optionalText(input.pending),\n error: optionalText(input.error),\n errorTarget: optionalErrorTarget(input.errorTarget),\n };\n },\n reduce(_current, next) {\n return next;\n },\n});\n\n/**\n * Asks the hub to pull, push, rebase or abort a paused rebase. `force` is only\n * ever sent after the reader confirmed a lease force for a rejected push.\n */\nexport function requestGitSync(sessionId: string, action: GitSyncAction, force = false): void {\n const payload: GitChangesCommand = action === 'push' && force ? { action: 'push', force: true } : { action };\n changesSender.store.state?.({ type: GIT_CHANGES_TYPE, sessionId, payload });\n}\n","import { defineActivityGroup } from '@agimon-ai/po-core/native';\nimport { BranchIcon } from '@agimon-ai/po-native-components';\nimport { createElement } from 'react';\n\nimport { worktreesTab } from '../_components/WorktreesPanel.native';\nimport { gitChangesActivitySource } from '../_lib/gitChangesStore.native';\nimport { worktreeActivitySource } from '../_lib/worktreesActivityStore.native';\n\nexport default defineActivityGroup({\n keys: 'g w',\n icon: () => createElement(BranchIcon),\n activeSource: {\n subscribe(listener) {\n const stopWorktrees = worktreeActivitySource.subscribe(listener);\n const stopChanges = gitChangesActivitySource.subscribe(listener);\n return () => {\n stopWorktrees();\n stopChanges();\n };\n },\n isActive(sessionId) {\n return worktreeActivitySource.isActive(sessionId) || gitChangesActivitySource.isActive(sessionId);\n },\n },\n marksBackgroundWork: false,\n transientTab: worktreesTab,\n order: 30,\n});\n","import { defineChannelFile } from '@agimon-ai/po-core/native';\n\nimport { gitChangesChannel } from '../_lib/gitChangesStore.native';\nexport default defineChannelFile(gitChangesChannel);\n","import { defineChannelFile } from '@agimon-ai/po-core/native';\n\nimport { worktreesChannel } from '../_lib/worktreesActivityStore.native';\nexport default defineChannelFile(worktreesChannel);\n","import type { ApiResponseOf, ApiRoutes } from '@agimon-ai/po-core/web';\n\nimport type { GitAuthView } from './gitAuth';\nimport type { GitReviewFileDiff, GitReviewSummary } from './gitReview';\nimport type { GitBranchesResponse, GitSessionCreated } from './gitSessions';\n\n/**\n * The routes the page calls, as data.\n *\n * No scope and no base path: the build reads both off\n * `src/extensions/(backend)/api/git/`, which mounts at global scope and so\n * answers workspace and session requests too. Each route answers only where it\n * belongs (auth on a workspace mount, the review on a session mount), so a\n * client accessor on the wrong scope gets a 404 rather than a second way in.\n *\n * Only what the browser calls is listed. The worktree routes stay HTTP for\n * other callers, but the dock drives worktrees over its channel.\n */\nconst routes = {\n /** Workspace: the new-session dialog's branch list. */\n branches: {\n method: 'GET',\n path: '/branches',\n response: undefined as unknown as ApiResponseOf<GitBranchesResponse>,\n },\n /** Workspace: a top-level worktree session on an existing or new branch. */\n createSession: {\n method: 'POST',\n path: '/sessions',\n response: undefined as unknown as ApiResponseOf<GitSessionCreated>,\n },\n /** Workspace: that workspace's saved remote auth, never the token itself. */\n auth: {\n method: 'GET',\n path: '/auth',\n query: ['repositoryId'],\n response: undefined as unknown as ApiResponseOf<GitAuthView>,\n },\n /** Workspace: replaces that workspace's remote auth. Passkey step-up gated for remote devices. */\n saveAuth: {\n method: 'PUT',\n path: '/auth',\n query: ['repositoryId'],\n response: undefined as unknown as ApiResponseOf<GitAuthView>,\n },\n /** Session: the files this session's checkout changed against its base. */\n review: {\n method: 'GET',\n path: '/review',\n response: undefined as unknown as ApiResponseOf<GitReviewSummary>,\n },\n /** Session: one changed file's hunks. */\n reviewFile: {\n method: 'GET',\n path: '/review/file',\n query: ['path'],\n response: undefined as unknown as ApiResponseOf<GitReviewFileDiff>,\n },\n} as const satisfies ApiRoutes;\n\nexport default routes;\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { createApiClient, nativeApiTransport, sessionApiAddress } from '@agimon-ai/po-core/native';\n\nimport routes from '../src/types/apiRoutes';\n\n/** Scopes the tree mounts 'git' at. */\nexport const apiScopes = ['global', 'workspace', 'session'] as const;\n\nexport const api = createApiClient(routes, {\n scopes: apiScopes,\n basePath: 'git',\n transport: nativeApiTransport,\n sessionAddress: sessionApiAddress,\n});\n","import { api } from '../../../../../../generated/client.native';\nimport type { GitReviewFileDiff, GitReviewSummary } from '../../../../../types/gitReview';\n\n/**\n * The review tab's half of the session API: the changed-file list and one\n * file's hunks.\n *\n * The generated client owns the URL and the sealed transport, so nothing here\n * spells a route or reaches for `fetch`. What travels is file contents, which a\n * tunnel's relay must never see in the clear.\n */\n\nconst UNREACHABLE = 'The session is unreachable.';\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** The message a reader is shown: the route's own words, or why there were none. */\nfunction messageOf(result: { status: number; error: string }): string {\n if (result.status === 0) return UNREACHABLE;\n return result.error === '' ? `The session answered ${String(result.status)}.` : result.error;\n}\n\nexport type ReviewSummaryResult = { ok: true; summary: GitReviewSummary } | { ok: false; error: string };\n\nexport async function fetchReviewSummary(sessionId: string, signal?: AbortSignal): Promise<ReviewSummaryResult> {\n const result = await api.session(sessionId).review(signal === undefined ? {} : { signal });\n if (!result.ok) return { ok: false, error: messageOf(result) };\n if (!isRecord(result.data) || !Array.isArray(result.data.files)) {\n return { ok: false, error: 'The session answered with no file list.' };\n }\n return { ok: true, summary: result.data };\n}\n\nexport type ReviewFileResult = { ok: true; diff: GitReviewFileDiff } | { ok: false; error: string };\n\nexport async function fetchReviewFile(\n sessionId: string,\n path: string,\n signal?: AbortSignal,\n): Promise<ReviewFileResult> {\n const result = await api\n .session(sessionId)\n .reviewFile({ query: { path }, ...(signal === undefined ? {} : { signal }) });\n if (!result.ok) return { ok: false, error: messageOf(result) };\n if (!isRecord(result.data) || !Array.isArray(result.data.hunks)) {\n return { ok: false, error: 'The session answered with no diff.' };\n }\n return { ok: true, diff: result.data };\n}\n","import { defineSessionStore } from '@agimon-ai/po-core/native';\n/**\n * Review comments queued on this session, waiting to go to the agent as one\n * message.\n *\n * DESIGN PATTERNS:\n * - Session-scoped and in memory: comments survive closing and reopening the\n * review tab, not a page reload. The same trade the files tab makes.\n * - Comments are cleared only after a send the host accepted, never before.\n */\nimport type { ReviewComment } from '@agimon-ai/po-web-components';\n\nexport interface GitReviewSession {\n comments: ReviewComment[];\n}\n\nexport const gitReview = defineSessionStore<GitReviewSession>({ comments: [] });\n\nexport function addReviewComment(sessionId: string, comment: Omit<ReviewComment, 'id'>): void {\n const id = `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n gitReview.update(sessionId, (current) => ({ comments: [...current.comments, { ...comment, id }] }));\n}\n\nexport function removeReviewComment(sessionId: string, id: string): void {\n gitReview.update(sessionId, (current) => ({ comments: current.comments.filter((comment) => comment.id !== id) }));\n}\n\nexport function clearReviewComments(sessionId: string): void {\n gitReview.update(sessionId, () => ({ comments: [] }));\n}\n","import type { SessionFrameSender } from '@agimon-ai/po-core/web';\n\n/**\n * Pure wording for what the review tab sends the agent, and the one send.\n *\n * Both messages go as `follow_up`: the host starts a turn when idle, or after\n * the current one, without treating a review send as an explicit Queue action.\n * A `prompt` frame instead fails while a turn runs.\n */\n\n/** The opening line of a review, naming what was reviewed. */\nexport function reviewHeading(count: number, branch: string | undefined, base: string | undefined): string {\n const what = branch === undefined ? 'this checkout' : `branch ${branch}`;\n const against = base === undefined ? 'its uncommitted changes' : `its changes against ${base}`;\n const comments = count === 1 ? 'one review comment' : `${String(count)} review comments`;\n const address = count === 1 ? 'Please address it.' : 'Please address them all.';\n return `I reviewed ${what} (${against}) and left ${comments}. ${address}`;\n}\n\n/** What \"ask agent to resolve\" sends: the files, and the steps that finish a paused rebase. */\nexport function conflictPrompt(branch: string | undefined, conflicts: readonly string[]): string {\n const files =\n conflicts.length === 0 ? '- (git reports no unmerged paths yet)' : conflicts.map((file) => `- ${file}`).join('\\n');\n return [\n `A rebase of ${branch ?? 'this checkout'} stopped on conflicts in:`,\n '',\n files,\n '',\n 'Please resolve them:',\n '1. Fix the conflict markers in each file, keeping the intent of both sides.',\n '2. `git add` each resolved file.',\n '3. Run `GIT_EDITOR=true git rebase --continue`, and repeat if it stops again.',\n '',\n 'Do not push. I will push from the cockpit once the rebase is done.',\n ].join('\\n');\n}\n\n/**\n * Hands one deferred follow-up to the session. Returns the reason it failed,\n * or undefined once sent. The sender throws when the session is disconnected.\n */\nexport function deliverToAgent(send: SessionFrameSender, sessionId: string, message: string): string | undefined {\n try {\n send(sessionId, { type: 'follow_up', message });\n return undefined;\n } catch (error) {\n return error instanceof Error ? error.message : 'The session did not take the message.';\n }\n}\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport {\n Button,\n Input,\n Sheet,\n SheetBody,\n SheetContent,\n SheetHeader,\n SheetTitle,\n Textarea,\n fontOf,\n} from '@agimon-ai/po-native-components';\nimport { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport type { GitDiffRow, GitReviewFileDiff, GitReviewSummary, GitSyncAction } from '../../../../../types/gitReview';\nimport { gitChanges, requestGitSync } from '../_lib/gitChangesStore.native';\nimport { fetchReviewFile, fetchReviewSummary } from '../_lib/gitReviewApi.native';\nimport { addReviewComment, clearReviewComments, gitReview, removeReviewComment } from '../_lib/gitReviewStore.native';\nimport { conflictPrompt, deliverToAgent, reviewHeading } from '../_lib/gitReviewView';\n\nexport function useGitChanges(sessionId: string | null) {\n const subscribe = useCallback((listener: () => void) => {\n const sub = gitChanges.store.subscribe(listener);\n return () => sub.unsubscribe();\n }, []);\n return useSyncExternalStore(subscribe, () => gitChanges.select(gitChanges.store.state, sessionId));\n}\nexport function reviewTab(): Parameters<WebPluginSlotProps['openTransientTab']>[0] {\n return { id: 'git-review', label: 'review', panel: GitReviewPanel };\n}\nexport function GitReviewPanel({ sessionId, sendSessionFrame }: WebPluginSlotProps) {\n const activity = useGitChanges(sessionId);\n const subscribe = useCallback((listener: () => void) => {\n const sub = gitReview.store.subscribe(listener);\n return () => sub.unsubscribe();\n }, []);\n const comments = useSyncExternalStore(subscribe, () => gitReview.select(gitReview.store.state, sessionId).comments);\n const [summary, setSummary] = useState<GitReviewSummary>();\n const [file, setFile] = useState<GitReviewFileDiff>();\n const [error, setError] = useState<string>();\n const [dismissedError, setDismissedError] = useState<string>();\n const [confirm, setConfirm] = useState<'force' | 'abort' | 'discard'>();\n const [draft, setDraft] = useState<{ path: string; rows: GitDiffRow[] }>();\n const [comment, setComment] = useState('');\n const [start, setStart] = useState('');\n const [end, setEnd] = useState('');\n const request = useRef<AbortController | undefined>(undefined);\n const fingerprint = JSON.stringify(activity.changes);\n useEffect(() => {\n if (sessionId === null) return undefined;\n const controller = new AbortController();\n void fetchReviewSummary(sessionId, controller.signal)\n .then((result) => {\n if (!controller.signal.aborted) {\n if (result.ok) setSummary(result.summary);\n else setError(result.error);\n }\n })\n .catch((cause: unknown) => {\n if (!controller.signal.aborted) setError(cause instanceof Error ? cause.message : String(cause));\n });\n return () => {\n controller.abort();\n request.current?.abort();\n };\n }, [sessionId, fingerprint]);\n const loadFile = async (path: string) => {\n if (sessionId === null) return;\n request.current?.abort();\n const controller = new AbortController();\n request.current = controller;\n setFile(undefined);\n setError(undefined);\n try {\n const result = await fetchReviewFile(sessionId, path, controller.signal);\n if (!controller.signal.aborted) {\n if (result.ok) setFile(result.diff);\n else setError(result.error);\n }\n } catch (cause) {\n if (!controller.signal.aborted) setError(cause instanceof Error ? cause.message : String(cause));\n }\n };\n if (sessionId === null) return null;\n const changes = activity.changes;\n const busy = activity.pending !== undefined;\n const paused = changes?.rebase !== undefined;\n const send = (message: string, onSent?: () => void) => {\n const failure = deliverToAgent(sendSessionFrame, sessionId, message);\n setError(failure);\n if (failure === undefined) onSent?.();\n };\n const sync = (action: GitSyncAction) => requestGitSync(sessionId, action);\n const forceRequired =\n activity.error !== dismissedError &&\n activity.errorTarget?.action === 'push' &&\n activity.errorTarget.forceRequired === true;\n return (\n <ScrollView contentContainerStyle={styles.body}>\n <Text style={styles.title}>{changes?.branch ?? 'Detached HEAD'}</Text>\n <Text style={styles.meta}>\n {changes?.base ? `vs ${changes.base}` : 'Uncommitted changes'} · +{changes?.added ?? 0} -{changes?.removed ?? 0}\n \\n\n {changes?.upstream\n ? `↑${changes.upstream.ahead} ↓${changes.upstream.behind} ${changes.upstream.ref}`\n : 'No upstream yet'}\n </Text>\n <View style={styles.actions}>\n <Button\n variant=\"outline\"\n disabled={busy || paused || changes?.upstream === undefined}\n onPress={() => sync('pull')}\n >\n Pull\n </Button>\n <Button\n variant=\"outline\"\n disabled={busy || paused || changes?.branch === undefined}\n onPress={() => sync('push')}\n >\n Push\n </Button>\n <Button\n variant=\"outline\"\n disabled={busy || paused || changes?.base === undefined}\n onPress={() => sync('rebase')}\n >\n Rebase\n </Button>\n </View>\n {activity.pending ? <Text style={styles.meta}>{activity.pending}</Text> : null}\n {activity.error && activity.error !== dismissedError ? (\n <View>\n <Text style={styles.error}>{activity.error}</Text>\n <Button variant=\"ghost\" onPress={() => setDismissedError(activity.error)}>\n Dismiss\n </Button>\n </View>\n ) : null}\n {forceRequired ? (\n <Button variant=\"danger-outline\" disabled={busy} onPress={() => setConfirm('force')}>\n Force push with lease…\n </Button>\n ) : null}\n {paused ? (\n <View style={styles.body}>\n <Text style={styles.error}>Rebase paused\\n{changes.rebase?.conflicts.join('\\n')}</Text>\n <Button disabled={busy} onPress={() => send(conflictPrompt(changes.branch, changes.rebase?.conflicts ?? []))}>\n Ask agent to resolve\n </Button>\n <Button variant=\"danger-outline\" disabled={busy} onPress={() => setConfirm('abort')}>\n Abort rebase…\n </Button>\n </View>\n ) : null}\n {error ? <Text style={styles.error}>{error}</Text> : null}\n {summary ? (\n summary.files.map((entry) => (\n <Button\n key={entry.path}\n variant=\"ghost\"\n testID={`git-review-file-${entry.path}`}\n onPress={() => void loadFile(entry.path)}\n >\n {entry.path} · {entry.status} · +{entry.added} -{entry.removed}\n </Button>\n ))\n ) : (\n <Text style={styles.meta}>Loading changes…</Text>\n )}\n {summary?.files.length === 0 ? (\n <Text style={styles.meta}>{summary.repository ? 'No changed files' : 'Not a Git checkout'}</Text>\n ) : null}\n {summary?.truncated ? <Text style={styles.meta}>The file list was truncated.</Text> : null}\n {file ? (\n <View style={styles.body}>\n <Text style={styles.title}>{file.path}</Text>\n {file.binary || file.tooLarge ? (\n <Text style={styles.meta}>{file.binary ? 'Binary file' : 'Diff too large to display'}</Text>\n ) : (\n file.hunks.map((hunk, index) => (\n <View key={index}>\n {hunk.rows.map((row, rowIndex) => (\n <Text\n selectable\n key={rowIndex}\n style={styles.diff(row.marker)}\n onPress={() => {\n setDraft({ path: file.path, rows: hunk.rows });\n setStart(String(row.line));\n setEnd(String(row.line));\n }}\n >\n {row.marker} {row.line} {row.content}\n </Text>\n ))}\n </View>\n ))\n )}\n <Button\n variant=\"outline\"\n onPress={() => {\n setDraft({ path: file.path, rows: [] });\n setStart('');\n setEnd('');\n }}\n >\n Comment on file\n </Button>\n </View>\n ) : null}\n {comments.map((item) => (\n <View key={item.id}>\n <Text style={styles.meta}>\n {item.relPath}\n {item.startLine === undefined ? '' : `:${item.startLine}-${item.endLine ?? item.startLine}`}\\n{item.body}\n </Text>\n <Button variant=\"ghost\" onPress={() => removeReviewComment(sessionId, item.id)}>\n Remove comment\n </Button>\n </View>\n ))}\n {comments.length > 0 ? (\n <View style={styles.actions}>\n <Button\n onPress={() => {\n const body = comments\n .map((item) => {\n const anchor =\n item.startLine === undefined\n ? item.relPath\n : item.side === 'old'\n ? `${item.relPath} (removed lines ${item.startLine}-${item.endLine ?? item.startLine})`\n : `${item.relPath}:${item.startLine}-${item.endLine ?? item.startLine}`;\n const quoted = item.snippet\n .split('\\n')\n .slice(0, 20)\n .join('\\n')\n .slice(0, 2000)\n .split('\\n')\n .map((line) => `> ${line}`)\n .join('\\n');\n return `### ${anchor}\\n\\n${quoted}\\n\\n${item.body.trim()}`;\n })\n .join('\\n\\n');\n send(`${reviewHeading(comments.length, summary?.branch, summary?.base)}\\n\\n${body}`, () =>\n clearReviewComments(sessionId),\n );\n }}\n >\n Send review\n </Button>\n <Button variant=\"outline\" onPress={() => setConfirm('discard')}>\n Discard review…\n </Button>\n </View>\n ) : null}\n <Sheet\n open={draft !== undefined}\n onOpenChange={(open) => {\n if (!open) setDraft(undefined);\n }}\n >\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Review comment</SheetTitle>\n </SheetHeader>\n <SheetBody>\n <View style={styles.body}>\n {draft?.rows.length ? (\n <>\n <Input\n accessibilityLabel=\"Start line\"\n value={start}\n onChangeText={setStart}\n keyboardType=\"number-pad\"\n />\n <Input accessibilityLabel=\"End line\" value={end} onChangeText={setEnd} keyboardType=\"number-pad\" />\n </>\n ) : null}\n <Textarea accessibilityLabel=\"Comment\" value={comment} onChangeText={setComment} />\n <Button\n disabled={\n comment.trim() === '' ||\n (Boolean(draft?.rows.length) &&\n (!Number.isInteger(Number(start)) ||\n Number(start) < 1 ||\n !Number.isInteger(Number(end)) ||\n Number(end) < Number(start)))\n }\n onPress={() => {\n if (!draft) return;\n const rows = draft.rows.filter((row) => row.line >= Number(start) && row.line <= Number(end));\n const kept = rows.filter((row) => row.marker !== '-');\n const numbered = kept.length > 0 ? kept : rows;\n addReviewComment(sessionId, {\n path: draft.path,\n relPath: draft.path,\n body: comment.trim(),\n snippet: numbered.map((row) => row.content).join('\\n'),\n ...(numbered.length === 0\n ? {}\n : {\n side: kept.length > 0 ? 'new' : 'old',\n startLine: Math.min(...numbered.map((row) => row.line)),\n endLine: Math.max(...numbered.map((row) => row.line)),\n }),\n });\n setDraft(undefined);\n setComment('');\n }}\n >\n Add comment\n </Button>\n </View>\n </SheetBody>\n </SheetContent>\n </Sheet>\n <Sheet\n open={confirm !== undefined}\n onOpenChange={(open) => {\n if (!open) setConfirm(undefined);\n }}\n >\n <SheetContent>\n <SheetHeader>\n <SheetTitle>\n {confirm === 'force'\n ? 'Force push with lease?'\n : confirm === 'abort'\n ? 'Abort rebase?'\n : 'Discard review?'}\n </SheetTitle>\n </SheetHeader>\n <SheetBody>\n <Text style={styles.meta}>\n {confirm === 'force'\n ? 'Git refuses this if the remote holds commits you never fetched and integrated.'\n : confirm === 'abort'\n ? 'Abort discards any conflict resolution in progress.'\n : 'Your queued comments will be removed.'}\n </Text>\n <Button\n variant=\"danger-outline\"\n onPress={() => {\n if (confirm === 'force') requestGitSync(sessionId, 'push', true);\n else if (confirm === 'abort') sync('abort-rebase');\n else clearReviewComments(sessionId);\n setConfirm(undefined);\n }}\n >\n Confirm\n </Button>\n </SheetBody>\n </SheetContent>\n </Sheet>\n </ScrollView>\n );\n}\nconst styles = StyleSheet.create((theme) => ({\n body: { padding: theme.spacing(3), gap: theme.spacing(2) },\n actions: { flexDirection: 'row', flexWrap: 'wrap', gap: theme.spacing(1) },\n title: { color: theme.colors.hi, fontSize: theme.fontSize.base, fontWeight: '600' },\n meta: { color: theme.colors.dim, fontSize: theme.fontSize.sm },\n error: { color: theme.colors.red, fontSize: theme.fontSize.sm },\n diff: (marker: GitDiffRow['marker']) => ({\n fontFamily: fontOf(theme.fontFamily.mono),\n fontSize: theme.fontSize.sm,\n color: marker === '+' ? theme.colors.green : marker === '-' ? theme.colors.red : theme.colors.text,\n paddingVertical: theme.spacing(1),\n }),\n}));\n","import type { WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport { ArrowRightIcon, Button, Dot, fontOf, ListRow } from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Pressable, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { reviewTab, useGitChanges } from '../../_components/GitReviewPanel.native';\nimport { useWorktrees, worktreesTab } from '../../_components/WorktreesPanel.native';\n\nexport function WorktreesActivitySection({ sessionId, openTransientTab }: WebPluginSlotProps) {\n const git = useGitChanges(sessionId);\n const state = useWorktrees(sessionId);\n const worktrees = state.worktrees.filter((item) => item.sessionId !== sessionId);\n return (\n <View style={styles.section}>\n {git.changes ? (\n // As the cockpit: the branch, then what changed on it, which opens the review.\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel={`${git.changes.branch ?? 'Detached HEAD'}, ${git.changes.added} added, ${git.changes.removed} removed`}\n testID=\"activity-diff-changes\"\n onPress={() => openTransientTab(reviewTab())}\n style={styles.changes}\n >\n <Text numberOfLines={1} style={styles.branch}>\n {git.changes.branch ?? 'Detached HEAD'}\n </Text>\n <Text style={styles.added}>+{git.changes.added}</Text>\n <Text style={styles.removed}>-{git.changes.removed}</Text>\n </Pressable>\n ) : null}\n {state.pending ? <ListRow title={state.pending} /> : null}\n {worktrees.map((item) => (\n <ListRow\n key={item.id}\n leading={<Dot tone={item.orphaned ? 'red' : item.sessionId === null ? 'muted' : 'blue'} />}\n title={\n <Button variant=\"ghost\" onPress={() => openTransientTab(worktreesTab())}>\n {item.branch}\n </Button>\n }\n description={[item.orphaned ? 'Orphaned' : '', item.unowned ? 'Unowned' : ''].filter(Boolean).join(' · ')}\n />\n ))}\n {worktrees.length === 0 && state.pending === undefined ? (\n // The cockpit's idle line: the status, then the one jade action beside it.\n <View style={styles.idle}>\n <Text style={styles.status}>Idle</Text>\n <Pressable\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: sessionId === null }}\n testID=\"activity-git-create\"\n disabled={sessionId === null}\n hitSlop={10}\n onPress={() => openTransientTab(worktreesTab())}\n style={styles.action}\n >\n <Text style={styles.actionText(sessionId === null)}>Create a worktree</Text>\n <ArrowRightIcon size={14} color={sessionId === null ? 'dim' : 'green'} />\n </Pressable>\n </View>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => {\n const sm = {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n };\n return {\n section: { gap: theme.spacing(1.5) },\n changes: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2) },\n branch: {\n ...sm,\n flex: 1,\n fontFamily: fontOf(theme.fontFamily.mono),\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors.hi,\n },\n added: { ...sm, color: theme.colors.green },\n removed: { ...sm, color: theme.colors.red },\n idle: { flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', gap: theme.spacing(4) },\n status: { ...sm, color: theme.colors.dim },\n action: { flexDirection: 'row', alignItems: 'center', gap: theme.spacing(1) },\n actionText: (disabled: boolean) => ({\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n fontWeight: theme.fontWeight.medium,\n color: disabled ? theme.colors.dim : theme.colors.green,\n }),\n };\n});\n","import { defineFill } from '@agimon-ai/po-core/native';\n\nimport { WorktreesActivitySection } from './_components/WorktreesActivitySection.native';\nexport default defineFill({ component: WorktreesActivitySection });\n","import { defineWebLifecycle } from '@agimon-ai/po-core/native';\n\nimport { startGitChangesRuntime } from '../_lib/gitChangesStore.native';\nimport { startWorktreeRuntime } from '../_lib/worktreesActivityStore.native';\nexport default defineWebLifecycle((runtime) => {\n const stopWorktrees = startWorktreeRuntime(runtime);\n const stopChanges = startGitChangesRuntime(runtime);\n return () => {\n stopChanges();\n stopWorktrees();\n };\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport activityGroupGit from '../src/extensions/workspaces/sessions/(frontend)/activity-group/git.native';\nimport channelGitChanges from '../src/extensions/workspaces/sessions/(frontend)/channel/git-changes.native';\nimport channelGitWorktrees from '../src/extensions/workspaces/sessions/(frontend)/channel/git-worktrees.native';\nimport fillWorktrees from '../src/extensions/workspaces/sessions/(frontend)/fill/Worktrees.activity.git.native';\nimport lifecycleStart from '../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'git',\n session: {\n get activityGroups(): WebPluginContributions['activityGroups'] { return [via({ name: 'git' }, activityGroupGit)]; },\n get channels(): WebPluginContributions['channels'] { return [via({ channel: 'git_changes' }, channelGitChanges), via({ channel: 'git_worktrees' }, channelGitWorktrees)]; },\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'activity.git', id: 'worktrees' }, fillWorktrees)]; },\n get start(): WebPluginContributions['start'] { return lifecycleStart; },\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAa,qBAAqB;;;;;;;;;;;;;;;;;;;;;;ACwBlC,MAAa,mBAAmB,mBAAqC;CACnE,WAAW,CAAC;CACZ,SAAS,KAAA;CACT,OAAO,KAAA;CACP,aAAa,KAAA;AACf,CAAC;;AAGD,MAAa,uBAAuB,kBAAwE,IAAI;;;;;;;;AAQhH,MAAM,iBAAiB,kBAAgE,KAAA,CAAS;;AAGhG,SAAgB,qBAAqB,SAAuC;CAG1E,MAAM,QAAQ,UAAyC;EACrD,QAAQ,aAAa,KAAK;CAC5B;CACA,eAAe,aAAa,IAAI;CAChC,aAAa;EACX,eAAe,QAAQ,YAAa,YAAY,OAAO,KAAA,IAAY,OAAQ;EAC3E,qBAAqB,aAAa,IAAI;CACxC;AACF;;;;;;;;;;;;;AAcA,MAAa,yBAAyB;CACpC,UAAU,UAAsB;EAC9B,MAAM,eAAe,iBAAiB,MAAM,UAAU,QAAQ;EAC9D,aAAa,aAAa,YAAY;CACxC;CACA,SAAS,WAA0B;EACjC,OAAO,iBAAiB,OAAO,iBAAiB,MAAM,OAAO,SAAS,CAAC,CAAC,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MO,QAAQ,CAAC;GAACC,mBAAA,CAAA,CAAA;EAAC;EAC5EV,aAAaF,cAAuB;GAClCM,YAAYvC,OAAOqC,MAAME,WAAWC,IAAI;GACxCC,UAAUJ,MAAMI,SAASkB;GACzBjB,YAAYL,MAAMK,WAAWiB;GAC7BT,YAAYb,MAAMa,WAAWU;GAC7BR,OAAOnB,WAAWI,MAAMgB,OAAOK,MAAMrB,MAAMgB,OAAOE;GAAKV,mBAAA,CAAA,CAAA;EACzD;CACF;AACF,CAAC;;;AC5FD,IAAA,wCAAe,WAAW,EAAE,WAAW,yBAAyB,CAAC;;;ACCjE,IAAA,uBAAe,oBAAoB,YAAY;CAC7C,MAAM,gBAAgB,qBAAqB,OAAO;CAClD,MAAM,cAAc,uBAAuB,OAAO;CAClD,aAAa;EACX,YAAY;EACZ,cAAc;CAChB;AACF,CAAC;;;ACFD,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,SAAS;EACP,IAAI,iBAA2D;GAAE,OAAO,CAAC,IAAI,EAAE,MAAM,MAAM,GAAGgB,kBAAgB,CAAC;EAAG;EAClH,IAAI,WAA+C;GAAE,OAAO,CAAC,IAAI,EAAE,SAAS,cAAc,GAAGC,0BAAiB,GAAG,IAAI,EAAE,SAAS,gBAAgB,GAAGC,4BAAmB,CAAC;EAAG;EAC1K,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI;IAAE,MAAM;IAAgB,IAAI;GAAY,GAAGC,qCAAa,CAAC;EAAG;EACvH,IAAI,QAAyC;GAAE,OAAOC;EAAgB;CACxE;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-git",
3
- "version": "0.0.0-alpha.22",
3
+ "version": "0.0.0-alpha.24",
4
4
  "description": "Git worktree sessions for Po: spawn an isolated worktree with its own session and manage it from the parent",
5
5
  "keywords": [
6
6
  "ai",
@@ -65,19 +65,19 @@
65
65
  "access": "public"
66
66
  },
67
67
  "dependencies": {
68
- "@agimon-ai/po-core": "0.0.0-alpha.22",
69
- "@agimon-ai/po-session": "0.0.0-alpha.22",
70
- "@agimon-ai/po-web-components": "0.0.0-alpha.22",
71
- "@agimon-ai/po-web-security": "0.0.0-alpha.22",
68
+ "@agimon-ai/po-core": "0.0.0-alpha.24",
69
+ "@agimon-ai/po-session": "0.0.0-alpha.24",
70
+ "@agimon-ai/po-web-components": "0.0.0-alpha.24",
71
+ "@agimon-ai/po-web-security": "0.0.0-alpha.24",
72
72
  "@deepseek-ai/cordis": "4.0.5",
73
73
  "@tanstack/react-store": "0.11.2",
74
74
  "@tanstack/store": "0.11.2",
75
75
  "typebox": "1.3.37"
76
76
  },
77
77
  "devDependencies": {
78
- "@agimon-ai/po-build": "0.0.0-alpha.22",
79
- "@agimon-ai/po-native-components": "0.0.0-alpha.22",
80
- "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.22",
78
+ "@agimon-ai/po-build": "0.0.0-alpha.24",
79
+ "@agimon-ai/po-native-components": "0.0.0-alpha.24",
80
+ "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.24",
81
81
  "@babel/core": "7.29.7",
82
82
  "@earendil-works/pi-agent-core": "1.3.0",
83
83
  "@earendil-works/pi-coding-agent": "1.3.0",