@longtable/cli 0.1.36 → 0.1.38
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 +1 -1
- package/dist/longtable-codex-native-hook.js +16 -10
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -45,7 +45,7 @@ const ANSI = {
|
|
|
45
45
|
green: "\u001B[32m"
|
|
46
46
|
};
|
|
47
47
|
const LONGTABLE_MCP_SERVER_NAME = "longtable-state";
|
|
48
|
-
const LONGTABLE_MCP_PACKAGE_VERSION = "0.1.
|
|
48
|
+
const LONGTABLE_MCP_PACKAGE_VERSION = "0.1.38";
|
|
49
49
|
const LONGTABLE_MCP_MARKER_START = "# LongTable state MCP START";
|
|
50
50
|
const LONGTABLE_MCP_MARKER_END = "# LongTable state MCP END";
|
|
51
51
|
function style(text, prefix) {
|
|
@@ -126,8 +126,19 @@ function looksLikeLongTableEngineeringPrompt(prompt) {
|
|
|
126
126
|
return /\b(longtable|hook|checkpoint|mcp|agent|npm|version|global|publish|release|deploy|git)\b/i.test(normalized)
|
|
127
127
|
|| /롱테이블|훅|체크포인트|에이전트|글로벌|배포|버전|릴리즈|깃|깃허브/.test(normalized);
|
|
128
128
|
}
|
|
129
|
+
function looksLikeDiagnosticOrExplanatoryPrompt(prompt) {
|
|
130
|
+
const normalized = prompt.trim();
|
|
131
|
+
if (!normalized) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
return /\b(explain|why|how|diagnos(?:e|is)|debug|inspect|check|verify|status|simulate|simulation|test|logs?)\b/i.test(normalized)
|
|
135
|
+
|| /설명|왜|어떻게|진단|디버그|확인|점검|상태|시뮬레이션|테스트|로그|불필요/.test(normalized);
|
|
136
|
+
}
|
|
129
137
|
function shouldAutoCreateQuestionsForPrompt(prompt) {
|
|
130
|
-
|
|
138
|
+
if (!looksLikeLongTableEngineeringPrompt(prompt)) {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
return !looksLikeExecutionDirective(prompt) && !looksLikeDiagnosticOrExplanatoryPrompt(prompt);
|
|
131
142
|
}
|
|
132
143
|
function shouldApplyProtectedDecisionClosure(runtime, prompt) {
|
|
133
144
|
return Boolean(runtime.context.session.protectedDecision) &&
|
|
@@ -184,7 +195,8 @@ function buildPendingQuestionContext(question) {
|
|
|
184
195
|
return [
|
|
185
196
|
`Required Researcher Checkpoint is still pending: ${question.prompt.question}`,
|
|
186
197
|
`Options: ${formatQuestionOptions(question)}`,
|
|
187
|
-
`Record it with longtable decide --question ${question.id} --answer <value> if you are outside MCP elicitation
|
|
198
|
+
`Record it with longtable decide --question ${question.id} --answer <value> if you are outside MCP elicitation.`,
|
|
199
|
+
"Do not choose or record an answer unless the researcher explicitly provides the selection."
|
|
188
200
|
].join("\n");
|
|
189
201
|
}
|
|
190
202
|
function buildGeneratedQuestionsContext(questions, created) {
|
|
@@ -198,6 +210,7 @@ function buildGeneratedQuestionsContext(questions, created) {
|
|
|
198
210
|
lines.push(` Options: ${formatQuestionOptions(question)}`);
|
|
199
211
|
lines.push(` Record it with longtable decide --question ${question.id} --answer <value> if you are outside MCP elicitation.`);
|
|
200
212
|
}
|
|
213
|
+
lines.push("Do not choose or record answers for these checkpoints unless the researcher explicitly provides the selections.");
|
|
201
214
|
return lines.join("\n");
|
|
202
215
|
}
|
|
203
216
|
function buildPendingObligationContext(obligation) {
|
|
@@ -322,14 +335,7 @@ function postToolUseOutput(runtime, payload) {
|
|
|
322
335
|
return null;
|
|
323
336
|
}
|
|
324
337
|
function stopOutput(runtime) {
|
|
325
|
-
|
|
326
|
-
if (blockingQuestion) {
|
|
327
|
-
return buildStopBlockOutput("A required LongTable Researcher Checkpoint is still pending.");
|
|
328
|
-
}
|
|
329
|
-
const blockingObligation = pendingObligations(runtime.state)[0];
|
|
330
|
-
if (blockingObligation) {
|
|
331
|
-
return buildStopBlockOutput("A LongTable research obligation is still pending.");
|
|
332
|
-
}
|
|
338
|
+
void runtime;
|
|
333
339
|
return null;
|
|
334
340
|
}
|
|
335
341
|
export async function dispatchCodexHook(payload, cwdOverride) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longtable/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Researcher-facing LongTable CLI",
|
|
6
6
|
"type": "module",
|
|
@@ -29,12 +29,12 @@
|
|
|
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/setup": "0.1.
|
|
32
|
+
"@longtable/checkpoints": "0.1.38",
|
|
33
|
+
"@longtable/core": "0.1.38",
|
|
34
|
+
"@longtable/memory": "0.1.38",
|
|
35
|
+
"@longtable/provider-claude": "0.1.38",
|
|
36
|
+
"@longtable/provider-codex": "0.1.38",
|
|
37
|
+
"@longtable/setup": "0.1.38"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.1",
|