@intent-systems/nexus 2026.1.5-3 → 2026.1.5-5
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/agents/agent-id.js +41 -0
- package/dist/agents/auth-profiles.js +114 -25
- package/dist/agents/identity-state.js +79 -0
- package/dist/agents/model-auth.js +1 -0
- package/dist/agents/model-fallback.js +15 -9
- package/dist/agents/model-selection.js +1 -1
- package/dist/agents/models-config.js +17 -11
- package/dist/agents/pi-embedded-runner.js +101 -9
- package/dist/agents/sandbox.js +12 -3
- package/dist/agents/skill-runner.js +29 -4
- package/dist/agents/skill-usage.js +114 -11
- package/dist/agents/skills-status.js +4 -4
- package/dist/agents/skills.js +18 -7
- package/dist/agents/subagent-registry.js +25 -11
- package/dist/agents/system-prompt.js +16 -0
- package/dist/agents/tool-policy.js +19 -3
- package/dist/agents/tools/browser-tool.js +5 -2
- package/dist/agents/tools/image-tool.js +93 -8
- package/dist/agents/tools/sessions-announce-target.js +5 -1
- package/dist/agents/workspace.js +55 -46
- package/dist/auto-reply/command-detection.js +2 -1
- package/dist/auto-reply/reply/directive-handling.js +153 -28
- package/dist/auto-reply/reply/directives.js +17 -2
- package/dist/auto-reply/reply/model-selection.js +8 -3
- package/dist/auto-reply/reply/queue.js +2 -2
- package/dist/auto-reply/reply.js +1 -1
- package/dist/auto-reply/thinking.js +15 -0
- package/dist/browser/chrome.js +1 -1
- package/dist/browser/client.js +2 -0
- package/dist/browser/config.js +6 -2
- package/dist/browser/pw-tools-core.js +3 -0
- package/dist/browser/routes/agent.js +14 -0
- package/dist/canvas-host/server.js +1 -1
- package/dist/capabilities/detector.js +245 -0
- package/dist/capabilities/registry.js +99 -0
- package/dist/channels/location.js +44 -0
- package/dist/channels/web/index.js +2 -0
- package/dist/cli/cloud-cli.js +12 -7
- package/dist/cli/credential-cli.js +139 -17
- package/dist/cli/gateway-cli.js +1 -1
- package/dist/cli/log-cli.js +25 -0
- package/dist/cli/pairing-cli.js +1 -1
- package/dist/cli/program.js +58 -6
- package/dist/cli/run-main.js +1 -1
- package/dist/cli/skills-cli.js +144 -21
- package/dist/cli/skills-hub-cli.js +59 -29
- package/dist/cli/tool-connector-cli.js +99 -24
- package/dist/cli/upstream-sync-cli.js +253 -96
- package/dist/cli/usage-cli.js +14 -0
- package/dist/commands/auth-choice-options.js +6 -1
- package/dist/commands/auth-choice.js +157 -5
- package/dist/commands/bootstrap-preset.js +10 -6
- package/dist/commands/capabilities.js +33 -6
- package/dist/commands/claude-md.js +3 -2
- package/dist/commands/config-view.js +1 -1
- package/dist/commands/configure.js +4 -4
- package/dist/commands/credential.js +497 -36
- package/dist/commands/cursor-rules.js +39 -19
- package/dist/commands/doctor.js +5 -4
- package/dist/commands/identity.js +28 -31
- package/dist/commands/init.js +15 -18
- package/dist/commands/log.js +134 -0
- package/dist/commands/models/fallbacks.js +1 -1
- package/dist/commands/models/image-fallbacks.js +1 -1
- package/dist/commands/models/list.js +1 -1
- package/dist/commands/models/scan.js +1 -1
- package/dist/commands/onboard-auth.js +27 -2
- package/dist/commands/onboard-eve-identity.js +7 -8
- package/dist/commands/onboard-non-interactive.js +4 -2
- package/dist/commands/onboard-quickstart.js +18 -11
- package/dist/commands/quest-state.js +271 -0
- package/dist/commands/quest.js +53 -13
- package/dist/commands/reset.js +1 -1
- package/dist/commands/sessions-ingest.js +5 -4
- package/dist/commands/setup.js +4 -2
- package/dist/commands/skills-manifest.js +2 -2
- package/dist/commands/status.js +179 -61
- package/dist/commands/suggestions.js +1 -1
- package/dist/commands/usage-tracking.js +32 -0
- package/dist/commands/usage-upload.js +6 -1
- package/dist/config/defaults.js +1 -3
- package/dist/config/includes.js +5 -7
- package/dist/config/io.js +88 -16
- package/dist/config/legacy.js +4 -2
- package/dist/config/paths.js +16 -0
- package/dist/config/sessions.js +9 -5
- package/dist/config/zod-schema.js +4 -3
- package/dist/control-plane/broker/broker.js +1022 -0
- package/dist/control-plane/compaction.js +282 -0
- package/dist/control-plane/factory.js +31 -0
- package/dist/control-plane/index.js +10 -0
- package/dist/control-plane/odu/agents.js +192 -0
- package/dist/control-plane/odu/interaction-tools.js +208 -0
- package/dist/control-plane/odu/prompt-loader.js +95 -0
- package/dist/control-plane/odu/runtime.js +479 -0
- package/dist/control-plane/odu/types.js +6 -0
- package/dist/control-plane/odu-control-plane.js +316 -0
- package/dist/control-plane/single-agent.js +249 -0
- package/dist/control-plane/types.js +11 -0
- package/dist/credentials/store.js +449 -0
- package/dist/gateway/server-browser.js +5 -4
- package/dist/gateway/server-methods/cron.js +11 -1
- package/dist/gateway/server.js +14 -7
- package/dist/infra/bonjour.js +1 -1
- package/dist/infra/event-log.js +8 -2
- package/dist/infra/path-env.js +1 -2
- package/dist/infra/provider-usage.auth.js +5 -3
- package/dist/infra/provider-usage.fetch.claude.js +16 -6
- package/dist/infra/provider-usage.fetch.minimax.js +8 -3
- package/dist/infra/provider-usage.js +9 -5
- package/dist/infra/restart.js +2 -2
- package/dist/infra/usage-settings.js +78 -0
- package/dist/infra/usage-suggestions.js +17 -5
- package/dist/infra/usage-upload.js +38 -1
- package/dist/infra/voicewake.js +2 -2
- package/dist/logging/redact.js +109 -0
- package/dist/markdown/fences.js +58 -0
- package/dist/media/image-ops.js +3 -1
- package/dist/memory/embeddings.js +146 -0
- package/dist/memory/index.js +3 -0
- package/dist/memory/internal.js +163 -0
- package/dist/pairing/pairing-store.js +218 -0
- package/dist/plugins/cli.js +42 -0
- package/dist/plugins/discovery.js +253 -0
- package/dist/plugins/install.js +181 -0
- package/dist/plugins/loader.js +290 -0
- package/dist/plugins/registry.js +105 -0
- package/dist/plugins/status.js +29 -0
- package/dist/plugins/tools.js +39 -0
- package/dist/plugins/types.js +1 -0
- package/dist/providers/github-copilot-auth.js +1 -1
- package/dist/routing/resolve-route.js +144 -0
- package/dist/routing/session-key.js +65 -0
- package/dist/sessions/send-policy.js +5 -5
- package/dist/slack/monitor.js +22 -1
- package/dist/telegram/reaction-level.js +2 -1
- package/dist/utils/provider-utils.js +28 -0
- package/dist/utils.js +4 -3
- package/dist/wizard/onboarding.js +29 -7
- package/package.json +4 -29
- package/patches/@mariozechner__pi-ai.patch +215 -0
- package/patches/playwright-core@1.57.0.patch +13 -0
- package/patches/qrcode-terminal.patch +12 -0
- package/scripts/postinstall.js +202 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { DEFAULT_AGENT_WORKSPACE_DIR } from "../agents/workspace.js";
|
|
4
|
+
import { loadConfig } from "../config/config.js";
|
|
5
|
+
import { resolveUserPath } from "../utils.js";
|
|
6
|
+
const QUEST_CATALOG = [
|
|
7
|
+
{
|
|
8
|
+
id: "identity-setup",
|
|
9
|
+
title: "Identity setup",
|
|
10
|
+
description: "Create the agent + user identity files.",
|
|
11
|
+
path: "core",
|
|
12
|
+
weight: 10,
|
|
13
|
+
quickWin: true,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "filesystem-wow",
|
|
17
|
+
title: "Filesystem organization",
|
|
18
|
+
description: "Use home/ projects + memory for a quick win.",
|
|
19
|
+
path: "core",
|
|
20
|
+
weight: 5,
|
|
21
|
+
quickWin: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "credential-manager",
|
|
25
|
+
title: "Credential manager",
|
|
26
|
+
description: "Store your first credentials for secure access.",
|
|
27
|
+
path: "core",
|
|
28
|
+
weight: 15,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "cloud-backup",
|
|
32
|
+
title: "Cloud backup",
|
|
33
|
+
description: "Set up Nexus Cloud sync + rollback.",
|
|
34
|
+
path: "core",
|
|
35
|
+
weight: 10,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "connect-email",
|
|
39
|
+
title: "Connect email",
|
|
40
|
+
description: "Unlock email read/send capabilities.",
|
|
41
|
+
path: "breadth",
|
|
42
|
+
weight: 10,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "connect-messages",
|
|
46
|
+
title: "Connect messages",
|
|
47
|
+
description: "Unlock messaging read/send capabilities.",
|
|
48
|
+
path: "breadth",
|
|
49
|
+
weight: 10,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "connect-calendar",
|
|
53
|
+
title: "Connect calendar",
|
|
54
|
+
description: "Unlock calendar access.",
|
|
55
|
+
path: "breadth",
|
|
56
|
+
weight: 5,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "enable-llm",
|
|
60
|
+
title: "Enable LLM",
|
|
61
|
+
description: "Configure an LLM provider.",
|
|
62
|
+
path: "breadth",
|
|
63
|
+
weight: 5,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "enable-scheduling",
|
|
67
|
+
title: "Enable scheduling",
|
|
68
|
+
description: "Turn on scheduling automation.",
|
|
69
|
+
path: "power",
|
|
70
|
+
weight: 10,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "enable-agent-comms",
|
|
74
|
+
title: "Enable agent comms",
|
|
75
|
+
description: "Let your agent reach you outside the IDE.",
|
|
76
|
+
path: "power",
|
|
77
|
+
weight: 15,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "first-automation",
|
|
81
|
+
title: "First automation",
|
|
82
|
+
description: "Set up a reactive trigger.",
|
|
83
|
+
path: "power",
|
|
84
|
+
weight: 5,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "completionist",
|
|
88
|
+
title: "Completionist",
|
|
89
|
+
description: "Unlock everything in the catalog.",
|
|
90
|
+
path: "secret",
|
|
91
|
+
weight: 5,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "polyglot",
|
|
95
|
+
title: "Polyglot",
|
|
96
|
+
description: "Connect 3+ distinct messaging platforms.",
|
|
97
|
+
path: "secret",
|
|
98
|
+
weight: 5,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "social-butterfly",
|
|
102
|
+
title: "Social butterfly",
|
|
103
|
+
description: "Connect multiple social networks.",
|
|
104
|
+
path: "secret",
|
|
105
|
+
weight: 5,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "home-automation",
|
|
109
|
+
title: "Home automation",
|
|
110
|
+
description: "Activate smart home capabilities.",
|
|
111
|
+
path: "secret",
|
|
112
|
+
weight: 5,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "full-stack",
|
|
116
|
+
title: "Full stack",
|
|
117
|
+
description: "Enable web + automation + dev tooling.",
|
|
118
|
+
path: "secret",
|
|
119
|
+
weight: 5,
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
const QUEST_ORDER = QUEST_CATALOG.map((quest) => quest.id);
|
|
123
|
+
const QUEST_PROGRESS_VERSION = 1;
|
|
124
|
+
const PROGRESS_NOTE = "Progress is computed dynamically; no persistent progress.json.";
|
|
125
|
+
function getCapabilityStatusMap(capabilities) {
|
|
126
|
+
return new Map(capabilities.map((cap) => [cap.id, cap.status]));
|
|
127
|
+
}
|
|
128
|
+
function isCapabilityReady(status) {
|
|
129
|
+
return status === "active" || status === "ready";
|
|
130
|
+
}
|
|
131
|
+
async function dirHasEntries(dir) {
|
|
132
|
+
try {
|
|
133
|
+
const entries = await fs.promises.readdir(dir, { withFileTypes: true });
|
|
134
|
+
return entries.some((entry) => entry.name && !entry.name.startsWith("."));
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function resolveWorkspaceDir() {
|
|
141
|
+
const config = loadConfig();
|
|
142
|
+
return resolveUserPath(config.agent?.workspace ?? DEFAULT_AGENT_WORKSPACE_DIR);
|
|
143
|
+
}
|
|
144
|
+
function computeQuestAutoCompletion(params) {
|
|
145
|
+
const { identityConfigured, capabilities, credentials, workspaceDir } = params;
|
|
146
|
+
const capabilityMap = getCapabilityStatusMap(capabilities);
|
|
147
|
+
const hasCredentials = Object.keys(credentials.services ?? {}).length > 0;
|
|
148
|
+
const anyReady = (ids) => ids.some((id) => isCapabilityReady(capabilityMap.get(id)));
|
|
149
|
+
return (async () => {
|
|
150
|
+
const hasProjects = await dirHasEntries(path.join(workspaceDir, "projects"));
|
|
151
|
+
const hasMemory = await dirHasEntries(path.join(workspaceDir, "memory"));
|
|
152
|
+
const readySocial = anyReady(["social-x", "social-instagram", "social-linkedin"]) ||
|
|
153
|
+
anyReady(["social", "social-news"]);
|
|
154
|
+
const readyMessaging = anyReady(["messaging-read", "messaging-send"]);
|
|
155
|
+
const readyChat = anyReady(["chat-send", "chat-read"]);
|
|
156
|
+
const readySmartHome = anyReady([
|
|
157
|
+
"smart-lights",
|
|
158
|
+
"smart-audio",
|
|
159
|
+
"smart-sleep",
|
|
160
|
+
"bluetooth",
|
|
161
|
+
"camera-control",
|
|
162
|
+
]);
|
|
163
|
+
const readyDev = anyReady(["version-control", "terminal-sessions"]);
|
|
164
|
+
const readyWeb = anyReady(["web-search", "url-fetch"]);
|
|
165
|
+
const readyAutomation = anyReady(["reactive-triggers"]);
|
|
166
|
+
return {
|
|
167
|
+
"identity-setup": identityConfigured,
|
|
168
|
+
"filesystem-wow": hasProjects || hasMemory,
|
|
169
|
+
"credential-manager": hasCredentials,
|
|
170
|
+
"cloud-backup": anyReady(["cloud-sync", "rollback"]),
|
|
171
|
+
"connect-email": anyReady(["email-read", "email-send"]),
|
|
172
|
+
"connect-messages": readyMessaging,
|
|
173
|
+
"connect-calendar": anyReady(["calendar"]),
|
|
174
|
+
"enable-llm": anyReady(["anthropic", "openai", "gemini"]),
|
|
175
|
+
"enable-scheduling": anyReady(["scheduling"]),
|
|
176
|
+
"enable-agent-comms": readyChat || readyMessaging,
|
|
177
|
+
"first-automation": readyAutomation,
|
|
178
|
+
completionist: capabilities.every((cap) => cap.status === "active"),
|
|
179
|
+
polyglot: readyMessaging && readyChat,
|
|
180
|
+
"social-butterfly": readySocial,
|
|
181
|
+
"home-automation": readySmartHome,
|
|
182
|
+
"full-stack": readyWeb && readyAutomation && readyDev,
|
|
183
|
+
};
|
|
184
|
+
})();
|
|
185
|
+
}
|
|
186
|
+
function computePower(quests) {
|
|
187
|
+
const baseQuests = quests.filter((quest) => quest.path !== "secret");
|
|
188
|
+
const bonusQuests = quests.filter((quest) => quest.path === "secret" && quest.status === "completed");
|
|
189
|
+
const baseTotal = baseQuests.reduce((sum, quest) => sum + quest.weight, 0);
|
|
190
|
+
const baseScore = baseQuests.reduce((sum, quest) => sum + (quest.status === "completed" ? quest.weight : 0), 0);
|
|
191
|
+
const bonus = bonusQuests.reduce((sum, quest) => sum + quest.weight, 0);
|
|
192
|
+
const percent = baseTotal > 0 ? Math.round((baseScore / baseTotal) * 100) : 0;
|
|
193
|
+
const nextQuest = baseQuests.find((quest) => quest.status !== "completed");
|
|
194
|
+
return {
|
|
195
|
+
score: baseScore + bonus,
|
|
196
|
+
baseTotal,
|
|
197
|
+
percent: Math.min(100, Math.max(0, percent)),
|
|
198
|
+
bonus,
|
|
199
|
+
nextQuest: nextQuest
|
|
200
|
+
? { id: nextQuest.id, title: nextQuest.title, weight: nextQuest.weight }
|
|
201
|
+
: undefined,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function buildProgressSnapshot(quests, updatedAt) {
|
|
205
|
+
const entries = {};
|
|
206
|
+
for (const quest of quests) {
|
|
207
|
+
entries[quest.id] = {
|
|
208
|
+
status: quest.status,
|
|
209
|
+
completedAt: quest.status === "completed" ? updatedAt : undefined,
|
|
210
|
+
updatedAt,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
version: QUEST_PROGRESS_VERSION,
|
|
215
|
+
updatedAt,
|
|
216
|
+
quests: entries,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function sortQuests(a, b) {
|
|
220
|
+
const aIdx = QUEST_ORDER.indexOf(a.id);
|
|
221
|
+
const bIdx = QUEST_ORDER.indexOf(b.id);
|
|
222
|
+
if (aIdx !== -1 && bIdx !== -1)
|
|
223
|
+
return aIdx - bIdx;
|
|
224
|
+
if (aIdx !== -1)
|
|
225
|
+
return -1;
|
|
226
|
+
if (bIdx !== -1)
|
|
227
|
+
return 1;
|
|
228
|
+
return a.title.localeCompare(b.title);
|
|
229
|
+
}
|
|
230
|
+
export async function resolveQuestState(params) {
|
|
231
|
+
const workspaceDir = params.workspaceDir ?? resolveWorkspaceDir();
|
|
232
|
+
const autoCompletion = await computeQuestAutoCompletion({
|
|
233
|
+
identityConfigured: params.identityConfigured,
|
|
234
|
+
capabilities: params.capabilities,
|
|
235
|
+
credentials: params.credentials,
|
|
236
|
+
workspaceDir,
|
|
237
|
+
});
|
|
238
|
+
const now = new Date().toISOString();
|
|
239
|
+
const quests = QUEST_CATALOG.filter((quest) => params.includeSecrets || quest.path !== "secret").map((quest) => {
|
|
240
|
+
const autoCompleted = Boolean(autoCompletion[quest.id]);
|
|
241
|
+
const status = autoCompleted ? "completed" : "not_started";
|
|
242
|
+
return {
|
|
243
|
+
...quest,
|
|
244
|
+
status,
|
|
245
|
+
autoCompleted,
|
|
246
|
+
};
|
|
247
|
+
});
|
|
248
|
+
quests.sort(sortQuests);
|
|
249
|
+
const power = computePower(quests);
|
|
250
|
+
const progress = buildProgressSnapshot(quests, now);
|
|
251
|
+
progress.note = PROGRESS_NOTE;
|
|
252
|
+
return { quests, progress, power };
|
|
253
|
+
}
|
|
254
|
+
export async function startQuest(questId) {
|
|
255
|
+
const now = new Date().toISOString();
|
|
256
|
+
return {
|
|
257
|
+
version: QUEST_PROGRESS_VERSION,
|
|
258
|
+
updatedAt: now,
|
|
259
|
+
quests: {
|
|
260
|
+
[questId]: {
|
|
261
|
+
status: "in_progress",
|
|
262
|
+
startedAt: now,
|
|
263
|
+
updatedAt: now,
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
note: PROGRESS_NOTE,
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
export function getQuestCatalog() {
|
|
270
|
+
return [...QUEST_CATALOG];
|
|
271
|
+
}
|
package/dist/commands/quest.js
CHANGED
|
@@ -1,27 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveIdentitySnapshot } from "../agents/identity-state.js";
|
|
2
2
|
import { detectCapabilities } from "../capabilities/detector.js";
|
|
3
|
+
import { defaultRuntime } from "../runtime.js";
|
|
4
|
+
import { listCredentials } from "./credential.js";
|
|
5
|
+
import { getQuestCatalog, resolveQuestState, startQuest, } from "./quest-state.js";
|
|
3
6
|
export async function questCommand(opts, runtime = defaultRuntime) {
|
|
7
|
+
if (opts?.start) {
|
|
8
|
+
const catalog = getQuestCatalog();
|
|
9
|
+
if (!catalog.some((quest) => quest.id === opts.start)) {
|
|
10
|
+
runtime.error(`Unknown quest: ${opts.start}`);
|
|
11
|
+
runtime.exit(1);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
await startQuest(opts.start);
|
|
15
|
+
if (!opts.json) {
|
|
16
|
+
runtime.log(`Marked quest as in-progress: ${opts.start}`);
|
|
17
|
+
runtime.log("Note: quest progress is computed dynamically (no progress.json).");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
4
20
|
const snapshot = detectCapabilities();
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
const credentials = await listCredentials();
|
|
22
|
+
const identityResolution = resolveIdentitySnapshot();
|
|
23
|
+
const identityConfigured = identityResolution.ok
|
|
24
|
+
? identityResolution.snapshot.hasIdentity
|
|
25
|
+
: false;
|
|
26
|
+
const questState = await resolveQuestState({
|
|
27
|
+
identityConfigured,
|
|
28
|
+
capabilities: snapshot.capabilities,
|
|
29
|
+
credentials,
|
|
30
|
+
includeSecrets: Boolean(opts?.secrets),
|
|
31
|
+
});
|
|
32
|
+
let quests = questState.quests;
|
|
33
|
+
if (opts?.powerPath) {
|
|
34
|
+
quests = quests.filter((quest) => quest.path === "power");
|
|
35
|
+
}
|
|
36
|
+
if (opts?.quickWins) {
|
|
37
|
+
quests = quests.filter((quest) => quest.quickWin);
|
|
38
|
+
}
|
|
39
|
+
if (!opts?.list && !opts?.progress) {
|
|
40
|
+
quests = quests.filter((quest) => quest.status !== "completed").slice(0, 5);
|
|
41
|
+
}
|
|
13
42
|
if (opts?.json) {
|
|
14
43
|
runtime.log(JSON.stringify({
|
|
15
|
-
|
|
44
|
+
power: questState.power,
|
|
45
|
+
quests,
|
|
46
|
+
progress: questState.progress,
|
|
16
47
|
}, null, 2));
|
|
17
48
|
return;
|
|
18
49
|
}
|
|
19
|
-
if (
|
|
50
|
+
if (opts?.progress) {
|
|
51
|
+
const completed = quests.filter((quest) => quest.status === "completed").length;
|
|
52
|
+
runtime.log(`Quest progress: ${completed}/${quests.length} complete (${questState.power.percent}%)`);
|
|
53
|
+
if (questState.power.nextQuest) {
|
|
54
|
+
runtime.log(`Next unlock: ${questState.power.nextQuest.title} (+${questState.power.nextQuest.weight}%)`);
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (quests.length === 0) {
|
|
20
59
|
runtime.log("No quests found. You're fully configured.");
|
|
21
60
|
return;
|
|
22
61
|
}
|
|
23
62
|
runtime.log("Quests");
|
|
24
|
-
for (const [idx, item] of
|
|
25
|
-
|
|
63
|
+
for (const [idx, item] of quests.entries()) {
|
|
64
|
+
const pathLabel = item.path === "secret" ? "secret" : item.path;
|
|
65
|
+
runtime.log(` ${idx + 1}. ${item.id} (${pathLabel}, ${item.status})`);
|
|
26
66
|
}
|
|
27
67
|
}
|
package/dist/commands/reset.js
CHANGED
|
@@ -7,7 +7,7 @@ import { defaultRuntime } from "../runtime.js";
|
|
|
7
7
|
* Requires --confirm flag to actually delete.
|
|
8
8
|
*/
|
|
9
9
|
export async function resetCommand(opts = {}, runtime = defaultRuntime) {
|
|
10
|
-
const { local = false, state = false, all = false, confirm = false, workspace } = opts;
|
|
10
|
+
const { local = false, state = false, all = false, confirm = false, workspace, } = opts;
|
|
11
11
|
// Validate: at least one target must be specified
|
|
12
12
|
if (!local && !state && !all) {
|
|
13
13
|
throw new Error("Must specify at least one target: --local, --state, or --all");
|
|
@@ -56,7 +56,10 @@ function lexicalToPlainText(raw) {
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
walk(root);
|
|
59
|
-
return out
|
|
59
|
+
return out
|
|
60
|
+
.join("")
|
|
61
|
+
.replace(/\n{3,}/g, "\n\n")
|
|
62
|
+
.trim();
|
|
60
63
|
}
|
|
61
64
|
catch {
|
|
62
65
|
return raw;
|
|
@@ -119,9 +122,7 @@ async function findCursorWorkspaceStorageDir(params) {
|
|
|
119
122
|
return { hash, dir, stateDbPath };
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
|
-
catch {
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
+
catch { }
|
|
125
126
|
}
|
|
126
127
|
return null;
|
|
127
128
|
}
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import JSON5 from "json5";
|
|
4
|
-
import { DEFAULT_AGENT_WORKSPACE_DIR, ensureAgentWorkspace } from "../agents/workspace.js";
|
|
4
|
+
import { DEFAULT_AGENT_WORKSPACE_DIR, ensureAgentWorkspace, } from "../agents/workspace.js";
|
|
5
5
|
import { CONFIG_PATH_NEXUS } from "../config/config.js";
|
|
6
6
|
import { applyModelDefaults } from "../config/defaults.js";
|
|
7
7
|
import { resolveSessionTranscriptsDir } from "../config/sessions.js";
|
|
@@ -21,7 +21,9 @@ async function readConfigFileRaw() {
|
|
|
21
21
|
}
|
|
22
22
|
async function writeConfigFile(cfg) {
|
|
23
23
|
await fs.mkdir(path.dirname(CONFIG_PATH_NEXUS), { recursive: true });
|
|
24
|
-
const json = JSON.stringify(applyModelDefaults(cfg), null, 2)
|
|
24
|
+
const json = JSON.stringify(applyModelDefaults(cfg), null, 2)
|
|
25
|
+
.trimEnd()
|
|
26
|
+
.concat("\n");
|
|
25
27
|
await fs.writeFile(CONFIG_PATH_NEXUS, json, "utf-8");
|
|
26
28
|
}
|
|
27
29
|
export async function setupCommand(opts, runtime = defaultRuntime) {
|
|
@@ -2,7 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import fsp from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import {
|
|
5
|
+
import { MANAGED_SKILLS_DIR } from "../utils.js";
|
|
6
6
|
/**
|
|
7
7
|
* Parse skill frontmatter to extract name and description
|
|
8
8
|
*/
|
|
@@ -178,7 +178,7 @@ export async function generateSkillManifest(skillsDir, userSkillsDir) {
|
|
|
178
178
|
* Get the path to the skills manifest file
|
|
179
179
|
*/
|
|
180
180
|
export function getSkillManifestPath() {
|
|
181
|
-
return path.join(
|
|
181
|
+
return path.join(MANAGED_SKILLS_DIR, "manifest.json");
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
184
|
* Write the skill manifest to disk
|