gitspace 0.2.0-rc.13 → 0.2.0-rc.15
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.
- package/.claude/settings.local.json +2 -1
- package/.gitspace/select/01-status.sh +6 -7
- package/AGENTS.md +8 -9
- package/README.md +20 -19
- package/docs/CONNECTION.md +1 -1
- package/docs/REMOTE-DESIGN.md +15 -10
- package/docs/ROADMAP.md +1 -1
- package/docs/SITE_DOCS_FIGMA_MAKE.md +10 -9
- package/docs/UNIFIED_ARCHITECTURE.md +135 -289
- package/landing-page/src/components/docs/DocsContent.tsx +2 -2
- package/package.json +6 -6
- package/scripts/build.ts +3 -3
- package/src/app/input/__tests__/sessionCommands.test.ts +40 -0
- package/src/app/input/sessionCommands.ts +94 -0
- package/src/app/session/__tests__/useAttachController.test.ts +202 -0
- package/src/app/session/createSessionBackend.bun.ts +76 -0
- package/src/app/session/createSessionBackend.web.ts +104 -0
- package/src/app/session/types.ts +16 -0
- package/src/app/session/useAttachController.ts +212 -0
- package/src/app/session/useSessionClient.ts +35 -0
- package/src/app.tui.tsx +2591 -0
- package/src/{web/src/App.tsx → app.web.tsx} +322 -130
- package/src/commands/__tests__/connect-key.test.ts +10 -0
- package/src/commands/add.ts +26 -38
- package/src/commands/bundle.ts +12 -1
- package/src/commands/connect-key.ts +1 -0
- package/src/commands/connect.ts +363 -74
- package/src/commands/list.ts +6 -25
- package/src/commands/switch.ts +7 -5
- package/src/{web/src/components/DPad.tsx → components/DPad.web.tsx} +1 -2
- package/src/{web/src/components/FloatingControls.tsx → components/FloatingControls.web.tsx} +2 -2
- package/src/{web/src/components/FloatingJogWheel.tsx → components/FloatingJogWheel.web.tsx} +2 -2
- package/src/{shared/components → components}/Flow.tsx +12 -7
- package/src/{shared/components → components}/MachineList.tsx +4 -4
- package/src/{web/src/components/NumPad.tsx → components/NumPad.web.tsx} +1 -2
- package/src/{shared/components → components}/ProjectList.tsx +4 -5
- package/src/components/ProjectOnboardingStep.ts +23 -0
- package/src/components/ProjectOnboardingStep.tui.tsx +88 -0
- package/src/components/ProjectOnboardingStep.web.tsx +59 -0
- package/src/components/RemoteMachineScreen.tui.tsx +392 -0
- package/src/components/ScriptTerminal.tui.tsx +160 -0
- package/src/components/ScriptTerminal.web.tsx +89 -0
- package/src/components/SessionTerminal.tui.tsx +391 -0
- package/src/components/SessionTerminal.web.tsx +371 -0
- package/src/{shared/components → components}/SpacesBrowser.tsx +18 -17
- package/src/{web/src/components/TerminalControls.tsx → components/TerminalControls.web.tsx} +2 -3
- package/src/components/__tests__/script-terminal-buffer.tui.test.ts +72 -0
- package/src/components/script-terminal-buffer.tui.ts +37 -0
- package/src/components/session-terminal-page-navigation.ts +48 -0
- package/src/{tui/terminal-bracketed-paste.test.ts → components/terminal-bracketed-paste.tui.test.ts} +1 -3
- package/src/{tui/terminal-bracketed-paste.ts → components/terminal-bracketed-paste.tui.ts} +0 -1
- package/src/core/__tests__/bundle-refresh.test.ts +392 -221
- package/src/core/__tests__/project-lifecycle.test.ts +137 -0
- package/src/core/__tests__/workspace-lifecycle.test.ts +136 -0
- package/src/core/bundle-refresh.ts +840 -127
- package/src/core/preferences-service.ts +17 -0
- package/src/core/project-catalog.ts +52 -0
- package/src/core/project-lifecycle.ts +163 -0
- package/src/core/shell.ts +18 -66
- package/src/core/workspace-lifecycle.ts +194 -0
- package/src/core/workspace.ts +24 -0
- package/src/hooks/__tests__/useLocalSession.tui.test.ts +544 -0
- package/src/hooks/index.ts +8 -0
- package/src/{tui/hooks/index.ts → hooks/index.tui.ts} +8 -11
- package/src/{tui/hooks/useDaemonStatus.ts → hooks/useDaemonStatus.tui.ts} +2 -2
- package/src/hooks/useLocalSession.tui.ts +356 -0
- package/src/hooks/useRelayConnection.web.ts +54 -0
- package/src/hooks/useRemoteMachines.tui.ts +166 -0
- package/src/hooks/useRemoteTerminal.tui.ts +22 -0
- package/src/hooks/useTerminal.web.ts +36 -0
- package/src/hooks/useUserActivity.ts +61 -0
- package/src/lib/preferences-service.web.ts +41 -0
- package/src/lib/remote-session/protocol.ts +66 -2
- package/src/lib/remote-session/session-handler.ts +188 -16
- package/src/lib/remote-session/workspace-scanner.ts +1 -7
- package/src/lib/sonner.web.ts +1 -0
- package/src/{web/src/lib/storage/identity-store.ts → lib/storage/identity-store.web.ts} +1 -1
- package/src/lib/tmux-lite/cli.ts +1 -9
- package/src/{shared/notifications → notifications}/__tests__/useNotifications.test.ts +1 -1
- package/src/{shared/notifications → notifications}/policy.test.ts +1 -1
- package/src/{shared/notifications → notifications}/policy.ts +1 -1
- package/src/{shared/notifications → notifications}/types.ts +1 -1
- package/src/{shared/notifications → notifications}/useNotifications.ts +1 -1
- package/src/preferences/index.ts +1 -0
- package/src/preferences/types.ts +9 -0
- package/src/relay/server.ts +56 -22
- package/src/relay-client/__tests__/machine-directory-client.test.ts +152 -0
- package/src/relay-client/__tests__/useMachineDirectory.test.ts +172 -0
- package/src/relay-client/adapters/browser.ts +27 -0
- package/src/relay-client/adapters/node.ts +29 -0
- package/src/relay-client/index.ts +33 -0
- package/src/relay-client/machine-directory-client.ts +244 -0
- package/src/relay-client/useMachineDirectory.ts +175 -0
- package/src/session/__tests__/backend-manager.test.ts +89 -0
- package/src/session/__tests__/local-session-backend.test.ts +977 -0
- package/src/session/__tests__/reducer.test.ts +80 -0
- package/src/session/__tests__/remote-session-backend.test.ts +567 -0
- package/src/session/__tests__/useBundleRefreshAttachFlow.test.ts +431 -0
- package/src/session/__tests__/useRemoteSessionClient.test.ts +412 -0
- package/src/session/adapters/browser-remote.ts +101 -0
- package/src/session/adapters/node-remote.ts +135 -0
- package/src/session/backend-key.ts +5 -0
- package/src/session/backend-manager.ts +80 -0
- package/src/session/backend.ts +65 -0
- package/src/session/backends/local-session-backend.ts +839 -0
- package/src/session/backends/remote-session-backend.ts +980 -0
- package/src/{web/src/lib → session}/crypto/__tests__/web-terminal.test.ts +13 -13
- package/src/{web/src/lib/crypto/handshake.ts → session/crypto/handshake.web.ts} +2 -2
- package/src/{web/src/lib/crypto/identity.ts → session/crypto/identity.web.ts} +6 -1
- package/src/{web/src/lib/crypto/relay-signing.ts → session/crypto/relay-signing.web.ts} +1 -1
- package/src/session/events.ts +29 -0
- package/src/session/index.ts +115 -0
- package/src/session/reducer.ts +240 -0
- package/src/session/selectors.ts +28 -0
- package/src/session/types.ts +85 -0
- package/src/session/useBundleRefreshAttachFlow.ts +606 -0
- package/src/session/useRemoteSessionClient.ts +351 -0
- package/src/session/useSessionEngine.ts +310 -0
- package/src/tui/__tests__/input-text.test.ts +24 -0
- package/src/tui/__tests__/local-terminal-sync.test.ts +82 -0
- package/src/tui/__tests__/session-terminal-page-navigation.test.ts +94 -0
- package/src/tui/app.tsx +2 -2555
- package/src/tui/index.ts +7 -13
- package/src/tui/input-text.ts +38 -0
- package/src/tui/local-terminal-sync.ts +41 -0
- package/src/types/bundle-refresh.ts +42 -0
- package/src/types/bundle.ts +21 -3
- package/src/types/config.ts +38 -14
- package/src/types/errors.ts +4 -2
- package/src/types/script-phase.ts +3 -0
- package/src/utils/__tests__/onboarding.test.ts +11 -10
- package/src/utils/__tests__/run-scripts.test.ts +80 -7
- package/src/utils/__tests__/run-workspace-scripts.test.ts +184 -22
- package/src/utils/__tests__/workspace-setup.integration.test.ts +563 -0
- package/src/utils/__tests__/workspace-state.test.ts +78 -0
- package/src/utils/onboarding.ts +24 -10
- package/src/utils/run-scripts.ts +76 -12
- package/src/utils/run-workspace-scripts.ts +270 -26
- package/src/utils/workspace-state.ts +397 -33
- package/tsconfig.json +7 -1
- package/{src/web/src → web}/index.css +2 -0
- package/{src/web → web}/index.html +1 -1
- package/{src/web/src → web}/main.tsx +1 -1
- package/{src/web → web}/public/vite.svg +1 -1
- package/{src/web → web}/tsconfig.app.json +6 -1
- package/{src/web → web}/vite.config.ts +5 -0
- package/src/shared/hooks/index.ts +0 -16
- package/src/shared/hooks/useNavigation.ts +0 -226
- package/src/shared/index.ts +0 -122
- package/src/shared/providers/LocalMachineProvider.ts +0 -425
- package/src/shared/providers/MachineProvider.ts +0 -165
- package/src/shared/providers/RemoteMachineProvider.ts +0 -439
- package/src/shared/providers/index.ts +0 -26
- package/src/shared/types.ts +0 -145
- package/src/tui/adapters.ts +0 -120
- package/src/tui/components/ScriptTerminal.tsx +0 -211
- package/src/tui/components/Terminal.tsx +0 -698
- package/src/tui/hooks/useAppState.ts +0 -314
- package/src/tui/hooks/useInboxTUI.ts +0 -114
- package/src/tui/hooks/useRemoteMachines.ts +0 -208
- package/src/tui/state.ts +0 -316
- package/src/web/src/assets/react.svg +0 -1
- package/src/web/src/components/Terminal.tsx +0 -326
- package/src/web/src/hooks/useRelayConnection.ts +0 -224
- package/src/web/src/hooks/useTerminal.ts +0 -763
- package/src/web/src/types/identity.ts +0 -45
- /package/src/{shared/components → components}/Flow.tui.tsx +0 -0
- /package/src/{shared/components → components}/Flow.web.tsx +0 -0
- /package/src/{shared/components → components}/Inbox.tsx +0 -0
- /package/src/{shared/components → components}/Inbox.tui.tsx +0 -0
- /package/src/{shared/components → components}/Inbox.web.tsx +0 -0
- /package/src/{shared/components → components}/MachineList.tui.tsx +0 -0
- /package/src/{shared/components → components}/MachineList.web.tsx +0 -0
- /package/src/{shared/components → components}/ProjectList.tui.tsx +0 -0
- /package/src/{shared/components → components}/ProjectList.web.tsx +0 -0
- /package/src/{shared/components → components}/SpacesBrowser.tui.tsx +0 -0
- /package/src/{shared/components → components}/SpacesBrowser.web.tsx +0 -0
- /package/src/{shared/components → components}/index.ts +0 -0
- /package/src/{web/src/hooks/useVisualViewport.ts → hooks/useVisualViewport.web.ts} +0 -0
- /package/src/{web/src/lib/invite.ts → lib/invite.web.ts} +0 -0
- /package/src/{shared/notifications → notifications}/index.ts +0 -0
- /package/src/{web/src/lib/crypto/frames.ts → session/crypto/frames.web.ts} +0 -0
- /package/src/{web/src/lib/crypto/keyexchange.ts → session/crypto/keyexchange.web.ts} +0 -0
- /package/src/{web/src/utils/device.ts → utils/device.web.ts} +0 -0
- /package/{src/web → web}/README.md +0 -0
- /package/{src/web → web}/bun.lock +0 -0
- /package/{src/web → web}/eslint.config.js +0 -0
- /package/{src/web → web}/package.json +0 -0
- /package/{src/web → web}/tsconfig.json +0 -0
- /package/{src/web → web}/tsconfig.node.json +0 -0
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
#
|
|
4
4
|
# This runs every time you switch to an existing workspace.
|
|
5
5
|
#
|
|
6
|
-
# Bundle values are available as environment variables
|
|
7
|
-
#
|
|
8
|
-
# SPACE_SECRET_<KEY> - Secret values from secret steps
|
|
6
|
+
# Bundle values are available as environment variables using bundle key names.
|
|
7
|
+
# Example: DEVELOPERNAME, EXAMPLEAPITOKEN
|
|
9
8
|
|
|
10
9
|
WORKSPACE_NAME=$1
|
|
11
10
|
REPOSITORY=$2
|
|
@@ -15,14 +14,14 @@ echo "=== Workspace: $WORKSPACE_NAME ==="
|
|
|
15
14
|
echo ""
|
|
16
15
|
|
|
17
16
|
# Show bundle values (proof of concept)
|
|
18
|
-
if [ -n "$
|
|
19
|
-
echo "Welcome back, $
|
|
17
|
+
if [ -n "$DEVELOPERNAME" ]; then
|
|
18
|
+
echo "Welcome back, $DEVELOPERNAME!"
|
|
20
19
|
fi
|
|
21
20
|
|
|
22
21
|
# Show that we have access to the secret (masked)
|
|
23
|
-
if [ -n "$
|
|
22
|
+
if [ -n "$EXAMPLEAPITOKEN" ]; then
|
|
24
23
|
# Only show first 4 characters to prove we have access
|
|
25
|
-
TOKEN_PREVIEW="${
|
|
24
|
+
TOKEN_PREVIEW="${EXAMPLEAPITOKEN:0:4}..."
|
|
26
25
|
echo "API Token available: $TOKEN_PREVIEW (stored in OS keychain)"
|
|
27
26
|
fi
|
|
28
27
|
|
package/AGENTS.md
CHANGED
|
@@ -128,22 +128,21 @@ src/
|
|
|
128
128
|
│ │ └── ProjectList.tui.tsx
|
|
129
129
|
│ ├── providers/ # Machine access abstraction
|
|
130
130
|
│ │ ├── MachineProvider.ts # Interface definition
|
|
131
|
-
│ │
|
|
132
|
-
│ │ └── RemoteMachineProvider.ts # Via relay
|
|
131
|
+
│ │ └── LocalMachineProvider.ts # Direct tmux-lite access
|
|
133
132
|
│ ├── hooks/
|
|
134
|
-
│ │ └──
|
|
133
|
+
│ │ └── useUserActivity.ts # Activity tracking for notifications
|
|
135
134
|
│ └── types.ts # Shared type definitions
|
|
136
135
|
├── tui/ # Terminal UI (OpenTUI)
|
|
137
136
|
│ ├── index.ts # TUI entry point
|
|
138
137
|
│ ├── app.tsx # Main TUI application
|
|
139
|
-
│ ├── state.ts # State management
|
|
140
|
-
│ ├── adapters.ts # Local/remote machine adapters
|
|
141
138
|
│ ├── components/
|
|
142
|
-
│ │
|
|
139
|
+
│ │ ├── RemoteMachineScreen.tsx # Remote machine browser screen
|
|
140
|
+
│ │ └── RemoteTerminal.tsx # Embedded session terminal
|
|
143
141
|
│ └── hooks/
|
|
144
|
-
│ ├── useAppState.ts
|
|
145
142
|
│ ├── useRemoteMachines.ts
|
|
146
|
-
│
|
|
143
|
+
│ ├── useRemoteTerminal.ts
|
|
144
|
+
│ ├── useLocalSession.ts
|
|
145
|
+
│ └── useDaemonStatus.ts
|
|
147
146
|
├── web/ # Web application (Vite + React)
|
|
148
147
|
│ └── src/
|
|
149
148
|
│ ├── App.tsx # Main web app
|
|
@@ -335,7 +334,7 @@ interface MachineProvider {
|
|
|
335
334
|
```
|
|
336
335
|
|
|
337
336
|
- `LocalMachineProvider`: Direct filesystem + tmux-lite CLI
|
|
338
|
-
-
|
|
337
|
+
- Remote machine access in UI now uses shared relay/session hooks + backend adapters (`shared/relay/*`, `shared/session/*`)
|
|
339
338
|
|
|
340
339
|
## Development Workflow
|
|
341
340
|
|
package/README.md
CHANGED
|
@@ -118,11 +118,11 @@ A bundle is a directory (typically `.gitspace/`) containing:
|
|
|
118
118
|
.gitspace/
|
|
119
119
|
├── bundle.json # Bundle manifest with onboarding steps
|
|
120
120
|
└── scripts/
|
|
121
|
-
├── pre/ #
|
|
121
|
+
├── pre/ # Deprecated: migrate scripts into ordered setup/
|
|
122
122
|
│ └── 01-copy-env.sh
|
|
123
|
-
├── setup/ # Scripts
|
|
123
|
+
├── setup/ # Scripts for setup runs (when bundle/value state changes)
|
|
124
124
|
│ └── 01-install-deps.sh
|
|
125
|
-
├── select/ # Scripts to run
|
|
125
|
+
├── select/ # Scripts to run on each new terminal attach
|
|
126
126
|
│ └── 01-status.sh
|
|
127
127
|
└── remove/ # Scripts to run before workspace deletion
|
|
128
128
|
└── 01-cleanup.sh
|
|
@@ -180,10 +180,10 @@ A bundle is a directory (typically `.gitspace/`) containing:
|
|
|
180
180
|
|
|
181
181
|
### Using Bundle Values in Scripts
|
|
182
182
|
|
|
183
|
-
Bundle values are passed to scripts as environment variables:
|
|
183
|
+
Bundle values are passed to scripts as environment variables using the configured bundle keys:
|
|
184
184
|
|
|
185
|
-
-
|
|
186
|
-
- `
|
|
185
|
+
- `<KEY>` - Regular or secret value using the exact `configKey` from `bundle.json`
|
|
186
|
+
- Legacy aliases `SPACE_VALUE_<KEY>` / `SPACE_SECRET_<KEY>` are also provided for compatibility
|
|
187
187
|
|
|
188
188
|
**Example script:**
|
|
189
189
|
|
|
@@ -195,12 +195,12 @@ WORKSPACE_NAME=$1
|
|
|
195
195
|
REPOSITORY=$2
|
|
196
196
|
|
|
197
197
|
# Access bundle values
|
|
198
|
-
if [ -n "$
|
|
199
|
-
echo "Welcome, $
|
|
198
|
+
if [ -n "$TEAMNAME" ]; then
|
|
199
|
+
echo "Welcome, $TEAMNAME team!"
|
|
200
200
|
fi
|
|
201
201
|
|
|
202
202
|
# Access secrets (stored securely in OS keychain)
|
|
203
|
-
if [ -n "$
|
|
203
|
+
if [ -n "$APIKEY" ]; then
|
|
204
204
|
echo "API Key configured"
|
|
205
205
|
fi
|
|
206
206
|
```
|
|
@@ -363,9 +363,9 @@ inside each workspace so they can vary by branch:
|
|
|
363
363
|
```
|
|
364
364
|
~/gitspace/<project-name>/workspaces/<workspace-name>/.gitspace/
|
|
365
365
|
└── scripts/
|
|
366
|
-
├── pre/ #
|
|
367
|
-
├── setup/ # Run
|
|
368
|
-
├── select/ # Run
|
|
366
|
+
├── pre/ # Deprecated: run before setup (migrate to setup/)
|
|
367
|
+
├── setup/ # Run when setup state requires refresh
|
|
368
|
+
├── select/ # Run on each new terminal attach
|
|
369
369
|
└── remove/ # Run before workspace deletion
|
|
370
370
|
```
|
|
371
371
|
|
|
@@ -375,15 +375,15 @@ inside each workspace so they can vary by branch:
|
|
|
375
375
|
2. Scripts run **alphabetically** (use `01-`, `02-` prefixes)
|
|
376
376
|
3. **Working directory**: The workspace directory
|
|
377
377
|
4. **Arguments**: `$1` = workspace name, `$2` = repository name
|
|
378
|
-
5. **Environment**: Bundle values available
|
|
378
|
+
5. **Environment**: Bundle values available by key name (for example `REGION`, `PULUMI_ACCESS_TOKEN`)
|
|
379
379
|
|
|
380
380
|
#### Script Phases
|
|
381
381
|
|
|
382
382
|
| Phase | When | Use Case |
|
|
383
383
|
|-------|------|----------|
|
|
384
|
-
| `pre/` |
|
|
385
|
-
| `setup/` |
|
|
386
|
-
| `select/` | Every
|
|
384
|
+
| `pre/` | Deprecated | Move scripts into ordered `setup/` files |
|
|
385
|
+
| `setup/` | When setup state changes | Install dependencies, initial build |
|
|
386
|
+
| `select/` | Every new terminal attach | Git fetch, status checks |
|
|
387
387
|
| `remove/` | Before deletion | Cleanup, notifications |
|
|
388
388
|
|
|
389
389
|
### Environment Variables
|
|
@@ -393,8 +393,9 @@ inside each workspace so they can vary by branch:
|
|
|
393
393
|
export SPACES_CURRENT_PROJECT="my-app"
|
|
394
394
|
|
|
395
395
|
# Available in scripts (from bundle onboarding):
|
|
396
|
-
#
|
|
397
|
-
#
|
|
396
|
+
# <KEY> - Value by bundle config key name
|
|
397
|
+
# SPACE_VALUE_<KEY> - Legacy alias for regular values
|
|
398
|
+
# SPACE_SECRET_<KEY> - Legacy alias for secret values
|
|
398
399
|
```
|
|
399
400
|
|
|
400
401
|
## Directory Structure
|
|
@@ -592,7 +593,7 @@ Error: GitHub CLI is not authenticated
|
|
|
592
593
|
|
|
593
594
|
### Bundle secrets not available
|
|
594
595
|
|
|
595
|
-
If
|
|
596
|
+
If expected bundle key environment variables are empty, ensure:
|
|
596
597
|
1. You completed the onboarding secret steps
|
|
597
598
|
2. Your OS keychain service is running (libsecret on Linux, Keychain on macOS)
|
|
598
599
|
|
package/docs/CONNECTION.md
CHANGED
|
@@ -4,7 +4,7 @@ This document describes how GitSpace handles WebSocket connections, disconnectio
|
|
|
4
4
|
|
|
5
5
|
> **Related:** See [PROTOCOL.md](./PROTOCOL.md) for message/frame format, [REMOTE-DESIGN.md](./REMOTE-DESIGN.md) for security model.
|
|
6
6
|
|
|
7
|
-
> **Implementation Note:** The web client (`
|
|
7
|
+
> **Implementation Note:** The web client tooling (`web/`) currently lacks the
|
|
8
8
|
> auto-reconnection logic described below. While the relay connection has a
|
|
9
9
|
> 15-second heartbeat, neither the relay nor terminal connections implement
|
|
10
10
|
> exponential backoff reconnection. This is a known gap - disconnections
|
package/docs/REMOTE-DESIGN.md
CHANGED
|
@@ -293,14 +293,18 @@ Key responsibilities:
|
|
|
293
293
|
**Role:** User interface, decryption endpoint
|
|
294
294
|
|
|
295
295
|
```
|
|
296
|
-
|
|
297
|
-
├──
|
|
296
|
+
web/
|
|
297
|
+
├── index.html # Vite entry document
|
|
298
|
+
└── main.tsx # Lightweight web entrypoint
|
|
299
|
+
|
|
300
|
+
src/
|
|
301
|
+
├── app.web.tsx # Main web application
|
|
298
302
|
├── hooks/
|
|
299
|
-
│ ├── useRelayConnection.ts
|
|
300
|
-
│ └── useTerminal.ts
|
|
303
|
+
│ ├── useRelayConnection.web.ts
|
|
304
|
+
│ └── useTerminal.web.ts
|
|
301
305
|
├── components/
|
|
302
|
-
│ └──
|
|
303
|
-
└──
|
|
306
|
+
│ └── SessionTerminal.web.tsx
|
|
307
|
+
└── session/crypto/ # Client-side X3DH + encryption
|
|
304
308
|
```
|
|
305
309
|
|
|
306
310
|
Key responsibilities:
|
|
@@ -319,10 +323,11 @@ src/
|
|
|
319
323
|
├── commands/connect.ts # CLI connect command
|
|
320
324
|
├── tui/
|
|
321
325
|
│ ├── app.tsx # TUI application
|
|
322
|
-
│ ├──
|
|
323
|
-
│ └── hooks/
|
|
324
|
-
└── shared/
|
|
325
|
-
|
|
326
|
+
│ ├── hooks/useRemoteMachines.ts
|
|
327
|
+
│ └── hooks/useRemoteTerminal.ts
|
|
328
|
+
└── shared/
|
|
329
|
+
├── relay/ # Shared relay directory client/hooks
|
|
330
|
+
└── session/ # Shared session backends + engine
|
|
326
331
|
```
|
|
327
332
|
|
|
328
333
|
---
|
package/docs/ROADMAP.md
CHANGED
|
@@ -159,7 +159,7 @@ VM-per-workspace isolation using Lima. Works on all Apple Silicon (M1/M2/M3+).
|
|
|
159
159
|
- `src/core/lima/manager.ts` - VM lifecycle (start/stop/status)
|
|
160
160
|
- `src/core/lima/config.ts` - Generate Lima YAML from workspace config
|
|
161
161
|
- `src/core/lima/connection.ts` - Connect to tmux-lite inside VM
|
|
162
|
-
- `src/
|
|
162
|
+
- `src/session/backends/lima-session-backend.ts` - Session backend implementation
|
|
163
163
|
|
|
164
164
|
**Session Lifecycle:**
|
|
165
165
|
1. User selects workspace in TUI
|
|
@@ -297,7 +297,7 @@ Script execution rules:
|
|
|
297
297
|
- Scripts run alphabetically (use `01-`, `02-` prefixes)
|
|
298
298
|
- Working directory: The workspace directory
|
|
299
299
|
- Arguments: `$1` = workspace name, `$2` = repository name
|
|
300
|
-
- Environment: Bundle values available
|
|
300
|
+
- Environment: Bundle values available by key name (for example `REGION`, `PULUMI_ACCESS_TOKEN`)
|
|
301
301
|
|
|
302
302
|
Example script (`.gitspace/scripts/select/01-status.sh`):
|
|
303
303
|
```bash
|
|
@@ -377,14 +377,15 @@ Using bundle values in scripts:
|
|
|
377
377
|
```bash
|
|
378
378
|
#!/bin/bash
|
|
379
379
|
# Values available as environment variables:
|
|
380
|
-
#
|
|
381
|
-
#
|
|
380
|
+
# <KEY> - Value by bundle config key name
|
|
381
|
+
# SPACE_VALUE_<KEY> - Legacy alias for regular values
|
|
382
|
+
# SPACE_SECRET_<KEY> - Legacy alias for secret values
|
|
382
383
|
|
|
383
|
-
if [ -n "$
|
|
384
|
-
echo "Welcome, $
|
|
384
|
+
if [ -n "$TEAMNAME" ]; then
|
|
385
|
+
echo "Welcome, $TEAMNAME team!"
|
|
385
386
|
fi
|
|
386
387
|
|
|
387
|
-
if [ -n "$
|
|
388
|
+
if [ -n "$APIKEY" ]; then
|
|
388
389
|
echo "API Key configured"
|
|
389
390
|
fi
|
|
390
391
|
```
|
|
@@ -629,7 +630,7 @@ gssh identity init --label "My Device"
|
|
|
629
630
|
|
|
630
631
|
### Bundle/Secrets Issues
|
|
631
632
|
|
|
632
|
-
**"
|
|
633
|
+
**"Bundle key variables are empty"**
|
|
633
634
|
1. Ensure you completed onboarding secret steps
|
|
634
635
|
2. Check OS keychain is accessible:
|
|
635
636
|
- macOS: Keychain Access should be running
|
|
@@ -959,8 +960,8 @@ Bundles allow teams to share onboarding configurations. Place in `.gitspace/`:
|
|
|
959
960
|
|
|
960
961
|
**Using values in scripts:**
|
|
961
962
|
```bash
|
|
962
|
-
echo "Team: $
|
|
963
|
-
echo "Has API key: $
|
|
963
|
+
echo "Team: $TEAMNAME"
|
|
964
|
+
echo "Has API key: $APIKEY"
|
|
964
965
|
```
|
|
965
966
|
|
|
966
967
|
---
|