@sonnechasser/ntrp 1.3.8 → 1.3.9
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/index.js +2009 -1826
- package/dist/mcp/server.js +37 -13
- package/package.json +1 -1
package/dist/mcp/server.js
CHANGED
|
@@ -10453,11 +10453,11 @@ Cross-provider IDs are rejected. Type \`/provider\` first to switch.`
|
|
|
10453
10453
|
name: activate
|
|
10454
10454
|
description: Enter a license key
|
|
10455
10455
|
section: Settings
|
|
10456
|
-
args:
|
|
10456
|
+
args: [license]
|
|
10457
10457
|
handler: ../commands/activate.ts
|
|
10458
10458
|
---
|
|
10459
10459
|
|
|
10460
|
-
Activate NTRP with the key from your purchase email. Most commands need a valid license.`
|
|
10460
|
+
Activate NTRP with the key from your purchase email. Type \`/activate\` with no key to paste. Most commands need a valid license.`
|
|
10461
10461
|
},
|
|
10462
10462
|
{
|
|
10463
10463
|
name: "upgrade",
|
|
@@ -13501,7 +13501,7 @@ var init_activation = __esm({
|
|
|
13501
13501
|
|
|
13502
13502
|
// src/conversation/recommended-action.ts
|
|
13503
13503
|
function resolveRecommendedAction(ctx) {
|
|
13504
|
-
if (!hasValidLicense()) return { submit: "/
|
|
13504
|
+
if (!hasValidLicense()) return { submit: "/activate", hint: "/activate" };
|
|
13505
13505
|
const phase = resolveConversationPhase(ctx);
|
|
13506
13506
|
switch (phase) {
|
|
13507
13507
|
case "explore":
|
|
@@ -13562,6 +13562,9 @@ function consumeOrientEmptyEnterCoach(ctx) {
|
|
|
13562
13562
|
if (resolveConversationPhase(ctx) !== "orient") return null;
|
|
13563
13563
|
if (ctx.orientEmptyEnterSeen) return null;
|
|
13564
13564
|
ctx.orientEmptyEnterSeen = true;
|
|
13565
|
+
if (!hasValidLicense()) {
|
|
13566
|
+
return "Type /activate to paste a key. Type /checkout if you need to sign up.";
|
|
13567
|
+
}
|
|
13565
13568
|
return "Type a question, type use demo data, or type /deepdive. Enter alone does not start a step here.";
|
|
13566
13569
|
}
|
|
13567
13570
|
function formatPhaseLabel(phase) {
|
|
@@ -13622,6 +13625,7 @@ var init_phase = __esm({
|
|
|
13622
13625
|
init_explore_mode();
|
|
13623
13626
|
init_session_state();
|
|
13624
13627
|
init_theme();
|
|
13628
|
+
init_activation();
|
|
13625
13629
|
init_recommended_action();
|
|
13626
13630
|
PROMPT_LABELS = {
|
|
13627
13631
|
orient: "\u203A",
|
|
@@ -22979,9 +22983,11 @@ var inbox_setup_exports = {};
|
|
|
22979
22983
|
__export(inbox_setup_exports, {
|
|
22980
22984
|
maybeOfferInboxOnProduction: () => maybeOfferInboxOnProduction,
|
|
22981
22985
|
offerInboxSkillSetup: () => offerInboxSkillSetup,
|
|
22986
|
+
reuseInboxFolderIfPresent: () => reuseInboxFolderIfPresent,
|
|
22982
22987
|
shouldOfferInboxSkillSetup: () => shouldOfferInboxSkillSetup
|
|
22983
22988
|
});
|
|
22984
22989
|
import chalk25 from "chalk";
|
|
22990
|
+
import { existsSync as existsSync22 } from "fs";
|
|
22985
22991
|
function markDemoOffered() {
|
|
22986
22992
|
setConfigValue("ai-inbox-nudge-seen", "true");
|
|
22987
22993
|
}
|
|
@@ -23010,6 +23016,23 @@ function printSkipHint(beat) {
|
|
|
23010
23016
|
" " + chalk25.dim("Skipped. NTRP will not ask again. Type ") + setCmd + chalk25.dim(" then ") + skillCmd + chalk25.dim(" at any time.")
|
|
23011
23017
|
);
|
|
23012
23018
|
}
|
|
23019
|
+
async function reuseInboxFolderIfPresent(session, beat, folderPath = defaultAiInboxDir()) {
|
|
23020
|
+
if (getAiInboxDir()) return false;
|
|
23021
|
+
if (!existsSync22(folderPath)) return false;
|
|
23022
|
+
console.log(" " + chalk25.dim("Pickup folder still on disk: ") + folderPath);
|
|
23023
|
+
const reuse = await session.confirm("Reuse this pickup folder?", true);
|
|
23024
|
+
if (!reuse) return false;
|
|
23025
|
+
const resolved = setAiInboxDir(folderPath);
|
|
23026
|
+
markDemoOffered();
|
|
23027
|
+
if (beat === "production") markProductionOffered();
|
|
23028
|
+
console.log();
|
|
23029
|
+
console.log(" " + paint("accent", "Inbox ready") + chalk25.dim(" ") + resolved);
|
|
23030
|
+
console.log(
|
|
23031
|
+
" " + chalk25.dim("Folder reused. Type ") + paint("accent", "/inbox skill") + chalk25.dim(" to print the finder again.")
|
|
23032
|
+
);
|
|
23033
|
+
console.log();
|
|
23034
|
+
return true;
|
|
23035
|
+
}
|
|
23013
23036
|
async function offerInboxSkillSetup(session, opts = {}) {
|
|
23014
23037
|
const beat = opts.beat ?? "production";
|
|
23015
23038
|
if (!shouldOfferInboxSkillSetup(beat)) return;
|
|
@@ -23024,6 +23047,7 @@ async function offerInboxSkillSetup(session, opts = {}) {
|
|
|
23024
23047
|
console.log(" " + chalk25.dim("You skipped this during demo."));
|
|
23025
23048
|
}
|
|
23026
23049
|
console.log();
|
|
23050
|
+
if (await reuseInboxFolderIfPresent(session, beat)) return;
|
|
23027
23051
|
const want = await session.confirm("Set a pickup folder for Claude, ChatGPT, or Cursor?", true);
|
|
23028
23052
|
if (!want) {
|
|
23029
23053
|
if (beat === "demo") markDemoOffered();
|
|
@@ -23094,7 +23118,7 @@ __export(ingest_exports, {
|
|
|
23094
23118
|
handler: () => handler3
|
|
23095
23119
|
});
|
|
23096
23120
|
import chalk26 from "chalk";
|
|
23097
|
-
import { readFileSync as readFileSync20, existsSync as
|
|
23121
|
+
import { readFileSync as readFileSync20, existsSync as existsSync23 } from "fs";
|
|
23098
23122
|
import { basename as basename6 } from "path";
|
|
23099
23123
|
async function handler3(args, ctx) {
|
|
23100
23124
|
const { positional, flags } = parseArgs(args, [
|
|
@@ -23118,7 +23142,7 @@ async function handler3(args, ctx) {
|
|
|
23118
23142
|
console.error(chalk26.dim(" /ingest --demo [--scenario <name>]"));
|
|
23119
23143
|
process.exit(1);
|
|
23120
23144
|
}
|
|
23121
|
-
if (!
|
|
23145
|
+
if (!existsSync23(file)) {
|
|
23122
23146
|
console.error(chalk26.red(` File not found: ${file}`));
|
|
23123
23147
|
process.exit(1);
|
|
23124
23148
|
}
|
|
@@ -23504,7 +23528,7 @@ __export(ingest_chat_exports, {
|
|
|
23504
23528
|
loadDemoFromChat: () => loadDemoFromChat,
|
|
23505
23529
|
looksLikeFilePath: () => looksLikeFilePath
|
|
23506
23530
|
});
|
|
23507
|
-
import { existsSync as
|
|
23531
|
+
import { existsSync as existsSync24 } from "fs";
|
|
23508
23532
|
import { basename as basename7, resolve as resolve9 } from "path";
|
|
23509
23533
|
import { homedir as homedir8 } from "os";
|
|
23510
23534
|
import chalk28 from "chalk";
|
|
@@ -23524,11 +23548,11 @@ function extractFilePath(input) {
|
|
|
23524
23548
|
const m = trimmed.match(re);
|
|
23525
23549
|
if (m?.[1]) {
|
|
23526
23550
|
const p = expandPath(m[1]);
|
|
23527
|
-
if (
|
|
23551
|
+
if (existsSync24(p)) return p;
|
|
23528
23552
|
}
|
|
23529
23553
|
if (!m?.[1] && re.test(trimmed) && trimmed.toLowerCase().endsWith(".csv")) {
|
|
23530
23554
|
const p = expandPath(trimmed.replace(/^["']|["']$/g, ""));
|
|
23531
|
-
if (
|
|
23555
|
+
if (existsSync24(p)) return p;
|
|
23532
23556
|
}
|
|
23533
23557
|
}
|
|
23534
23558
|
return null;
|
|
@@ -24410,9 +24434,9 @@ async function handleGetSessionBrief(input) {
|
|
|
24410
24434
|
if (!target) {
|
|
24411
24435
|
return { error: `No session matching "${raw}".` };
|
|
24412
24436
|
}
|
|
24413
|
-
const { existsSync:
|
|
24437
|
+
const { existsSync: existsSync27, readFileSync: readFileSync23 } = await import("fs");
|
|
24414
24438
|
const briefPath = contextDocPathForSession2(target.id);
|
|
24415
|
-
if (!
|
|
24439
|
+
if (!existsSync27(briefPath)) {
|
|
24416
24440
|
return {
|
|
24417
24441
|
session_id: target.id,
|
|
24418
24442
|
error: "No context brief on disk for this session (created before brief storage existed).",
|
|
@@ -25207,7 +25231,7 @@ var init_ask = __esm({
|
|
|
25207
25231
|
});
|
|
25208
25232
|
|
|
25209
25233
|
// src/services/setup.ts
|
|
25210
|
-
import { existsSync as
|
|
25234
|
+
import { existsSync as existsSync25, mkdirSync as mkdirSync14, readFileSync as readFileSync21, writeFileSync as writeFileSync16 } from "fs";
|
|
25211
25235
|
import { join as join25 } from "path";
|
|
25212
25236
|
function setupCheck() {
|
|
25213
25237
|
const home = ntrpHome();
|
|
@@ -25266,7 +25290,7 @@ var init_setup = __esm({
|
|
|
25266
25290
|
});
|
|
25267
25291
|
|
|
25268
25292
|
// src/version.ts
|
|
25269
|
-
import { existsSync as
|
|
25293
|
+
import { existsSync as existsSync26, readFileSync as readFileSync22 } from "fs";
|
|
25270
25294
|
import { dirname as dirname5, join as join26 } from "path";
|
|
25271
25295
|
import { fileURLToPath } from "url";
|
|
25272
25296
|
function getInstalledVersion() {
|
|
@@ -25274,7 +25298,7 @@ function getInstalledVersion() {
|
|
|
25274
25298
|
const start = dirname5(fileURLToPath(import.meta.url));
|
|
25275
25299
|
for (const rel of ["../package.json", "../../package.json"]) {
|
|
25276
25300
|
const path = join26(start, rel);
|
|
25277
|
-
if (!
|
|
25301
|
+
if (!existsSync26(path)) continue;
|
|
25278
25302
|
try {
|
|
25279
25303
|
const pkg = JSON.parse(readFileSync22(path, "utf-8"));
|
|
25280
25304
|
if (typeof pkg.version === "string" && pkg.version.length > 0) {
|