@pellux/goodvibes-agent 1.1.0 → 1.1.1
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/CHANGELOG.md +4 -0
- package/dist/package/main.js +39 -24
- package/package.json +1 -1
- package/src/cli/tui-startup.ts +5 -5
- package/src/input/agent-workspace.ts +5 -3
- package/src/runtime/onboarding/markers.ts +48 -9
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Product-facing release notes for GoodVibes Agent.
|
|
4
4
|
|
|
5
|
+
## 1.1.1 - 2026-06-05
|
|
6
|
+
|
|
7
|
+
- Fix first-run onboarding so clean launches open the fullscreen setup workspace until the user explicitly chooses Finish -> Apply & close.
|
|
8
|
+
|
|
5
9
|
## 1.1.0 - 2026-06-05
|
|
6
10
|
|
|
7
11
|
- Add a final onboarding Finish category with Apply & close completion that saves the user onboarding marker and keeps future normal launches in the main conversation.
|
package/dist/package/main.js
CHANGED
|
@@ -817145,7 +817145,7 @@ var createStyledCell = (char, overrides = {}) => ({
|
|
|
817145
817145
|
// src/version.ts
|
|
817146
817146
|
import { readFileSync } from "fs";
|
|
817147
817147
|
import { join } from "path";
|
|
817148
|
-
var _version = "1.1.
|
|
817148
|
+
var _version = "1.1.1";
|
|
817149
817149
|
try {
|
|
817150
817150
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf-8"));
|
|
817151
817151
|
_version = typeof pkg.version === "string" ? pkg.version : _version;
|
|
@@ -849851,13 +849851,13 @@ init_state3();
|
|
|
849851
849851
|
|
|
849852
849852
|
// src/input/commands/recall-shared.ts
|
|
849853
849853
|
var VALID_CLASSES = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
|
|
849854
|
-
var
|
|
849854
|
+
var VALID_SCOPES2 = ["session", "project", "team"];
|
|
849855
849855
|
var VALID_REVIEW_STATES = ["fresh", "reviewed", "stale", "contradicted"];
|
|
849856
849856
|
function isValidClass(s4) {
|
|
849857
849857
|
return VALID_CLASSES.includes(s4);
|
|
849858
849858
|
}
|
|
849859
849859
|
function isValidScope(s4) {
|
|
849860
|
-
return
|
|
849860
|
+
return VALID_SCOPES2.includes(s4);
|
|
849861
849861
|
}
|
|
849862
849862
|
function isValidReviewState(s4) {
|
|
849863
849863
|
return VALID_REVIEW_STATES.includes(s4);
|
|
@@ -849900,7 +849900,7 @@ function handleRecallSearch(args2, context) {
|
|
|
849900
849900
|
if (isValidScope(scope))
|
|
849901
849901
|
filter.scope = scope;
|
|
849902
849902
|
else {
|
|
849903
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
849903
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
849904
849904
|
return;
|
|
849905
849905
|
}
|
|
849906
849906
|
}
|
|
@@ -850075,7 +850075,7 @@ function handleRecallList(args2, context) {
|
|
|
850075
850075
|
if (scopeIdx !== -1 && args2[scopeIdx + 1]) {
|
|
850076
850076
|
const scope = args2[scopeIdx + 1];
|
|
850077
850077
|
if (!isValidScope(scope)) {
|
|
850078
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
850078
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
850079
850079
|
return;
|
|
850080
850080
|
}
|
|
850081
850081
|
filter.scope = scope;
|
|
@@ -850125,7 +850125,7 @@ async function handleRecallAdd(args2, context) {
|
|
|
850125
850125
|
const tags = tagsRaw ? tagsRaw.split(",").map((token) => token.trim()).filter(Boolean) : [];
|
|
850126
850126
|
const scope = scopeRaw && isValidScope(scopeRaw) ? scopeRaw : "project";
|
|
850127
850127
|
if (scopeRaw && !isValidScope(scopeRaw)) {
|
|
850128
|
-
context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${
|
|
850128
|
+
context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
850129
850129
|
return;
|
|
850130
850130
|
}
|
|
850131
850131
|
const provenance = [];
|
|
@@ -850259,7 +850259,7 @@ function handleRecallExport(args2, context) {
|
|
|
850259
850259
|
if (scopeIdx !== -1 && commandArgs[scopeIdx + 1]) {
|
|
850260
850260
|
const scope = commandArgs[scopeIdx + 1];
|
|
850261
850261
|
if (!isValidScope(scope)) {
|
|
850262
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
850262
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
850263
850263
|
return;
|
|
850264
850264
|
}
|
|
850265
850265
|
filter.scope = scope;
|
|
@@ -850338,7 +850338,7 @@ function handleRecallHandoffExport(args2, context) {
|
|
|
850338
850338
|
const scopeIdx = commandArgs.indexOf("--scope");
|
|
850339
850339
|
const scopeRaw = scopeIdx !== -1 ? commandArgs[scopeIdx + 1] : "team";
|
|
850340
850340
|
if (!scopeRaw || !isValidScope(scopeRaw)) {
|
|
850341
|
-
context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${
|
|
850341
|
+
context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
850342
850342
|
return;
|
|
850343
850343
|
}
|
|
850344
850344
|
const bundle = memory.exportBundle({ scope: scopeRaw });
|
|
@@ -850454,7 +850454,7 @@ function handleRecallPromote(args2, context) {
|
|
|
850454
850454
|
const id = parsed.rest[0];
|
|
850455
850455
|
const scope = parsed.rest[1];
|
|
850456
850456
|
if (!id || !scope || !isValidScope(scope)) {
|
|
850457
|
-
context.print(`[memory] Usage: /memory promote <id> <${
|
|
850457
|
+
context.print(`[memory] Usage: /memory promote <id> <${VALID_SCOPES2.join("|")}> --yes`);
|
|
850458
850458
|
return;
|
|
850459
850459
|
}
|
|
850460
850460
|
if (!parsed.yes) {
|
|
@@ -863720,8 +863720,9 @@ function deriveStep1CapabilityFlags(snapshot) {
|
|
|
863720
863720
|
import { existsSync as existsSync77, mkdirSync as mkdirSync63, readFileSync as readFileSync85, writeFileSync as writeFileSync54 } from "fs";
|
|
863721
863721
|
import { dirname as dirname60 } from "path";
|
|
863722
863722
|
var ONBOARDING_CHECK_MARKER_FILE = "onboarding-checked.json";
|
|
863723
|
-
|
|
863724
|
-
|
|
863723
|
+
var ONBOARDING_COMPLETION_MARKER_FILE = "onboarding-complete.json";
|
|
863724
|
+
function resolveMarkerPath(shellPaths, scope, fileName = ONBOARDING_CHECK_MARKER_FILE) {
|
|
863725
|
+
return scope === "project" ? shellPaths.resolveProjectPath(GOODVIBES_AGENT_SURFACE_ROOT, fileName) : shellPaths.resolveUserPath(GOODVIBES_AGENT_SURFACE_ROOT, fileName);
|
|
863725
863726
|
}
|
|
863726
863727
|
function isObject6(value) {
|
|
863727
863728
|
return typeof value === "object" && value !== null;
|
|
@@ -863759,8 +863760,8 @@ function pickEffectiveMarker(user) {
|
|
|
863759
863760
|
function getOnboardingCheckMarkerPath(shellPaths, scope = "user") {
|
|
863760
863761
|
return resolveMarkerPath(shellPaths, scope);
|
|
863761
863762
|
}
|
|
863762
|
-
function
|
|
863763
|
-
const path7 = resolveMarkerPath(shellPaths, scope);
|
|
863763
|
+
function readOnboardingMarker(shellPaths, scope, fileName) {
|
|
863764
|
+
const path7 = resolveMarkerPath(shellPaths, scope, fileName);
|
|
863764
863765
|
if (!existsSync77(path7))
|
|
863765
863766
|
return buildMissingMarkerState(scope, path7);
|
|
863766
863767
|
try {
|
|
@@ -863779,6 +863780,12 @@ function readOnboardingCheckMarker(shellPaths, scope = "user") {
|
|
|
863779
863780
|
return buildParseErrorState(scope, path7, parseError);
|
|
863780
863781
|
}
|
|
863781
863782
|
}
|
|
863783
|
+
function readOnboardingCheckMarker(shellPaths, scope = "user") {
|
|
863784
|
+
return readOnboardingMarker(shellPaths, scope, ONBOARDING_CHECK_MARKER_FILE);
|
|
863785
|
+
}
|
|
863786
|
+
function readOnboardingCompletionMarker(shellPaths, scope = "user") {
|
|
863787
|
+
return readOnboardingMarker(shellPaths, scope, ONBOARDING_COMPLETION_MARKER_FILE);
|
|
863788
|
+
}
|
|
863782
863789
|
function readOnboardingCheckMarkers(shellPaths) {
|
|
863783
863790
|
const user = readOnboardingCheckMarker(shellPaths, "user");
|
|
863784
863791
|
const project = readOnboardingCheckMarker(shellPaths, "project");
|
|
@@ -863788,9 +863795,9 @@ function readOnboardingCheckMarkers(shellPaths) {
|
|
|
863788
863795
|
effective: pickEffectiveMarker(user)
|
|
863789
863796
|
};
|
|
863790
863797
|
}
|
|
863791
|
-
function
|
|
863798
|
+
function writeOnboardingMarker(shellPaths, options, fileName) {
|
|
863792
863799
|
const scope = options.scope ?? "user";
|
|
863793
|
-
const path7 = resolveMarkerPath(shellPaths, scope);
|
|
863800
|
+
const path7 = resolveMarkerPath(shellPaths, scope, fileName);
|
|
863794
863801
|
const checkedAt = options.checkedAt ?? Date.now();
|
|
863795
863802
|
const payload = {
|
|
863796
863803
|
version: 1,
|
|
@@ -863803,7 +863810,13 @@ function writeOnboardingCheckMarker(shellPaths, options = {}) {
|
|
|
863803
863810
|
mkdirSync63(dirname60(path7), { recursive: true });
|
|
863804
863811
|
writeFileSync54(path7, `${JSON.stringify(payload, null, 2)}
|
|
863805
863812
|
`, "utf-8");
|
|
863806
|
-
return
|
|
863813
|
+
return readOnboardingMarker(shellPaths, scope, fileName);
|
|
863814
|
+
}
|
|
863815
|
+
function writeOnboardingCheckMarker(shellPaths, options = {}) {
|
|
863816
|
+
return writeOnboardingMarker(shellPaths, options, ONBOARDING_CHECK_MARKER_FILE);
|
|
863817
|
+
}
|
|
863818
|
+
function writeOnboardingCompletionMarker(shellPaths, options = {}) {
|
|
863819
|
+
return writeOnboardingMarker(shellPaths, options, ONBOARDING_COMPLETION_MARKER_FILE);
|
|
863807
863820
|
}
|
|
863808
863821
|
// src/cli/help.ts
|
|
863809
863822
|
import { existsSync as existsSync78, readFileSync as readFileSync86 } from "fs";
|
|
@@ -866578,7 +866591,7 @@ import { mkdirSync as mkdirSync66, readFileSync as readFileSync88, writeFileSync
|
|
|
866578
866591
|
import { dirname as dirname64, resolve as resolve39 } from "path";
|
|
866579
866592
|
init_state3();
|
|
866580
866593
|
var VALID_CLASSES2 = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
|
|
866581
|
-
var
|
|
866594
|
+
var VALID_SCOPES4 = ["session", "project", "team"];
|
|
866582
866595
|
var VALID_REVIEW_STATES3 = ["fresh", "reviewed", "stale", "contradicted"];
|
|
866583
866596
|
var VALID_PROVENANCE_KINDS = ["session", "turn", "task", "event", "file"];
|
|
866584
866597
|
var VALUE_OPTIONS = new Set([
|
|
@@ -866678,7 +866691,7 @@ function isMemoryClass2(value) {
|
|
|
866678
866691
|
return VALID_CLASSES2.includes(value);
|
|
866679
866692
|
}
|
|
866680
866693
|
function isMemoryScope2(value) {
|
|
866681
|
-
return
|
|
866694
|
+
return VALID_SCOPES4.includes(value);
|
|
866682
866695
|
}
|
|
866683
866696
|
function isReviewState(value) {
|
|
866684
866697
|
return VALID_REVIEW_STATES3.includes(value);
|
|
@@ -866693,7 +866706,7 @@ function requireClass(value) {
|
|
|
866693
866706
|
}
|
|
866694
866707
|
function requireScope(value) {
|
|
866695
866708
|
if (!value || !isMemoryScope2(value))
|
|
866696
|
-
throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${
|
|
866709
|
+
throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${VALID_SCOPES4.join(", ")}`);
|
|
866697
866710
|
return value;
|
|
866698
866711
|
}
|
|
866699
866712
|
function optionalScope(value) {
|
|
@@ -895939,12 +895952,14 @@ class AgentWorkspace {
|
|
|
895939
895952
|
return;
|
|
895940
895953
|
}
|
|
895941
895954
|
try {
|
|
895942
|
-
|
|
895955
|
+
const marker = {
|
|
895943
895956
|
scope: "user",
|
|
895944
895957
|
source: "wizard",
|
|
895945
895958
|
mode: "new",
|
|
895946
895959
|
workspaceRoot: shellPaths3.workingDirectory
|
|
895947
|
-
}
|
|
895960
|
+
};
|
|
895961
|
+
writeOnboardingCheckMarker(shellPaths3, marker);
|
|
895962
|
+
writeOnboardingCompletionMarker(shellPaths3, marker);
|
|
895948
895963
|
this.status = "Onboarding applied and closed.";
|
|
895949
895964
|
this.lastActionResult = {
|
|
895950
895965
|
kind: "refreshed",
|
|
@@ -903889,7 +903904,7 @@ function getInteractiveTerminalLaunchError(input) {
|
|
|
903889
903904
|
}
|
|
903890
903905
|
function applyInitialTuiCliState(options) {
|
|
903891
903906
|
const { cli, input, commandRegistry, commandContext, shellPaths: shellPaths3, render } = options;
|
|
903892
|
-
const
|
|
903907
|
+
const onboardingCompletionMarker = readOnboardingCompletionMarker(shellPaths3, "user");
|
|
903893
903908
|
const seededPrompt = cli.flags.prompt ?? (cli.rawCommand === undefined && cli.positionals.length > 0 ? cli.positionals.join(" ") : undefined);
|
|
903894
903909
|
if (cli.command === "onboarding") {
|
|
903895
903910
|
input.openAgentWorkspace(commandContext);
|
|
@@ -903898,8 +903913,8 @@ function applyInitialTuiCliState(options) {
|
|
|
903898
903913
|
if (target) {
|
|
903899
903914
|
commandRegistry.execute("session", ["resume", target], commandContext).then(() => render());
|
|
903900
903915
|
}
|
|
903901
|
-
} else if (!
|
|
903902
|
-
input.openAgentWorkspace(commandContext);
|
|
903916
|
+
} else if (!onboardingCompletionMarker.payload) {
|
|
903917
|
+
input.openAgentWorkspace(commandContext, "setup");
|
|
903903
903918
|
}
|
|
903904
903919
|
if (seededPrompt) {
|
|
903905
903920
|
input.prompt = seededPrompt;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-agent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "GoodVibes personal operator assistant TUI with a proactive Agent product brain, isolated Agent Knowledge, local profiles, routines, skills, personas, and explicit build delegation.",
|
|
6
6
|
"type": "module",
|
package/src/cli/tui-startup.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CommandContext, CommandRegistry } from '../input/command-registry.ts';
|
|
2
2
|
import type { InputHandler } from '../input/handler.ts';
|
|
3
|
-
import {
|
|
3
|
+
import { readOnboardingCompletionMarker } from '../runtime/onboarding/index.ts';
|
|
4
4
|
import type { GoodVibesCliParseResult } from './types.ts';
|
|
5
5
|
|
|
6
6
|
export type InteractiveTerminalCheckInput = {
|
|
@@ -95,11 +95,11 @@ export function applyInitialTuiCliState(options: {
|
|
|
95
95
|
readonly input: InputHandler;
|
|
96
96
|
readonly commandRegistry: CommandRegistry;
|
|
97
97
|
readonly commandContext: CommandContext;
|
|
98
|
-
readonly shellPaths: Parameters<typeof
|
|
98
|
+
readonly shellPaths: Parameters<typeof readOnboardingCompletionMarker>[0];
|
|
99
99
|
readonly render: () => void;
|
|
100
100
|
}): void {
|
|
101
101
|
const { cli, input, commandRegistry, commandContext, shellPaths, render } = options;
|
|
102
|
-
const
|
|
102
|
+
const onboardingCompletionMarker = readOnboardingCompletionMarker(shellPaths, 'user');
|
|
103
103
|
const seededPrompt = cli.flags.prompt ?? (cli.rawCommand === undefined && cli.positionals.length > 0 ? cli.positionals.join(' ') : undefined);
|
|
104
104
|
if (cli.command === 'onboarding') {
|
|
105
105
|
input.openAgentWorkspace(commandContext);
|
|
@@ -108,8 +108,8 @@ export function applyInitialTuiCliState(options: {
|
|
|
108
108
|
if (target) {
|
|
109
109
|
void commandRegistry.execute('session', ['resume', target], commandContext).then(() => render());
|
|
110
110
|
}
|
|
111
|
-
} else if (!
|
|
112
|
-
input.openAgentWorkspace(commandContext);
|
|
111
|
+
} else if (!onboardingCompletionMarker.payload) {
|
|
112
|
+
input.openAgentWorkspace(commandContext, 'setup');
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
if (seededPrompt) {
|
|
@@ -20,7 +20,7 @@ import { buildAgentWorkspaceRequirements } from './agent-workspace-requirements.
|
|
|
20
20
|
import { appendAgentWorkspaceActionSearchText, backspaceAgentWorkspaceActionSearch, beginAgentWorkspaceActionSearch, clearAgentWorkspaceActionSearch, commitAgentWorkspaceActionSearchSelection, searchAgentWorkspaceActions } from './agent-workspace-search.ts';
|
|
21
21
|
import { buildAgentWorkspaceRuntimeSnapshot } from './agent-workspace-snapshot.ts';
|
|
22
22
|
import type { AgentWorkspaceAction, AgentWorkspaceActionResult, AgentWorkspaceActionSearchResult, AgentWorkspaceCategory, AgentWorkspaceCommandDispatcher, AgentWorkspaceEditorField, AgentWorkspaceFocusPane, AgentWorkspaceLocalEditor, AgentWorkspaceLocalEditorKind, AgentWorkspaceLocalLibraryItem, AgentWorkspaceLocalOperation, AgentWorkspacePromptDispatcher, AgentWorkspaceRuntimeSnapshot } from './agent-workspace-types.ts';
|
|
23
|
-
import { writeOnboardingCheckMarker } from '../runtime/onboarding/index.ts';
|
|
23
|
+
import { writeOnboardingCheckMarker, writeOnboardingCompletionMarker } from '../runtime/onboarding/index.ts';
|
|
24
24
|
|
|
25
25
|
export type { AgentWorkspaceChannelRisk, AgentWorkspaceChannelStatus } from './agent-workspace-channels.ts';
|
|
26
26
|
export type { AgentWorkspaceAction, AgentWorkspaceActionResult, AgentWorkspaceActionSearchResult, AgentWorkspaceCategory, AgentWorkspaceCategoryId, AgentWorkspaceCommandDispatcher, AgentWorkspaceEditorField, AgentWorkspaceFocusPane, AgentWorkspaceLocalEditor, AgentWorkspaceLocalEditorKind, AgentWorkspaceLocalLibraryItem, AgentWorkspaceLocalOperation, AgentWorkspacePromptDispatcher, AgentWorkspaceRuntimeSnapshot } from './agent-workspace-types.ts';
|
|
@@ -321,12 +321,14 @@ export class AgentWorkspace {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
try {
|
|
324
|
-
|
|
324
|
+
const marker = {
|
|
325
325
|
scope: 'user',
|
|
326
326
|
source: 'wizard',
|
|
327
327
|
mode: 'new',
|
|
328
328
|
workspaceRoot: shellPaths.workingDirectory,
|
|
329
|
-
}
|
|
329
|
+
} as const;
|
|
330
|
+
writeOnboardingCheckMarker(shellPaths, marker);
|
|
331
|
+
writeOnboardingCompletionMarker(shellPaths, marker);
|
|
330
332
|
this.status = 'Onboarding applied and closed.';
|
|
331
333
|
this.lastActionResult = {
|
|
332
334
|
kind: 'refreshed',
|
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
import { GOODVIBES_AGENT_SURFACE_ROOT } from '../../config/surface.ts';
|
|
12
12
|
|
|
13
13
|
const ONBOARDING_CHECK_MARKER_FILE = 'onboarding-checked.json';
|
|
14
|
+
const ONBOARDING_COMPLETION_MARKER_FILE = 'onboarding-complete.json';
|
|
14
15
|
|
|
15
16
|
type OnboardingShellPaths = Pick<
|
|
16
17
|
ShellPathService,
|
|
@@ -20,10 +21,11 @@ type OnboardingShellPaths = Pick<
|
|
|
20
21
|
function resolveMarkerPath(
|
|
21
22
|
shellPaths: OnboardingShellPaths,
|
|
22
23
|
scope: OnboardingStateScope,
|
|
24
|
+
fileName = ONBOARDING_CHECK_MARKER_FILE,
|
|
23
25
|
): string {
|
|
24
26
|
return scope === 'project'
|
|
25
|
-
? shellPaths.resolveProjectPath(GOODVIBES_AGENT_SURFACE_ROOT,
|
|
26
|
-
: shellPaths.resolveUserPath(GOODVIBES_AGENT_SURFACE_ROOT,
|
|
27
|
+
? shellPaths.resolveProjectPath(GOODVIBES_AGENT_SURFACE_ROOT, fileName)
|
|
28
|
+
: shellPaths.resolveUserPath(GOODVIBES_AGENT_SURFACE_ROOT, fileName);
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
function isObject(value: unknown): value is Record<string, unknown> {
|
|
@@ -87,11 +89,12 @@ export function getOnboardingCheckMarkerPath(
|
|
|
87
89
|
return resolveMarkerPath(shellPaths, scope);
|
|
88
90
|
}
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
function readOnboardingMarker(
|
|
91
93
|
shellPaths: OnboardingShellPaths,
|
|
92
|
-
scope: OnboardingStateScope
|
|
94
|
+
scope: OnboardingStateScope,
|
|
95
|
+
fileName: string,
|
|
93
96
|
): OnboardingCheckMarkerState {
|
|
94
|
-
const path = resolveMarkerPath(shellPaths, scope);
|
|
97
|
+
const path = resolveMarkerPath(shellPaths, scope, fileName);
|
|
95
98
|
if (!existsSync(path)) return buildMissingMarkerState(scope, path);
|
|
96
99
|
|
|
97
100
|
try {
|
|
@@ -112,6 +115,27 @@ export function readOnboardingCheckMarker(
|
|
|
112
115
|
}
|
|
113
116
|
}
|
|
114
117
|
|
|
118
|
+
export function readOnboardingCheckMarker(
|
|
119
|
+
shellPaths: OnboardingShellPaths,
|
|
120
|
+
scope: OnboardingStateScope = 'user',
|
|
121
|
+
): OnboardingCheckMarkerState {
|
|
122
|
+
return readOnboardingMarker(shellPaths, scope, ONBOARDING_CHECK_MARKER_FILE);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function getOnboardingCompletionMarkerPath(
|
|
126
|
+
shellPaths: OnboardingShellPaths,
|
|
127
|
+
scope: OnboardingStateScope = 'user',
|
|
128
|
+
): string {
|
|
129
|
+
return resolveMarkerPath(shellPaths, scope, ONBOARDING_COMPLETION_MARKER_FILE);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function readOnboardingCompletionMarker(
|
|
133
|
+
shellPaths: OnboardingShellPaths,
|
|
134
|
+
scope: OnboardingStateScope = 'user',
|
|
135
|
+
): OnboardingCheckMarkerState {
|
|
136
|
+
return readOnboardingMarker(shellPaths, scope, ONBOARDING_COMPLETION_MARKER_FILE);
|
|
137
|
+
}
|
|
138
|
+
|
|
115
139
|
export function readOnboardingCheckMarkers(
|
|
116
140
|
shellPaths: OnboardingShellPaths,
|
|
117
141
|
): OnboardingCheckMarkersState {
|
|
@@ -125,12 +149,13 @@ export function readOnboardingCheckMarkers(
|
|
|
125
149
|
};
|
|
126
150
|
}
|
|
127
151
|
|
|
128
|
-
|
|
152
|
+
function writeOnboardingMarker(
|
|
129
153
|
shellPaths: OnboardingShellPaths,
|
|
130
|
-
options: WriteOnboardingCheckMarkerOptions
|
|
154
|
+
options: WriteOnboardingCheckMarkerOptions,
|
|
155
|
+
fileName: string,
|
|
131
156
|
): OnboardingCheckMarkerState {
|
|
132
157
|
const scope = options.scope ?? 'user';
|
|
133
|
-
const path = resolveMarkerPath(shellPaths, scope);
|
|
158
|
+
const path = resolveMarkerPath(shellPaths, scope, fileName);
|
|
134
159
|
const checkedAt = options.checkedAt ?? Date.now();
|
|
135
160
|
const payload: OnboardingCheckMarkerPayload = {
|
|
136
161
|
version: 1,
|
|
@@ -144,5 +169,19 @@ export function writeOnboardingCheckMarker(
|
|
|
144
169
|
mkdirSync(dirname(path), { recursive: true });
|
|
145
170
|
writeFileSync(path, `${JSON.stringify(payload, null, 2)}\n`, 'utf-8');
|
|
146
171
|
|
|
147
|
-
return
|
|
172
|
+
return readOnboardingMarker(shellPaths, scope, fileName);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export function writeOnboardingCheckMarker(
|
|
176
|
+
shellPaths: OnboardingShellPaths,
|
|
177
|
+
options: WriteOnboardingCheckMarkerOptions = {},
|
|
178
|
+
): OnboardingCheckMarkerState {
|
|
179
|
+
return writeOnboardingMarker(shellPaths, options, ONBOARDING_CHECK_MARKER_FILE);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function writeOnboardingCompletionMarker(
|
|
183
|
+
shellPaths: OnboardingShellPaths,
|
|
184
|
+
options: WriteOnboardingCheckMarkerOptions = {},
|
|
185
|
+
): OnboardingCheckMarkerState {
|
|
186
|
+
return writeOnboardingMarker(shellPaths, options, ONBOARDING_COMPLETION_MARKER_FILE);
|
|
148
187
|
}
|
package/src/version.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
// The prebuild script updates the fallback value before compilation.
|
|
7
7
|
// Uses import.meta.dir (Bun) to locate package.json relative to this file,
|
|
8
8
|
// which is correct regardless of the process working directory.
|
|
9
|
-
let _version = '1.1.
|
|
9
|
+
let _version = '1.1.1';
|
|
10
10
|
try {
|
|
11
11
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8')) as {
|
|
12
12
|
readonly version?: unknown;
|