@longtable/cli 0.1.18 → 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 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.18";
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] [--field <field>] [--career-stage <stage>] [--experience novice|intermediate|advanced] [--checkpoint low|balanced|high] [--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]",
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 === "field" || questionId === "careerStage" || questionId === "experienceLevel") {
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", "field", "career-stage", "experience", "checkpoint"];
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: String(args.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",
@@ -343,7 +343,7 @@ function buildProjectAgentsMd(project, session) {
343
343
  function buildStateSeed(project, session, setup) {
344
344
  const state = createEmptyResearchState();
345
345
  state.explicitState = {
346
- field: setup.profileSeed.field,
346
+ field: setup.profileSeed.field ?? "unspecified",
347
347
  careerStage: setup.profileSeed.careerStage,
348
348
  experienceLevel: setup.profileSeed.experienceLevel,
349
349
  projectName: project.projectName,
@@ -907,7 +907,7 @@ export async function createOrUpdateProjectWorkspace(options) {
907
907
  contractVersion: "workspace-v2",
908
908
  locale,
909
909
  globalSetupSummary: {
910
- field: options.setup.profileSeed.field,
910
+ field: options.setup.profileSeed.field ?? "unspecified",
911
911
  careerStage: options.setup.profileSeed.careerStage,
912
912
  experienceLevel: options.setup.profileSeed.experienceLevel,
913
913
  checkpointIntensity: options.setup.profileSeed.preferredCheckpointIntensity,
@@ -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, field, career stage, experience level, checkpoint intensity, and human authorship signal.",
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, field, careerStage, experienceLevel, preferredCheckpointIntensity, and optional humanAuthorshipSignal, preferredEntryMode, weakestDomain, panelPreference.",
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.18",
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.18",
32
- "@longtable/core": "0.1.18",
33
- "@longtable/memory": "0.1.18",
34
- "@longtable/provider-claude": "0.1.18",
35
- "@longtable/provider-codex": "0.1.18",
36
- "@longtable/setup": "0.1.18"
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",