windows-development-sandbox 1.15.0 → 1.16.0

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.
@@ -188,9 +188,10 @@ function loginItem(a, r) {
188
188
  ...(r.isActive ? [{ text: 'in the sandbox', tone: 'ok' }] : []),
189
189
  ...(r.isDefault ? [{ text: 'default', tone: 'accent' }] : []),
190
190
  ],
191
- description: 'Choose it to make the sandbox use this login.',
191
+ description: r.isActive ? 'The sandbox uses this login now.' : 'Choose it to make the sandbox use this login.',
192
192
  details: ['Agent ' + a.name, 'Email ' + (r.email ?? '-'), 'Saved ' + r.savedAt.slice(0, 16).replace('T', ' ')],
193
- primary: action(useAccount, { agent: a.name, name: r.name }, { verb: 'use' }),
193
+ // The login in use already offers nothing to switch to.
194
+ ...(r.isActive ? {} : { primary: action(useAccount, { agent: a.name, name: r.name }, { verb: 'use' }) }),
194
195
  actions: [
195
196
  action(defaultAccount, { agent: a.name, name: r.name }, { key: 'd', verb: 'make default', importance: 1 }),
196
197
  action(renameAccount, { agent: a.name, name: r.name }, { key: 'r', verb: 'rename', importance: 2 }),
@@ -244,7 +245,7 @@ export function agentPage(a) {
244
245
  export const accountsView = defineView({
245
246
  id: 'accounts',
246
247
  title: 'Accounts',
247
- summary: 'Logins saved on this PC, per agent. Use puts one into the sandbox; new launches start with the default.',
248
+ summary: 'Logins saved on this PC for each agent. Every launch starts with the default; "Use this login" switches now.',
248
249
  queries: { accounts: listAccounts },
249
250
  operations: [saveAccount, useAccount, defaultAccount, renameAccount, removeAccount],
250
251
  build: ({ accounts }) => accountsPage(accounts),
@@ -1606,7 +1606,7 @@ export interface NavSection {
1606
1606
  readonly view?: ViewId;
1607
1607
  /** Where the area is today when it has no view yet. */
1608
1608
  readonly elsewhere?: string;
1609
- /** Entries under this one (Sandbox: Status, Projects). */
1609
+ /** Entries under this one: a group of the navigation (Sandbox: Overview, Projects, Apps). */
1610
1610
  readonly children?: readonly NavSection[];
1611
1611
  /** Views shown as more categories inside this entry's page (Settings: VPN, GitHub), not as entries of their own. */
1612
1612
  readonly embeds?: readonly {
@@ -1618,6 +1618,8 @@ export interface NavSection {
1618
1618
  export declare function navSections(nav: readonly NavSection[]): NavSection[];
1619
1619
  /** Every view the web's navigation opens. */
1620
1620
  export declare function navViews(nav: readonly NavSection[]): ViewId[];
1621
+ /** The group of the navigation a view's entry sits in (Updates: Maintenance), for the page's breadcrumb. */
1622
+ export declare function navGroupOf(nav: readonly NavSection[], view: string): NavSection | undefined;
1621
1623
  /** The entry whose page shows this view as one of its categories (VPN: Settings), if any. */
1622
1624
  export declare function embeddingOf(nav: readonly NavSection[], view: string): NavSection | undefined;
1623
1625
  export declare const NAV: readonly NavSection[];
@@ -140,32 +140,46 @@ export function navSections(nav) {
140
140
  export function navViews(nav) {
141
141
  return navSections(nav).flatMap((n) => [...(n.view ? [n.view] : []), ...(n.embeds ?? []).map((e) => e.view)]);
142
142
  }
143
+ /** The group of the navigation a view's entry sits in (Updates: Maintenance), for the page's breadcrumb. */
144
+ export function navGroupOf(nav, view) {
145
+ return navSections(nav).find((n) => n.children?.some((c) => c.view === view));
146
+ }
143
147
  /** The entry whose page shows this view as one of its categories (VPN: Settings), if any. */
144
148
  export function embeddingOf(nav, view) {
145
149
  return navSections(nav).find((n) => n.embeds?.some((e) => e.view === view));
146
150
  }
147
151
  export const NAV = [
148
- { label: 'Agents', view: 'agents' },
149
- { label: 'Sessions', view: 'sessions' },
150
- { label: 'Activity', view: 'audit' },
152
+ {
153
+ label: 'Workspace',
154
+ children: [
155
+ { label: 'Agents', view: 'agents' },
156
+ { label: 'Sessions', view: 'sessions' },
157
+ { label: 'Activity', view: 'audit' },
158
+ ],
159
+ },
151
160
  {
152
161
  label: 'Sandbox',
153
162
  children: [
154
- { label: 'Status', view: 'sandbox' },
163
+ { label: 'Overview', view: 'sandbox' },
155
164
  { label: 'Projects', view: 'projects' },
165
+ { label: 'Apps', view: 'apps' },
156
166
  ],
157
167
  },
158
- { label: 'Apps', view: 'apps' },
159
168
  {
160
- label: 'Settings',
161
- view: 'settings',
162
- embeds: [
163
- { label: 'VPN', view: 'vpn' },
164
- { label: 'GitHub', view: 'github' },
169
+ label: 'Configuration',
170
+ children: [
171
+ {
172
+ label: 'Settings',
173
+ view: 'settings',
174
+ embeds: [
175
+ { label: 'VPN', view: 'vpn' },
176
+ { label: 'GitHub', view: 'github' },
177
+ ],
178
+ },
179
+ { label: 'Accounts', view: 'accounts' },
180
+ { label: 'Remote access', view: 'access' },
165
181
  ],
166
182
  },
167
- { label: 'Accounts', view: 'accounts' },
168
- { label: 'Remote access', view: 'access' },
169
183
  {
170
184
  label: 'Maintenance',
171
185
  children: [
@@ -163,7 +163,8 @@ function facts(o) {
163
163
  ? [
164
164
  fact('window', 'Window', s.headless ? 'hidden (sandbox show opens it)' : 'shown'),
165
165
  fact('uptime', 'Uptime', uptime(s) ?? '-'),
166
- fact('helper', 'Helper', s.daemon === '-' ? '-' : helperText(s.daemon)),
166
+ // The session count is its own fact: the helper only says whether it answers.
167
+ fact('helper', 'Helper', s.daemon === '-' ? '-' : s.daemon.startsWith('pong') ? 'Responding' : s.daemon),
167
168
  fact('sessions', 'Sessions', String(sessions)),
168
169
  ]
169
170
  : []),
@@ -195,9 +196,12 @@ function guardSection(o) {
195
196
  return {
196
197
  id: 'guard',
197
198
  title: 'Repo guard',
198
- summary: o.repoGuard.guarded +
199
- ' folder(s) guarded; ' +
200
- (findings.length ? findings.length + ' change(s) neutralised:' : 'nothing from the sandbox needed neutralising'),
199
+ summary: 'Watching ' +
200
+ plural(o.repoGuard.guarded, 'folder') +
201
+ '. ' +
202
+ (findings.length
203
+ ? plural(findings.length, 'change') + ' from the sandbox were blocked:'
204
+ : 'Nothing from the sandbox needed blocking.'),
201
205
  items: findings.slice(-10).map((f, i) => ({ id: 'guard:' + i, label: f, tone: 'warn' })),
202
206
  };
203
207
  }
@@ -249,7 +253,7 @@ export function sandboxPage(o) {
249
253
  export const sandboxView = defineView({
250
254
  id: 'sandbox',
251
255
  title: 'Sandbox',
252
- summary: 'What the sandbox is doing, its window, and stopping it.',
256
+ summary: 'Status, projects and controls of the running sandbox.',
253
257
  queries: { status: sandboxStatus },
254
258
  operations: [showWindow, hideWindow, stopSandbox],
255
259
  build: ({ status }) => sandboxPage(status),
@@ -240,7 +240,7 @@ export function sessionsPage(o) {
240
240
  export const sessionsView = defineView({
241
241
  id: 'sessions',
242
242
  title: 'Sessions',
243
- summary: 'The sessions of the running sandbox: open one, restart the agents, open a shell, close one.',
243
+ summary: 'Agent and shell sessions in the running sandbox.',
244
244
  queries: { sessions: listSessions },
245
245
  operations: [restartSessions, startShell, closeSession],
246
246
  build: ({ sessions }) => sessionsPage(sessions),
@@ -2,8 +2,8 @@
2
2
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  run
5
- } from "./chunk-HTQT5SBY.js";
6
- import "./chunk-D7CM63BS.js";
5
+ } from "./chunk-7EXDUNE7.js";
6
+ import "./chunk-HIC4CUMY.js";
7
7
 
8
8
  // src/bin/agent-sandbox.ts
9
9
  run(process.argv.slice(2));