@longtable/setup 0.1.18 → 0.1.20
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/README.md +7 -6
- package/dist/cli.js +5 -4
- package/dist/onboarding.js +7 -95
- package/dist/persistence.js +10 -10
- package/dist/types.d.ts +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Researchers should use the unified CLI:
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install -g @longtable/cli
|
|
11
|
-
longtable
|
|
11
|
+
longtable setup --provider codex
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
This package exists so the setup flow can also be consumed programmatically or tested in isolation during development.
|
|
@@ -23,14 +23,15 @@ The generated runtime config does not overwrite platform-native config files dir
|
|
|
23
23
|
|
|
24
24
|
## Package Role
|
|
25
25
|
|
|
26
|
-
The setup contract
|
|
26
|
+
The setup contract stores runtime permission and intervention defaults. It
|
|
27
|
+
should not front-load researcher-profile calibration.
|
|
27
28
|
|
|
28
29
|
Global setup should answer:
|
|
29
30
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
- how
|
|
31
|
+
- which provider is being configured
|
|
32
|
+
- where LongTable may install runtime support
|
|
33
|
+
- which provider surfaces are approved
|
|
34
|
+
- how strongly LongTable may interrupt research decisions
|
|
34
35
|
|
|
35
36
|
Project and session intake belongs to `longtable start`, not library-level setup helpers.
|
|
36
37
|
|
package/dist/cli.js
CHANGED
|
@@ -4,12 +4,12 @@ import { buildProviderChoices, buildQuickSetupFlow, createPersistedSetupOutput }
|
|
|
4
4
|
import { installRuntimeConfigFromStoredSetup, loadSetupOutput, renderInstallSummary, renderSetupSummary, resolveDefaultSetupPath, saveSetupAndRuntimeConfig, saveSetupOutput, serializeSetupOutput } from "./persistence.js";
|
|
5
5
|
function printUsage() {
|
|
6
6
|
console.log(`Usage:
|
|
7
|
-
longtable-setup init [--flow quickstart|interview] --provider <codex|claude> --
|
|
7
|
+
longtable-setup 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]
|
|
8
8
|
longtable-setup install [--path <file>] [--runtime-path <file>] [--json]
|
|
9
9
|
longtable-setup show [--path <file>] [--json]
|
|
10
10
|
|
|
11
11
|
Example:
|
|
12
|
-
longtable-setup init --flow interview --provider codex --
|
|
12
|
+
longtable-setup init --flow interview --provider codex --career-stage doctoral --experience intermediate --checkpoint balanced --entry-mode explore --panel-preference show_on_conflict --json
|
|
13
13
|
|
|
14
14
|
If required flags are omitted, interactive setup starts automatically.
|
|
15
15
|
Use --write to save setup.json and --install to also generate provider runtime config.`);
|
|
@@ -42,7 +42,9 @@ function requireString(args, key) {
|
|
|
42
42
|
}
|
|
43
43
|
function toSetupAnswers(args) {
|
|
44
44
|
return {
|
|
45
|
-
field:
|
|
45
|
+
field: typeof args.field === "string" && args.field.trim().length > 0
|
|
46
|
+
? args.field.trim()
|
|
47
|
+
: "unspecified",
|
|
46
48
|
careerStage: requireString(args, "career-stage"),
|
|
47
49
|
experienceLevel: requireString(args, "experience"),
|
|
48
50
|
preferredCheckpointIntensity: requireString(args, "checkpoint"),
|
|
@@ -63,7 +65,6 @@ function toSetupAnswers(args) {
|
|
|
63
65
|
function hasCompleteFlagInput(args) {
|
|
64
66
|
const requiredKeys = [
|
|
65
67
|
"provider",
|
|
66
|
-
"field",
|
|
67
68
|
"career-stage",
|
|
68
69
|
"experience",
|
|
69
70
|
"checkpoint"
|
package/dist/onboarding.js
CHANGED
|
@@ -1,99 +1,7 @@
|
|
|
1
1
|
import { createEmptyResearchState } from "@longtable/memory";
|
|
2
2
|
export function buildQuickSetupFlow(flow = "quickstart") {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
id: "field",
|
|
6
|
-
prompt: "Before we begin, which research field best matches your work right now?",
|
|
7
|
-
required: true,
|
|
8
|
-
kind: "single_choice",
|
|
9
|
-
choices: buildFieldChoices()
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
id: "careerStage",
|
|
13
|
-
prompt: "What kind of researcher role best fits you today?",
|
|
14
|
-
required: true,
|
|
15
|
-
kind: "single_choice",
|
|
16
|
-
choices: buildCareerStageChoices()
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: "experienceLevel",
|
|
20
|
-
prompt: "How comfortable are you making independent research design decisions right now?",
|
|
21
|
-
required: true,
|
|
22
|
-
kind: "single_choice",
|
|
23
|
-
choices: [
|
|
24
|
-
{ id: "novice", label: "Novice", description: "Needs stronger checkpoint guidance." },
|
|
25
|
-
{ id: "intermediate", label: "Intermediate", description: "Wants balanced guidance." },
|
|
26
|
-
{ id: "advanced", label: "Advanced", description: "Prefers lighter intervention." }
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: "preferredCheckpointIntensity",
|
|
31
|
-
prompt: "How strongly should LongTable challenge or slow you down by default?",
|
|
32
|
-
required: true,
|
|
33
|
-
kind: "single_choice",
|
|
34
|
-
choices: [
|
|
35
|
-
{ id: "low", label: "Low", description: "Mostly lightweight logging and advisory prompts." },
|
|
36
|
-
{ id: "balanced", label: "Balanced", description: "Recommended by default." },
|
|
37
|
-
{ id: "high", label: "High", description: "Frequent structured commitment prompts." }
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: "humanAuthorshipSignal",
|
|
42
|
-
prompt: "When a piece of writing still feels like yours, what usually makes that true?",
|
|
43
|
-
required: false,
|
|
44
|
-
kind: "single_choice",
|
|
45
|
-
choices: [
|
|
46
|
-
{ id: "personal experience in the narrative", label: "Personal experience", description: "Humanity appears through lived experience and situated voice." },
|
|
47
|
-
{ id: "visible judgment and reasoning path", label: "Judgment trail", description: "Humanity appears through explicit choices and reasoning history." },
|
|
48
|
-
{ id: "contextual nuance that avoids generic fluency", label: "Contextual nuance", description: "Humanity appears through specificity and non-generic framing." },
|
|
49
|
-
{ id: "a distinctive voice that still sounds like the researcher", label: "Distinctive voice", description: "Humanity appears through authorial tone and cadence." },
|
|
50
|
-
{ id: "other", label: "None of the above", description: "Enter a custom authorship signal.", fallbackToText: true }
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
if (flow === "quickstart") {
|
|
55
|
-
return baseQuestions;
|
|
56
|
-
}
|
|
57
|
-
return [
|
|
58
|
-
...baseQuestions,
|
|
59
|
-
{
|
|
60
|
-
id: "preferredEntryMode",
|
|
61
|
-
prompt: "When you first open LongTable, where do you want it to begin?",
|
|
62
|
-
required: false,
|
|
63
|
-
kind: "single_choice",
|
|
64
|
-
choices: [
|
|
65
|
-
{ id: "explore", label: "Explore", description: "Open the problem, surface tensions, and ask better questions." },
|
|
66
|
-
{ id: "review", label: "Review", description: "Critically inspect a claim, plan, or draft." },
|
|
67
|
-
{ id: "critique", label: "Critique", description: "Stress-test weak assumptions and generate counterarguments." },
|
|
68
|
-
{ id: "draft", label: "Draft", description: "Write while preserving narrative trace and authorship." },
|
|
69
|
-
{ id: "commit", label: "Commit", description: "Slow down and make an explicit research decision." }
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: "weakestDomain",
|
|
74
|
-
prompt: "Where do you most want LongTable to push back on you first?",
|
|
75
|
-
required: false,
|
|
76
|
-
kind: "single_choice",
|
|
77
|
-
choices: [
|
|
78
|
-
{ id: "theory", label: "Theory", description: "Sharpen framing, constructs, and theoretical defensibility." },
|
|
79
|
-
{ id: "methodology", label: "Methodology", description: "Question design fit, sampling, and study structure." },
|
|
80
|
-
{ id: "measurement", label: "Measurement", description: "Challenge scales, validity, and operationalization." },
|
|
81
|
-
{ id: "analysis", label: "Analysis", description: "Probe analytic logic, interpretation, and evidence claims." },
|
|
82
|
-
{ id: "writing", label: "Writing", description: "Preserve voice while improving clarity and argument flow." }
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: "panelPreference",
|
|
87
|
-
prompt: "How visible should disagreement between roles be by default?",
|
|
88
|
-
required: false,
|
|
89
|
-
kind: "single_choice",
|
|
90
|
-
choices: [
|
|
91
|
-
{ id: "synthesis_only", label: "Synthesis only", description: "Show one LongTable answer unless I ask for more." },
|
|
92
|
-
{ id: "show_on_conflict", label: "Show on conflict", description: "Surface panel disagreement when roles materially diverge." },
|
|
93
|
-
{ id: "always_visible", label: "Always visible", description: "Keep panel opinions visible by default." }
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
];
|
|
3
|
+
void flow;
|
|
4
|
+
return [];
|
|
97
5
|
}
|
|
98
6
|
export function buildProviderChoices() {
|
|
99
7
|
return [
|
|
@@ -144,8 +52,12 @@ export function normalizeProviderChoice(choice) {
|
|
|
144
52
|
}
|
|
145
53
|
export function createResearcherProfileSeed(answers) {
|
|
146
54
|
return {
|
|
147
|
-
currentProjectType: answers.currentProjectType ?? "unspecified research task",
|
|
148
55
|
...answers,
|
|
56
|
+
field: answers.field ?? "unspecified",
|
|
57
|
+
careerStage: answers.careerStage ?? "unspecified",
|
|
58
|
+
experienceLevel: answers.experienceLevel ?? "advanced",
|
|
59
|
+
preferredCheckpointIntensity: answers.preferredCheckpointIntensity ?? "balanced",
|
|
60
|
+
currentProjectType: answers.currentProjectType ?? "unspecified research task",
|
|
149
61
|
aiAutonomyPreference: answers.experienceLevel === "advanced"
|
|
150
62
|
? "balanced"
|
|
151
63
|
: answers.experienceLevel === "intermediate"
|
package/dist/persistence.js
CHANGED
|
@@ -23,10 +23,10 @@ export function renderSetupSummary(output) {
|
|
|
23
23
|
`provider: ${output.providerSelection.provider}`,
|
|
24
24
|
`checkpoint protocol: ${output.providerSelection.checkpointProtocol}`,
|
|
25
25
|
`default mode: ${output.defaultInteractionMode}`,
|
|
26
|
-
`field: ${output.profileSeed.field}`,
|
|
27
|
-
`career stage: ${output.profileSeed.careerStage}`,
|
|
28
|
-
`experience: ${output.profileSeed.experienceLevel}`,
|
|
29
|
-
`checkpoint intensity: ${output.profileSeed.preferredCheckpointIntensity}`
|
|
26
|
+
`field: ${output.profileSeed.field ?? "unspecified"}`,
|
|
27
|
+
`career stage: ${output.profileSeed.careerStage ?? "unspecified"}`,
|
|
28
|
+
`experience: ${output.profileSeed.experienceLevel ?? "advanced"}`,
|
|
29
|
+
`checkpoint intensity: ${output.profileSeed.preferredCheckpointIntensity ?? "balanced"}`
|
|
30
30
|
];
|
|
31
31
|
if (output.profileSeed.weakestDomain) {
|
|
32
32
|
lines.push(`challenge first: ${output.profileSeed.weakestDomain}`);
|
|
@@ -96,9 +96,9 @@ function renderCodexRuntimeConfig(output, setupPath) {
|
|
|
96
96
|
`setup_flow = "${output.setupFlow}"`,
|
|
97
97
|
"",
|
|
98
98
|
"[longtable.profile]",
|
|
99
|
-
`field = "${output.profileSeed.field}"`,
|
|
100
|
-
`career_stage = "${output.profileSeed.careerStage}"`,
|
|
101
|
-
`experience_level = "${output.profileSeed.experienceLevel}"`,
|
|
99
|
+
`field = "${output.profileSeed.field ?? "unspecified"}"`,
|
|
100
|
+
`career_stage = "${output.profileSeed.careerStage ?? "unspecified"}"`,
|
|
101
|
+
`experience_level = "${output.profileSeed.experienceLevel ?? "advanced"}"`,
|
|
102
102
|
...(output.profileSeed.currentProjectType && output.profileSeed.currentProjectType !== "unspecified research task"
|
|
103
103
|
? [`current_project_type = "${output.profileSeed.currentProjectType}"`]
|
|
104
104
|
: []),
|
|
@@ -125,9 +125,9 @@ function renderClaudeRuntimeConfig(output, setupPath) {
|
|
|
125
125
|
defaultInteractionMode: output.defaultInteractionMode,
|
|
126
126
|
setupFlow: output.setupFlow,
|
|
127
127
|
profileSummary: {
|
|
128
|
-
field: output.profileSeed.field,
|
|
129
|
-
careerStage: output.profileSeed.careerStage,
|
|
130
|
-
experienceLevel: output.profileSeed.experienceLevel,
|
|
128
|
+
field: output.profileSeed.field ?? "unspecified",
|
|
129
|
+
careerStage: output.profileSeed.careerStage ?? "unspecified",
|
|
130
|
+
experienceLevel: output.profileSeed.experienceLevel ?? "advanced",
|
|
131
131
|
currentProjectType: output.profileSeed.currentProjectType && output.profileSeed.currentProjectType !== "unspecified research task"
|
|
132
132
|
? output.profileSeed.currentProjectType
|
|
133
133
|
: undefined,
|
package/dist/types.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ export interface SetupQuestion {
|
|
|
14
14
|
}
|
|
15
15
|
export type SetupFlow = "quickstart" | "interview";
|
|
16
16
|
export interface SetupAnswers {
|
|
17
|
-
field
|
|
18
|
-
careerStage
|
|
19
|
-
experienceLevel
|
|
17
|
+
field?: string;
|
|
18
|
+
careerStage?: string;
|
|
19
|
+
experienceLevel?: ExperienceLevel;
|
|
20
20
|
currentProjectType?: string;
|
|
21
|
-
preferredCheckpointIntensity
|
|
21
|
+
preferredCheckpointIntensity?: CheckpointIntensity;
|
|
22
22
|
humanAuthorshipSignal?: string;
|
|
23
23
|
preferredEntryMode?: Exclude<InteractionMode, "submit">;
|
|
24
24
|
weakestDomain?: Extract<keyof ResearcherConfidenceByDomain, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longtable/setup",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Researcher onboarding and setup flows for LongTable",
|
|
6
6
|
"type": "module",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@longtable/core": "0.1.
|
|
27
|
-
"@longtable/memory": "0.1.
|
|
26
|
+
"@longtable/core": "0.1.20",
|
|
27
|
+
"@longtable/memory": "0.1.20"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^22.0.0",
|