gsd-pi 2.75.0-dev.2203010a0 → 2.75.0-dev.96d4bb599
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/dist/onboarding.d.ts +5 -1
- package/dist/onboarding.js +5 -3
- package/dist/resources/extensions/gsd/auto-model-selection.js +1 -1
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +23 -19
- package/dist/resources/extensions/gsd/bootstrap/memory-tools.js +128 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +2 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +17 -4
- package/dist/resources/extensions/gsd/commands/handlers/onboarding.js +52 -68
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +5 -0
- package/dist/resources/extensions/gsd/commands-memory.js +462 -0
- package/dist/resources/extensions/gsd/gsd-db.js +237 -4
- package/dist/resources/extensions/gsd/memory-embeddings.js +219 -0
- package/dist/resources/extensions/gsd/memory-extractor.js +78 -27
- package/dist/resources/extensions/gsd/memory-ingest.js +218 -0
- package/dist/resources/extensions/gsd/memory-relations.js +189 -0
- package/dist/resources/extensions/gsd/memory-source-store.js +113 -0
- package/dist/resources/extensions/gsd/memory-store.js +299 -6
- package/dist/resources/extensions/gsd/model-router.js +9 -5
- package/dist/resources/extensions/gsd/notification-overlay.js +7 -22
- package/dist/resources/extensions/gsd/tools/memory-tools.js +306 -0
- package/dist/resources/extensions/gsd/tools/skip-slice.js +78 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +14 -14
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +14 -14
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-manifest.json +5 -5
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/package.json +1 -1
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +12 -10
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/session-manager.d.ts.map +1 -1
- package/packages/mcp-server/dist/session-manager.js +8 -1
- package/packages/mcp-server/dist/session-manager.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts +1 -0
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +113 -14
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/src/mcp-server.test.ts +40 -4
- package/packages/mcp-server/src/server.ts +12 -10
- package/packages/mcp-server/src/session-manager.ts +10 -3
- package/packages/mcp-server/src/workflow-tools.test.ts +91 -1
- package/packages/mcp-server/src/workflow-tools.ts +128 -18
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/src/resources/extensions/gsd/auto-model-selection.ts +1 -1
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +24 -20
- package/src/resources/extensions/gsd/bootstrap/memory-tools.ts +158 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +2 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +20 -4
- package/src/resources/extensions/gsd/commands/handlers/onboarding.ts +65 -98
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +5 -0
- package/src/resources/extensions/gsd/commands-memory.ts +551 -0
- package/src/resources/extensions/gsd/gsd-db.ts +273 -4
- package/src/resources/extensions/gsd/memory-embeddings.ts +235 -0
- package/src/resources/extensions/gsd/memory-extractor.ts +100 -34
- package/src/resources/extensions/gsd/memory-ingest.ts +286 -0
- package/src/resources/extensions/gsd/memory-relations.ts +240 -0
- package/src/resources/extensions/gsd/memory-source-store.ts +138 -0
- package/src/resources/extensions/gsd/memory-store.ts +351 -7
- package/src/resources/extensions/gsd/model-router.ts +10 -5
- package/src/resources/extensions/gsd/notification-overlay.ts +9 -19
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +12 -0
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/escalation.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-embeddings.test.ts +213 -0
- package/src/resources/extensions/gsd/tests/memory-ingest.test.ts +153 -0
- package/src/resources/extensions/gsd/tests/memory-maintenance.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/memory-relations.test.ts +175 -0
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/memory-tools.test.ts +295 -0
- package/src/resources/extensions/gsd/tests/model-router.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +56 -37
- package/src/resources/extensions/gsd/tests/skip-slice-cascades-tasks.test.ts +125 -0
- package/src/resources/extensions/gsd/tools/memory-tools.ts +380 -0
- package/src/resources/extensions/gsd/tools/skip-slice.ts +133 -0
- package/src/resources/extensions/gsd/workflow-logger.ts +3 -1
- /package/dist/web/standalone/.next/static/{8FZqxNe9FxQDmsbRzR8tA → o61X3klsB6C0UE0X1x3PA}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{8FZqxNe9FxQDmsbRzR8tA → o61X3klsB6C0UE0X1x3PA}/_ssgManifest.js +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
// GSD — /gsd onboarding command handler (re-entry
|
|
1
|
+
// GSD — /gsd onboarding command handler (re-entry hub)
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// The first-run wizard in src/onboarding.ts uses @clack/prompts and takes over
|
|
4
|
+
// raw stdin. Running it from inside the pi-coding-agent TUI wedges the TUI
|
|
5
|
+
// (clack leaves stdin paused + cooked, pi-tui's data handler then receives no
|
|
6
|
+
// keypresses). So re-entry cannot replay the clack wizard — instead it routes
|
|
7
|
+
// to a setup hub built from ctx.ui.select, which the TUI owns.
|
|
8
|
+
//
|
|
9
|
+
// Clack-only steps (llm/search/remote/tool-keys via the first-run wizard) are
|
|
10
|
+
// surfaced as notifications pointing the user at the canonical per-step
|
|
11
|
+
// commands (/login, /gsd keys, /gsd remote) that are already ctx.ui-safe.
|
|
6
12
|
|
|
7
13
|
import type { ExtensionCommandContext } from "@gsd/pi-coding-agent"
|
|
8
|
-
import { AuthStorage } from "@gsd/pi-coding-agent"
|
|
9
|
-
import { homedir } from "node:os"
|
|
10
|
-
import { join } from "node:path"
|
|
11
14
|
import {
|
|
12
15
|
ONBOARDING_STEPS,
|
|
13
16
|
isValidStepId,
|
|
14
|
-
nearestResumeStep,
|
|
15
17
|
type OnboardingStepId,
|
|
16
18
|
} from "../../setup-catalog.js"
|
|
17
19
|
import {
|
|
@@ -20,37 +22,7 @@ import {
|
|
|
20
22
|
resetOnboarding,
|
|
21
23
|
} from "../../onboarding-state.js"
|
|
22
24
|
|
|
23
|
-
// Inline auth path (mirrors src/app-paths.ts) — keep this module rootDir-clean
|
|
24
|
-
// for the resources tsconfig. Importing from src/ pulls files outside
|
|
25
|
-
// src/resources and breaks the build.
|
|
26
|
-
const AUTH_FILE_PATH = join(
|
|
27
|
-
process.env.GSD_CODING_AGENT_DIR ||
|
|
28
|
-
join(process.env.GSD_HOME || join(homedir(), ".gsd"), "agent"),
|
|
29
|
-
"auth.json",
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Dynamic import shim for the first-run wizard.
|
|
34
|
-
*
|
|
35
|
-
* src/onboarding.ts lives outside the resources rootDir, so a static import
|
|
36
|
-
* pulls it into this tsconfig project and triggers TS6059. We resolve the
|
|
37
|
-
* specifier through a variable + opaque type so TS can't pull the file at
|
|
38
|
-
* compile time; the path resolves correctly at runtime via dist/onboarding.js.
|
|
39
|
-
*/
|
|
40
|
-
type FirstRunWizardModule = {
|
|
41
|
-
runOnboarding: (storage: AuthStorage) => Promise<void>
|
|
42
|
-
runLlmStep: (...args: unknown[]) => Promise<unknown>
|
|
43
|
-
runWebSearchStep: (...args: unknown[]) => Promise<unknown>
|
|
44
|
-
runRemoteQuestionsStep: (...args: unknown[]) => Promise<unknown>
|
|
45
|
-
runToolKeysStep: (...args: unknown[]) => Promise<unknown>
|
|
46
|
-
}
|
|
47
|
-
async function loadFirstRunWizard(): Promise<FirstRunWizardModule> {
|
|
48
|
-
const specifier = "../../../../../onboarding.js"
|
|
49
|
-
return (await import(/* @vite-ignore */ specifier)) as FirstRunWizardModule
|
|
50
|
-
}
|
|
51
|
-
|
|
52
25
|
interface ParsedArgs {
|
|
53
|
-
resume: boolean
|
|
54
26
|
reset: boolean
|
|
55
27
|
step: string | null
|
|
56
28
|
stepValid: boolean | null
|
|
@@ -58,11 +30,13 @@ interface ParsedArgs {
|
|
|
58
30
|
|
|
59
31
|
function parseArgs(raw: string): ParsedArgs {
|
|
60
32
|
const tokens = raw.split(/\s+/).filter(Boolean)
|
|
61
|
-
const out: ParsedArgs = {
|
|
33
|
+
const out: ParsedArgs = { reset: false, step: null, stepValid: null }
|
|
62
34
|
for (let i = 0; i < tokens.length; i++) {
|
|
63
35
|
const t = tokens[i]
|
|
64
|
-
if (t === "--
|
|
65
|
-
else if (t === "--
|
|
36
|
+
if (t === "--reset" || t === "reset") out.reset = true
|
|
37
|
+
else if (t === "--resume" || t === "resume") {
|
|
38
|
+
// Re-entry no longer replays the wizard; --resume collapses into the hub.
|
|
39
|
+
}
|
|
66
40
|
else if (t === "--step" || t === "step") {
|
|
67
41
|
const next = tokens[i + 1]
|
|
68
42
|
if (next) {
|
|
@@ -79,52 +53,39 @@ function parseArgs(raw: string): ParsedArgs {
|
|
|
79
53
|
return out
|
|
80
54
|
}
|
|
81
55
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const authStorage = await getAuthStorage()
|
|
88
|
-
// The first-run wizard ignores the resume hint today — it always walks the
|
|
89
|
-
// full sequence with skip prompts. We still mark completion at the end and
|
|
90
|
-
// record the resume hint for next time. This keeps the wizard linear and
|
|
91
|
-
// simple; per-step jump support comes via --step.
|
|
92
|
-
if (fromStep) {
|
|
93
|
-
ctx.ui.notify(
|
|
94
|
-
`Resuming from step: ${fromStep}. The wizard runs all remaining steps; press skip on any you've already configured.`,
|
|
95
|
-
"info",
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
const { runOnboarding } = await loadFirstRunWizard()
|
|
99
|
-
await runOnboarding(authStorage)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
async function runSingleStep(ctx: ExtensionCommandContext, stepId: OnboardingStepId): Promise<void> {
|
|
103
|
-
const authStorage = await getAuthStorage()
|
|
104
|
-
const ob = await loadFirstRunWizard()
|
|
105
|
-
// Lazy-load clack + chalk via the same path the wizard uses
|
|
106
|
-
const p = await import("@clack/prompts")
|
|
107
|
-
const { default: chalk } = await import("chalk")
|
|
108
|
-
const pc = {
|
|
109
|
-
cyan: chalk.cyan, green: chalk.green, yellow: chalk.yellow,
|
|
110
|
-
dim: chalk.dim, bold: chalk.bold, red: chalk.red, reset: chalk.reset,
|
|
111
|
-
}
|
|
56
|
+
// ─── Per-step routing ────────────────────────────────────────────────────────
|
|
57
|
+
//
|
|
58
|
+
// Clack-based steps are surfaced as notifications — running them inline from
|
|
59
|
+
// the TUI would wedge stdin (see header comment). Everything else routes to an
|
|
60
|
+
// existing ctx.ui-safe handler.
|
|
112
61
|
|
|
62
|
+
async function runStep(ctx: ExtensionCommandContext, stepId: OnboardingStepId): Promise<void> {
|
|
113
63
|
switch (stepId) {
|
|
114
64
|
case "llm":
|
|
115
|
-
|
|
65
|
+
ctx.ui.notify(
|
|
66
|
+
"LLM provider setup: run /login to sign in via OAuth, or /gsd keys add to paste an API key.",
|
|
67
|
+
"info",
|
|
68
|
+
)
|
|
116
69
|
return
|
|
117
70
|
case "search":
|
|
118
|
-
|
|
71
|
+
ctx.ui.notify(
|
|
72
|
+
"Web search setup: run /gsd keys add and pick a search provider (brave, tavily, etc.).",
|
|
73
|
+
"info",
|
|
74
|
+
)
|
|
119
75
|
return
|
|
120
76
|
case "remote":
|
|
121
|
-
|
|
77
|
+
ctx.ui.notify(
|
|
78
|
+
"Remote questions setup: run /gsd remote to configure Discord / Slack / Telegram notifications.",
|
|
79
|
+
"info",
|
|
80
|
+
)
|
|
122
81
|
return
|
|
123
82
|
case "tool-keys":
|
|
124
|
-
|
|
83
|
+
ctx.ui.notify(
|
|
84
|
+
"Tool keys setup: run /gsd keys add to save API keys for Context7, Jina, Groq voice, etc.",
|
|
85
|
+
"info",
|
|
86
|
+
)
|
|
125
87
|
return
|
|
126
88
|
case "model": {
|
|
127
|
-
// Delegate to /gsd model picker
|
|
128
89
|
const { handleCoreCommand } = await import("./core.js")
|
|
129
90
|
await handleCoreCommand("model", ctx)
|
|
130
91
|
return
|
|
@@ -137,7 +98,6 @@ async function runSingleStep(ctx: ExtensionCommandContext, stepId: OnboardingSte
|
|
|
137
98
|
return
|
|
138
99
|
}
|
|
139
100
|
case "doctor": {
|
|
140
|
-
// Best-effort: surface provider doctor results inline
|
|
141
101
|
try {
|
|
142
102
|
const { runProviderDoctor } = await import("../../doctor-providers.js") as any
|
|
143
103
|
if (typeof runProviderDoctor === "function") {
|
|
@@ -148,10 +108,9 @@ async function runSingleStep(ctx: ExtensionCommandContext, stepId: OnboardingSte
|
|
|
148
108
|
ctx.ui.notify("Run /gsd doctor to validate your setup.", "info")
|
|
149
109
|
return
|
|
150
110
|
}
|
|
151
|
-
case "skills":
|
|
152
|
-
ctx.ui.notify("Skill install runs
|
|
111
|
+
case "skills":
|
|
112
|
+
ctx.ui.notify("Skill install runs during /gsd init. Use /gsd init or /skill manage.", "info")
|
|
153
113
|
return
|
|
154
|
-
}
|
|
155
114
|
case "project": {
|
|
156
115
|
const { handleCoreCommand } = await import("./core.js")
|
|
157
116
|
await handleCoreCommand("init", ctx)
|
|
@@ -160,6 +119,27 @@ async function runSingleStep(ctx: ExtensionCommandContext, stepId: OnboardingSte
|
|
|
160
119
|
}
|
|
161
120
|
}
|
|
162
121
|
|
|
122
|
+
// ─── Setup hub ───────────────────────────────────────────────────────────────
|
|
123
|
+
|
|
124
|
+
async function renderSetupHub(ctx: ExtensionCommandContext): Promise<void> {
|
|
125
|
+
const record = readOnboardingRecord()
|
|
126
|
+
const completed = new Set(record.completedSteps)
|
|
127
|
+
const skipped = new Set(record.skippedSteps)
|
|
128
|
+
|
|
129
|
+
const labels = ONBOARDING_STEPS.map(step => {
|
|
130
|
+
const mark = completed.has(step.id) ? "✓" : skipped.has(step.id) ? "↷" : "○"
|
|
131
|
+
const req = step.required ? " (required)" : ""
|
|
132
|
+
return `${mark} ${step.label}${req} — ${step.hint}`
|
|
133
|
+
})
|
|
134
|
+
const labelToStep = new Map(labels.map((label, i) => [label, ONBOARDING_STEPS[i].id]))
|
|
135
|
+
|
|
136
|
+
const choice = await ctx.ui.select("GSD Setup — pick a step to configure", labels)
|
|
137
|
+
if (typeof choice !== "string") return
|
|
138
|
+
const stepId = labelToStep.get(choice)
|
|
139
|
+
if (!stepId) return
|
|
140
|
+
await runStep(ctx, stepId)
|
|
141
|
+
}
|
|
142
|
+
|
|
163
143
|
function renderStatus(): string {
|
|
164
144
|
const r = readOnboardingRecord()
|
|
165
145
|
const lines: string[] = ["GSD Onboarding\n"]
|
|
@@ -192,38 +172,25 @@ export async function handleOnboarding(rawArgs: string, ctx: ExtensionCommandCon
|
|
|
192
172
|
ctx.ui.notify(`Unknown step "${args.step}". Valid: ${validIds}`, "warning")
|
|
193
173
|
return
|
|
194
174
|
}
|
|
195
|
-
await
|
|
175
|
+
await runStep(ctx, args.step as OnboardingStepId)
|
|
196
176
|
return
|
|
197
177
|
}
|
|
198
178
|
|
|
199
179
|
if (args.reset) {
|
|
200
180
|
resetOnboarding()
|
|
201
181
|
ctx.ui.notify(
|
|
202
|
-
"Onboarding
|
|
182
|
+
"Onboarding state cleared. API keys/credentials are unchanged — manage them with /gsd keys. Restart GSD to re-run the first-run wizard, or pick a step below.",
|
|
203
183
|
"info",
|
|
204
184
|
)
|
|
205
|
-
await
|
|
185
|
+
await renderSetupHub(ctx)
|
|
206
186
|
return
|
|
207
187
|
}
|
|
208
188
|
|
|
209
|
-
|
|
210
|
-
const r = readOnboardingRecord()
|
|
211
|
-
const next = nearestResumeStep(r.lastResumePoint, r.completedSteps)
|
|
212
|
-
await runWholeWizard(ctx, next)
|
|
213
|
-
return
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// No flags. If already complete, show status + offer choice.
|
|
189
|
+
// No flags (or --resume). Show status if complete, then open the hub.
|
|
217
190
|
if (isOnboardingComplete()) {
|
|
218
191
|
ctx.ui.notify(renderStatus(), "info")
|
|
219
|
-
ctx.ui.notify(
|
|
220
|
-
"Onboarding already complete. Use /gsd onboarding --reset to start over, or --step <name> to redo one section.",
|
|
221
|
-
"info",
|
|
222
|
-
)
|
|
223
|
-
return
|
|
224
192
|
}
|
|
225
|
-
|
|
226
|
-
await runWholeWizard(ctx)
|
|
193
|
+
await renderSetupHub(ctx)
|
|
227
194
|
}
|
|
228
195
|
|
|
229
196
|
export { renderStatus as renderOnboardingStatus }
|
|
@@ -251,6 +251,11 @@ Examples:
|
|
|
251
251
|
await handleExtractLearnings(trimmed.replace(/^extract-learnings\s*/, "").trim(), ctx, pi);
|
|
252
252
|
return true;
|
|
253
253
|
}
|
|
254
|
+
if (trimmed === "memory" || trimmed.startsWith("memory ") || trimmed === "memory help") {
|
|
255
|
+
const { handleMemory } = await import("../../commands-memory.js");
|
|
256
|
+
await handleMemory(trimmed.replace(/^memory\s*/, "").trim(), ctx, pi);
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
254
259
|
if (trimmed === "scan" || trimmed.startsWith("scan ")) {
|
|
255
260
|
const { handleScan } = await import("../../commands-scan.js");
|
|
256
261
|
// \s* (not \s+) is intentional: handles both /gsd scan (no args) and /gsd scan --focus X
|