@longtable/cli 0.1.17 → 0.1.19
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/cli.js +9 -8
- package/dist/project-session.js +3 -2
- package/dist/prompt-aliases.js +2 -2
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -42,7 +42,7 @@ const ANSI = {
|
|
|
42
42
|
green: "\u001B[32m"
|
|
43
43
|
};
|
|
44
44
|
const LONGTABLE_MCP_SERVER_NAME = "longtable-state";
|
|
45
|
-
const LONGTABLE_MCP_PACKAGE_VERSION = "0.1.
|
|
45
|
+
const LONGTABLE_MCP_PACKAGE_VERSION = "0.1.19";
|
|
46
46
|
const LONGTABLE_MCP_MARKER_START = "# LongTable state MCP START";
|
|
47
47
|
const LONGTABLE_MCP_MARKER_END = "# LongTable state MCP END";
|
|
48
48
|
function style(text, prefix) {
|
|
@@ -78,7 +78,7 @@ function usage() {
|
|
|
78
78
|
" Run `longtable ...` in your terminal, not inside the Codex chat box.",
|
|
79
79
|
" After `longtable start`, move into the created project directory and open `codex` there.",
|
|
80
80
|
"",
|
|
81
|
-
" longtable init [--flow quickstart|interview] [--provider codex|claude] [--
|
|
81
|
+
" longtable init [--flow quickstart|interview] [--provider codex|claude] [--career-stage <stage>] [--experience novice|intermediate|advanced] [--checkpoint low|balanced|high] [--field <field>] [--authorship-signal <text>] [--entry-mode explore|review|critique|draft|commit] [--weakest-domain theory|methodology|measurement|analysis|writing] [--panel-preference synthesis_only|show_on_conflict|always_visible] [--json] [--no-install] [--install-skills] [--install-prompts]",
|
|
82
82
|
" longtable setup [--provider codex|claude] [--json] [--dir <path>] [--skills-dir <path>] [--runtime-path <file>] [--setup-path <file>]",
|
|
83
83
|
" longtable start [--path <dir>] [--name <project>] [--goal <text>] [--blocker <text>] [--perspectives <role[,role]>] [--disagreement synthesis_only|show_on_conflict|always_visible] [--setup <path>] [--json]",
|
|
84
84
|
" longtable resume [--cwd <path>] [--json]",
|
|
@@ -197,7 +197,7 @@ function renderQuestionHeader(index, total, section, prompt) {
|
|
|
197
197
|
].join("\n");
|
|
198
198
|
}
|
|
199
199
|
function questionSection(questionId) {
|
|
200
|
-
if (questionId === "
|
|
200
|
+
if (questionId === "careerStage" || questionId === "experienceLevel") {
|
|
201
201
|
return "Researcher profile";
|
|
202
202
|
}
|
|
203
203
|
if (questionId === "preferredCheckpointIntensity" || questionId === "preferredEntryMode") {
|
|
@@ -476,7 +476,7 @@ async function promptMultiChoice(rl, prompt, choices) {
|
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
function hasCompleteFlagInput(args) {
|
|
479
|
-
const required = ["provider", "
|
|
479
|
+
const required = ["provider", "career-stage", "experience", "checkpoint"];
|
|
480
480
|
return required.every((key) => typeof args[key] === "string" && String(args[key]).trim().length > 0);
|
|
481
481
|
}
|
|
482
482
|
function resolveSetupFlow(args) {
|
|
@@ -484,7 +484,9 @@ function resolveSetupFlow(args) {
|
|
|
484
484
|
}
|
|
485
485
|
function toSetupAnswers(args) {
|
|
486
486
|
return {
|
|
487
|
-
field:
|
|
487
|
+
field: typeof args.field === "string" && args.field.trim().length > 0
|
|
488
|
+
? String(args.field)
|
|
489
|
+
: "unspecified",
|
|
488
490
|
careerStage: String(args["career-stage"]),
|
|
489
491
|
experienceLevel: String(args.experience),
|
|
490
492
|
currentProjectType: typeof args["project-type"] === "string" && args["project-type"].trim().length > 0
|
|
@@ -515,6 +517,7 @@ async function collectInteractiveAnswers(initialFlow) {
|
|
|
515
517
|
console.log("");
|
|
516
518
|
const provider = await promptChoice(rl, "Which provider do you want to configure?", buildProviderChoices());
|
|
517
519
|
const answers = {
|
|
520
|
+
field: "unspecified",
|
|
518
521
|
currentProjectType: "unspecified research task"
|
|
519
522
|
};
|
|
520
523
|
const questions = buildQuickSetupFlow(flow);
|
|
@@ -531,8 +534,6 @@ async function collectInteractiveAnswers(initialFlow) {
|
|
|
531
534
|
if (!value) {
|
|
532
535
|
continue;
|
|
533
536
|
}
|
|
534
|
-
if (question.id === "field")
|
|
535
|
-
answers.field = value;
|
|
536
537
|
if (question.id === "careerStage")
|
|
537
538
|
answers.careerStage = value;
|
|
538
539
|
if (question.id === "experienceLevel")
|
|
@@ -813,7 +814,7 @@ function normalizePersistAnswers(raw) {
|
|
|
813
814
|
flow: raw.flow === "interview" ? "interview" : "quickstart",
|
|
814
815
|
provider: raw.provider === "claude" ? "claude" : "codex",
|
|
815
816
|
answers: {
|
|
816
|
-
field: raw.field,
|
|
817
|
+
field: raw.field?.trim() ? raw.field.trim() : "unspecified",
|
|
817
818
|
careerStage: raw.careerStage,
|
|
818
819
|
experienceLevel: raw.experienceLevel,
|
|
819
820
|
currentProjectType: "unspecified research task",
|
package/dist/project-session.js
CHANGED
|
@@ -193,6 +193,7 @@ async function loadResearchState(stateFilePath) {
|
|
|
193
193
|
}
|
|
194
194
|
const parsed = JSON.parse(await readFile(stateFilePath, "utf8"));
|
|
195
195
|
return {
|
|
196
|
+
...parsed,
|
|
196
197
|
explicitState: parsed.explicitState ?? {},
|
|
197
198
|
workingState: parsed.workingState ?? {},
|
|
198
199
|
inferredHypotheses: parsed.inferredHypotheses ?? [],
|
|
@@ -342,7 +343,7 @@ function buildProjectAgentsMd(project, session) {
|
|
|
342
343
|
function buildStateSeed(project, session, setup) {
|
|
343
344
|
const state = createEmptyResearchState();
|
|
344
345
|
state.explicitState = {
|
|
345
|
-
field: setup.profileSeed.field,
|
|
346
|
+
field: setup.profileSeed.field ?? "unspecified",
|
|
346
347
|
careerStage: setup.profileSeed.careerStage,
|
|
347
348
|
experienceLevel: setup.profileSeed.experienceLevel,
|
|
348
349
|
projectName: project.projectName,
|
|
@@ -906,7 +907,7 @@ export async function createOrUpdateProjectWorkspace(options) {
|
|
|
906
907
|
contractVersion: "workspace-v2",
|
|
907
908
|
locale,
|
|
908
909
|
globalSetupSummary: {
|
|
909
|
-
field: options.setup.profileSeed.field,
|
|
910
|
+
field: options.setup.profileSeed.field ?? "unspecified",
|
|
910
911
|
careerStage: options.setup.profileSeed.careerStage,
|
|
911
912
|
experienceLevel: options.setup.profileSeed.experienceLevel,
|
|
912
913
|
checkpointIntensity: options.setup.profileSeed.preferredCheckpointIntensity,
|
package/dist/prompt-aliases.js
CHANGED
|
@@ -33,9 +33,9 @@ function promptSpec() {
|
|
|
33
33
|
"Ask exactly one setup question at a time.",
|
|
34
34
|
"Use numbered choices when possible and include a 'None of the above' option when needed.",
|
|
35
35
|
"Do not move to the next question until the researcher answers the current one.",
|
|
36
|
-
"Quickstart covers: provider,
|
|
36
|
+
"Quickstart covers: provider, career stage, experience level, checkpoint intensity, and human authorship signal. Do not ask for research field during setup unless the researcher volunteers it.",
|
|
37
37
|
"Interview also covers: preferred entry mode, weakest domain, and panel visibility preference.",
|
|
38
|
-
"After collecting all answers, summarize the proposed setup and then output both: 1) the exact `longtable codex persist-init ... --install-skills` command and 2) a strict JSON object with keys provider, flow,
|
|
38
|
+
"After collecting all answers, summarize the proposed setup and then output both: 1) the exact `longtable codex persist-init ... --install-skills` command and 2) a strict JSON object with keys provider, flow, careerStage, experienceLevel, preferredCheckpointIntensity, and optional field, humanAuthorshipSignal, preferredEntryMode, weakestDomain, panelPreference.",
|
|
39
39
|
"If the user prefers paste-based setup, tell them they can pipe the JSON into `longtable codex persist-init --stdin --install-skills`.",
|
|
40
40
|
"If the researcher asks you to stay inside Codex, keep the conversation in numbered form and do not prematurely close.",
|
|
41
41
|
"Frame the setup like a short researcher interview, not a bare config form.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longtable/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Researcher-facing LongTable CLI",
|
|
6
6
|
"type": "module",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@longtable/checkpoints": "0.1.
|
|
32
|
-
"@longtable/core": "0.1.
|
|
33
|
-
"@longtable/memory": "0.1.
|
|
34
|
-
"@longtable/provider-claude": "0.1.
|
|
35
|
-
"@longtable/provider-codex": "0.1.
|
|
36
|
-
"@longtable/setup": "0.1.
|
|
31
|
+
"@longtable/checkpoints": "0.1.19",
|
|
32
|
+
"@longtable/core": "0.1.19",
|
|
33
|
+
"@longtable/memory": "0.1.19",
|
|
34
|
+
"@longtable/provider-claude": "0.1.19",
|
|
35
|
+
"@longtable/provider-codex": "0.1.19",
|
|
36
|
+
"@longtable/setup": "0.1.19"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^22.10.1",
|