@longtable/cli 0.1.61 → 0.1.63
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 +6 -0
- package/dist/panel.js +14 -4
- package/dist/persona-router.d.ts +1 -0
- package/dist/persona-router.js +16 -0
- package/package.json +8 -8
package/dist/cli.js
CHANGED
|
@@ -2691,6 +2691,12 @@ async function buildProjectAwarePrompt(prompt, workingDirectory) {
|
|
|
2691
2691
|
`project: ${context.project.projectName}`,
|
|
2692
2692
|
`current session goal: ${context.session.currentGoal}`,
|
|
2693
2693
|
...(context.session.currentBlocker ? [`current blocker: ${context.session.currentBlocker}`] : []),
|
|
2694
|
+
...(context.session.researchObject ? [`research object: ${context.session.researchObject}`] : []),
|
|
2695
|
+
...(context.session.gapRisk ? [`gap/tacit risk: ${context.session.gapRisk}`] : []),
|
|
2696
|
+
...(context.session.protectedDecision ? [`protected decision: ${context.session.protectedDecision}`] : []),
|
|
2697
|
+
...(context.project.globalSetupSummary.humanAuthorshipSignal
|
|
2698
|
+
? [`human authorship signal: ${context.project.globalSetupSummary.humanAuthorshipSignal}`]
|
|
2699
|
+
: []),
|
|
2694
2700
|
`requested perspectives: ${context.session.requestedPerspectives.length > 0 ? context.session.requestedPerspectives.join(", ") : "auto"}`,
|
|
2695
2701
|
`disagreement preference: ${context.session.disagreementPreference}`,
|
|
2696
2702
|
"",
|
package/dist/panel.js
CHANGED
|
@@ -374,12 +374,22 @@ function panelDecisionOptions(copy, language, focus, includeDefer) {
|
|
|
374
374
|
...(value === copy.recommendedValue ? { recommended: true } : {})
|
|
375
375
|
}));
|
|
376
376
|
}
|
|
377
|
+
function promptForPanelDecision(prompt) {
|
|
378
|
+
const trimmed = prompt.trim();
|
|
379
|
+
if (!trimmed.startsWith("LongTable project context\n")) {
|
|
380
|
+
return prompt;
|
|
381
|
+
}
|
|
382
|
+
const sections = trimmed.split(/\n\s*\n/).map((section) => section.trim()).filter(Boolean);
|
|
383
|
+
const lastSection = sections.length > 0 ? sections[sections.length - 1] : undefined;
|
|
384
|
+
return lastSection ?? prompt;
|
|
385
|
+
}
|
|
377
386
|
export function buildPanelDecisionContext(prompt) {
|
|
378
|
-
const
|
|
379
|
-
const
|
|
387
|
+
const decisionPrompt = promptForPanelDecision(prompt);
|
|
388
|
+
const language = detectOutputLanguage(decisionPrompt);
|
|
389
|
+
const domain = decisionDomainFromPrompt(decisionPrompt);
|
|
380
390
|
const copy = PANEL_DECISION_COPY[domain];
|
|
381
391
|
const domainFocus = copy.focus[language];
|
|
382
|
-
const focus = domain === "generic" ? conciseFocusFromPrompt(
|
|
392
|
+
const focus = domain === "generic" ? conciseFocusFromPrompt(decisionPrompt) || domainFocus : domainFocus;
|
|
383
393
|
const blockerSummary = copy.blockerSummary[language];
|
|
384
394
|
return {
|
|
385
395
|
language,
|
|
@@ -387,7 +397,7 @@ export function buildPanelDecisionContext(prompt) {
|
|
|
387
397
|
blockerSummary,
|
|
388
398
|
decisionQuestion: languageText(language, `What should LongTable treat as the next human decision for ${focus} after this panel review?`, `이 패널 리뷰 이후 LongTable이 ${focus}에 대해 다음 인간 결정으로 기록해야 할 것은 무엇인가요?`),
|
|
389
399
|
displayReason: languageText(language, `${blockerSummary} This should be resolved by the researcher before LongTable treats the direction as settled.`, `${blockerSummary} LongTable이 방향을 확정하기 전에 연구자가 직접 선택해야 합니다.`),
|
|
390
|
-
options: panelDecisionOptions(copy, language, focus, shouldIncludeDeferOption(
|
|
400
|
+
options: panelDecisionOptions(copy, language, focus, shouldIncludeDeferOption(decisionPrompt)),
|
|
391
401
|
otherLabel: languageText(language, "Other decision", "직접 입력")
|
|
392
402
|
};
|
|
393
403
|
}
|
package/dist/persona-router.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function parseRoleFlag(value?: string): CanonicalPersona[];
|
|
|
22
22
|
export declare function parseInvocationDirective(prompt: string): LongTableInvocationDirective;
|
|
23
23
|
export declare function routePersonas(prompt: string, explicitRoleFlag?: string): PersonaRoutingResult;
|
|
24
24
|
export declare function renderDisclosure(roles: CanonicalPersona[], language: OutputLanguage): string | null;
|
|
25
|
+
export declare function renderRoleGuidance(roles: readonly CanonicalPersona[]): string | null;
|
|
25
26
|
export declare function buildPersonaGuidance(options: {
|
|
26
27
|
mode: InteractionMode;
|
|
27
28
|
prompt: string;
|
package/dist/persona-router.js
CHANGED
|
@@ -124,6 +124,18 @@ export function renderDisclosure(roles, language) {
|
|
|
124
124
|
? `LongTable consulted: ${labels.join(", ")}`
|
|
125
125
|
: `LongTable consulted: ${labels.join(", ")}`;
|
|
126
126
|
}
|
|
127
|
+
export function renderRoleGuidance(roles) {
|
|
128
|
+
if (roles.length === 0) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return [
|
|
132
|
+
"Role guidance:",
|
|
133
|
+
...roles.map((role) => {
|
|
134
|
+
const definition = getPersonaDefinition(role);
|
|
135
|
+
return `- ${definition.label}: ${definition.shortDescription}`;
|
|
136
|
+
})
|
|
137
|
+
].join("\n");
|
|
138
|
+
}
|
|
127
139
|
export function buildPersonaGuidance(options) {
|
|
128
140
|
const directive = parseInvocationDirective(options.prompt);
|
|
129
141
|
const effectivePrompt = directive.cleanedPrompt;
|
|
@@ -137,6 +149,10 @@ export function buildPersonaGuidance(options) {
|
|
|
137
149
|
if (disclosure) {
|
|
138
150
|
lines.push(disclosure);
|
|
139
151
|
}
|
|
152
|
+
const roleGuidance = renderRoleGuidance(routing.consultedRoles);
|
|
153
|
+
if (roleGuidance) {
|
|
154
|
+
lines.push(roleGuidance);
|
|
155
|
+
}
|
|
140
156
|
if (routing.ambiguousSignal === "editor_or_reviewer") {
|
|
141
157
|
lines.push(routing.outputLanguage === "ko"
|
|
142
158
|
? "Ambiguity note: 편집자 관점인지 리뷰어 관점인지 애매합니다. 먼저 둘 중 무엇을 우선할지 짧게 확인하세요."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longtable/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Researcher-facing LongTable CLI",
|
|
6
6
|
"type": "module",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@clack/prompts": "^1.2.0",
|
|
32
|
-
"@longtable/checkpoints": "0.1.
|
|
33
|
-
"@longtable/core": "0.1.
|
|
34
|
-
"@longtable/memory": "0.1.
|
|
35
|
-
"@longtable/provider-claude": "0.1.
|
|
36
|
-
"@longtable/provider-codex": "0.1.
|
|
37
|
-
"@longtable/scholar-research": "0.1.
|
|
38
|
-
"@longtable/setup": "0.1.
|
|
32
|
+
"@longtable/checkpoints": "0.1.63",
|
|
33
|
+
"@longtable/core": "0.1.63",
|
|
34
|
+
"@longtable/memory": "0.1.63",
|
|
35
|
+
"@longtable/provider-claude": "0.1.63",
|
|
36
|
+
"@longtable/provider-codex": "0.1.63",
|
|
37
|
+
"@longtable/scholar-research": "0.1.63",
|
|
38
|
+
"@longtable/setup": "0.1.63"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^22.10.1",
|