Here is a summary of how the sandbox behaves on your macOS system: ### ⚙️ How it Works When `--sandbox` is enabled (either via the launch flag or the `enableTerminalSandbox` setting in your `settings.json`), terminal commands run inside a lightweight containment boundary: - **macOS Native Isolation**: It utilizes macOS's native `sandbox-exec` utility to restrict system calls, network sockets, and directory access. - **Secure File Boundaries**: File system writes are locked down to designated safe zones (such as your designated workspace or scratch directory). Access to critical system paths, private user data, and external network resources is restricted. --- ### 🛡️ Active Permissions for this Session In this current session, the permission model is configured as follows: | Action / Resource | Permission Status | Details / Paths | | :--- | :--- | :--- | | **Command Execution** | ✅ **Allowed** | Terminal command execution is enabled. | | **File Reads (Allowed)** | ✅ **Allowed** | `/scratch`, `/browser_recordings`, `/html_artifacts`, `/knowledge`, `/worktrees`, `/skills`, `/builtin` | | **File Writes (Allowed)**| ✅ **Allowed** | `/scratch`, `/browser_recordings`, `/html_artifacts`, `/knowledge`, `/worktrees` | | **Sensitive Files** | ⚠️ **Ask** | `.env`, `.npmrc`, `.vscode`, `.git-credentials`, etc. | | **Root/App Settings** | 🚫 **Denied** | Direct modifications to `/config` and main `.gemini` configurations | --- ### 🔧 Configuration and Management * **Persistent Settings**: To enable sandboxing by default for all future sessions, configure the `enableTerminalSandbox` setting in your `~/.gemini/antigravity-cli/settings.json`: ```json { "enableTerminalSandbox": true } ``` * **Dynamic Adjustments**: Within an active CLI (`agy`) session, you can run the `/permissions` slash command to view or modify your autonomy and sandboxing levels on the fly. > [!NOTE] > Running in sandbox mode provides an excellent balance of autonomy and security, allowing me to execute build commands, run test scripts, and manage project files safely without risk to your primary host environment. Please let me know if you would like me to set up a new project workspace or run any specific tasks within this session!
127 lines
3.4 KiB
TypeScript
127 lines
3.4 KiB
TypeScript
import { StyleSheet } from 'react-native'
|
|
import { colors, radii, spacing, typography } from '../theme/mobile-theme'
|
|
|
|
// Styles for the hub's segmented control and the branch-card PR chip. Split from
|
|
// mobile-source-control-styles.ts so neither file crosses the line limit.
|
|
export const hubStyles = StyleSheet.create({
|
|
// Full-width tab bar under the hub header. Edge-to-edge, no inset track and no
|
|
// inner padding — segments share height evenly so the control doesn't float in a
|
|
// pill frame with gaps above/below the active cell.
|
|
segments: {
|
|
flexDirection: 'row',
|
|
alignItems: 'stretch',
|
|
width: '100%',
|
|
backgroundColor: colors.bgPanel,
|
|
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
borderBottomColor: colors.borderSubtle
|
|
},
|
|
segment: {
|
|
flex: 1,
|
|
minHeight: 40,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
paddingHorizontal: spacing.xs,
|
|
// Reserved so active underline doesn't change layout height.
|
|
borderBottomWidth: 2,
|
|
borderBottomColor: 'transparent'
|
|
},
|
|
segmentActive: {
|
|
borderBottomColor: colors.textPrimary
|
|
},
|
|
segmentPressed: {
|
|
opacity: 0.7
|
|
},
|
|
segmentText: {
|
|
color: colors.textSecondary,
|
|
fontSize: typography.bodySize,
|
|
fontWeight: '600'
|
|
},
|
|
segmentTextActive: {
|
|
color: colors.textPrimary
|
|
},
|
|
// The PR chip sits below the count row inside the branch card, separated by a
|
|
// hairline so it reads as a distinct, tappable status line.
|
|
chip: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: spacing.sm,
|
|
marginTop: spacing.md,
|
|
paddingTop: spacing.md,
|
|
borderTopWidth: StyleSheet.hairlineWidth,
|
|
borderTopColor: colors.borderSubtle
|
|
},
|
|
chipPressed: {
|
|
opacity: 0.7
|
|
},
|
|
chipIcon: {
|
|
width: 18,
|
|
alignItems: 'center'
|
|
},
|
|
chipNumber: {
|
|
color: colors.textPrimary,
|
|
fontSize: typography.bodySize,
|
|
fontWeight: '700'
|
|
},
|
|
statePill: {
|
|
paddingHorizontal: spacing.sm,
|
|
paddingVertical: 1,
|
|
borderRadius: radii.button,
|
|
borderWidth: StyleSheet.hairlineWidth
|
|
},
|
|
statePillText: {
|
|
fontSize: typography.metaSize,
|
|
fontWeight: '700'
|
|
},
|
|
rollup: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: 4
|
|
},
|
|
rollupText: {
|
|
fontSize: typography.metaSize,
|
|
fontWeight: '600'
|
|
},
|
|
comment: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: 4
|
|
},
|
|
commentText: {
|
|
color: colors.textSecondary,
|
|
fontSize: typography.metaSize,
|
|
fontWeight: '600'
|
|
},
|
|
// Pushes the chevron to the trailing edge without a fixed-width spacer.
|
|
chipSpacer: {
|
|
flex: 1,
|
|
minWidth: spacing.sm
|
|
},
|
|
chipCreateText: {
|
|
color: colors.accentBlue,
|
|
fontSize: typography.bodySize,
|
|
fontWeight: '600'
|
|
},
|
|
chipMutedText: {
|
|
flex: 1,
|
|
color: colors.textMuted,
|
|
fontSize: typography.metaSize
|
|
},
|
|
// Wraps the Changes-only controls (commit-failure/error notice, create-PR entry,
|
|
// bulk Stage/Unstage row) that used to live inside the summary card, now that the
|
|
// card is shared across segments and holds only branch status.
|
|
changesControls: {
|
|
paddingHorizontal: spacing.lg,
|
|
marginTop: spacing.xs
|
|
},
|
|
// Fills the remaining space below the header/segments/card so each segment's
|
|
// scroll view (SectionList / PR sidebar / history list) expands and scrolls.
|
|
tabBody: {
|
|
flex: 1
|
|
},
|
|
// Keep a previously-visited segment mounted (scroll + fetch state) without
|
|
// participating in layout while another segment is active.
|
|
tabBodyHidden: {
|
|
display: 'none'
|
|
}
|
|
})
|