@ordewell/core 0.4.19 → 0.4.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/dist/{ITerminalRunner-C-HlFxuS.d.mts → ITerminalRunner-CuNYBnqK.d.mts} +10 -0
- package/dist/{ITerminalRunner-BVU7TfT3.d.ts → ITerminalRunner-Da1gIAFX.d.ts} +10 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/package.json +1 -1
|
@@ -247,6 +247,14 @@ interface PluginRunnerDef {
|
|
|
247
247
|
env?: Record<string, string>;
|
|
248
248
|
/** When true, the runner requires a PTY. HeadlessRunner wraps with `script` to allocate one. */
|
|
249
249
|
requiresTty?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* True when this runner's interactive prompt flag (e.g. opencode's
|
|
252
|
+
* `--prompt`) only pre-fills its TUI's composer instead of running it, so a
|
|
253
|
+
* surface driving that TUI unattended must send an explicit Enter after
|
|
254
|
+
* launch. Only takes effect while the resolved invocation is interactive —
|
|
255
|
+
* see `RunnerInvocation.submitPromptKey`.
|
|
256
|
+
*/
|
|
257
|
+
submitPromptKey?: boolean;
|
|
250
258
|
}
|
|
251
259
|
interface PluginFeatures {
|
|
252
260
|
modelSelection: boolean;
|
|
@@ -390,6 +398,8 @@ interface RunnerInvocation {
|
|
|
390
398
|
args: string[];
|
|
391
399
|
env: Record<string, string>;
|
|
392
400
|
promptInArgs: boolean;
|
|
401
|
+
/** True when a surface running this invocation on a real TTY must send an explicit Enter once the process starts. */
|
|
402
|
+
submitPromptKey: boolean;
|
|
393
403
|
}
|
|
394
404
|
/**
|
|
395
405
|
* Persistent storage seam for plugin manifests. The RunnerRegistry delegates
|
|
@@ -247,6 +247,14 @@ interface PluginRunnerDef {
|
|
|
247
247
|
env?: Record<string, string>;
|
|
248
248
|
/** When true, the runner requires a PTY. HeadlessRunner wraps with `script` to allocate one. */
|
|
249
249
|
requiresTty?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* True when this runner's interactive prompt flag (e.g. opencode's
|
|
252
|
+
* `--prompt`) only pre-fills its TUI's composer instead of running it, so a
|
|
253
|
+
* surface driving that TUI unattended must send an explicit Enter after
|
|
254
|
+
* launch. Only takes effect while the resolved invocation is interactive —
|
|
255
|
+
* see `RunnerInvocation.submitPromptKey`.
|
|
256
|
+
*/
|
|
257
|
+
submitPromptKey?: boolean;
|
|
250
258
|
}
|
|
251
259
|
interface PluginFeatures {
|
|
252
260
|
modelSelection: boolean;
|
|
@@ -390,6 +398,8 @@ interface RunnerInvocation {
|
|
|
390
398
|
args: string[];
|
|
391
399
|
env: Record<string, string>;
|
|
392
400
|
promptInArgs: boolean;
|
|
401
|
+
/** True when a surface running this invocation on a real TTY must send an explicit Enter once the process starts. */
|
|
402
|
+
submitPromptKey: boolean;
|
|
393
403
|
}
|
|
394
404
|
/**
|
|
395
405
|
* Persistent storage seam for plugin manifests. The RunnerRegistry delegates
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h as RunnerId, c as PlanStatus, L as LegacyPlanState, a as DiscoveredModel, T as Task, d as ResearchProgress, R as ResearchLogEntry, C as ConversationMessage, n as TaskSnapshot, Q as QueuedMessage, A as ActiveTaskSession, g as ResearchToolType, b as PlanState, v as Verdict } from './Task-4rDGr8Su.mjs';
|
|
2
2
|
export { D as DiscoveredMode, M as Message, P as PlanModificationWarnings, e as ResearchStep, f as ResearchStepOutcome, S as StreamEvent, i as StreamStepEvent, j as StreamThinkingEvent, k as TaskMode, l as TaskModelAssignment, m as TaskOutputSummary, o as TaskStatus, p as TaskType, q as TaskWithParent, r as ThinkingBlock, U as UserPromptEntry, s as UserStep, V as ValidationCheck, t as ValidationContext, u as ValidationResult, w as VerificationCheck, x as addTaskToPlan, y as createEmptyPlan, z as createTask, B as emptyWarnings, E as flattenTasks, F as flattenTasksWithParents, G as migrateLegacyPlan, H as migratePlanState, I as migrateTask, J as removeTaskFromPlan, K as renumberTasks, N as updateTaskInPlan, O as validateModifiedPlan, W as warningsText } from './Task-4rDGr8Su.mjs';
|
|
3
|
-
import { f as IFileSystem, R as ReadFileOpts, T as ToolOutcome, d as GrepOptions, c as GlobOptions, b as FindSymbolOptions, I as IConfig, A as AiProvider, r as ProviderModelLists, i as ITerminalSession, h as ITerminalRunner, w as RunnerRegistry, k as OrchestratorOption, u as RunnerInvocation, g as IPluginStore, v as RunnerPluginManifest, t as ResolveContext } from './ITerminalRunner-
|
|
4
|
-
export { a as AllProviderModels, C as CatalogModel, D as DiscoveryCommand, F as FetchAllProviderModelsOptions, G as GREP_DEFAULT_HEAD_LIMIT, e as GrepOutputMode, M as ModelCatalog, j as ModelShortcut, O as ORCHESTRATOR_SHORTCUTS, P as PluginCloneFn, l as PluginEntry, m as PluginFeatures, n as PluginMode, o as PluginModelDiscovery, p as PluginRunnerDef, q as ProviderCredentialSource, s as ProviderModelsResult, S as SEARCH_EXCLUSIONS, x as collectProviderCredentials, y as enabledRunners, z as fetchAllProviderModels, B as isReservedRunnerName, E as knownModelId, H as resolveModelShortcut, J as resolveProvider, K as toOrchestratorOptions } from './ITerminalRunner-
|
|
3
|
+
import { f as IFileSystem, R as ReadFileOpts, T as ToolOutcome, d as GrepOptions, c as GlobOptions, b as FindSymbolOptions, I as IConfig, A as AiProvider, r as ProviderModelLists, i as ITerminalSession, h as ITerminalRunner, w as RunnerRegistry, k as OrchestratorOption, u as RunnerInvocation, g as IPluginStore, v as RunnerPluginManifest, t as ResolveContext } from './ITerminalRunner-CuNYBnqK.mjs';
|
|
4
|
+
export { a as AllProviderModels, C as CatalogModel, D as DiscoveryCommand, F as FetchAllProviderModelsOptions, G as GREP_DEFAULT_HEAD_LIMIT, e as GrepOutputMode, M as ModelCatalog, j as ModelShortcut, O as ORCHESTRATOR_SHORTCUTS, P as PluginCloneFn, l as PluginEntry, m as PluginFeatures, n as PluginMode, o as PluginModelDiscovery, p as PluginRunnerDef, q as ProviderCredentialSource, s as ProviderModelsResult, S as SEARCH_EXCLUSIONS, x as collectProviderCredentials, y as enabledRunners, z as fetchAllProviderModels, B as isReservedRunnerName, E as knownModelId, H as resolveModelShortcut, J as resolveProvider, K as toOrchestratorOptions } from './ITerminalRunner-CuNYBnqK.mjs';
|
|
5
5
|
import { I as IApproval, d as ApprovalRequest, a as ApprovalMode } from './ApprovalPolicy-BVhGdECT.mjs';
|
|
6
6
|
export { A as ApprovalKind, b as ApprovalPolicy, c as ApprovalPolicyOptions, e as ApprovalSource, D as DENY_ALL } from './ApprovalPolicy-BVhGdECT.mjs';
|
|
7
7
|
import { R as RunnerModeInfo } from './ModeResolver-mtIWrLXn.mjs';
|
|
@@ -959,6 +959,8 @@ interface PreparedLaunch {
|
|
|
959
959
|
env: Record<string, string>;
|
|
960
960
|
/** True when the invocation was wrapped in `script` to allocate a PTY. */
|
|
961
961
|
pty: boolean;
|
|
962
|
+
/** True when the started process needs an explicit Enter sent to submit its pre-filled prompt. */
|
|
963
|
+
submitPromptKey: boolean;
|
|
962
964
|
}
|
|
963
965
|
declare class HeadlessRunner extends AbstractRunner<HeadlessSession> {
|
|
964
966
|
private spawnImpl;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h as RunnerId, c as PlanStatus, L as LegacyPlanState, a as DiscoveredModel, T as Task, d as ResearchProgress, R as ResearchLogEntry, C as ConversationMessage, n as TaskSnapshot, Q as QueuedMessage, A as ActiveTaskSession, g as ResearchToolType, b as PlanState, v as Verdict } from './Task-4rDGr8Su.js';
|
|
2
2
|
export { D as DiscoveredMode, M as Message, P as PlanModificationWarnings, e as ResearchStep, f as ResearchStepOutcome, S as StreamEvent, i as StreamStepEvent, j as StreamThinkingEvent, k as TaskMode, l as TaskModelAssignment, m as TaskOutputSummary, o as TaskStatus, p as TaskType, q as TaskWithParent, r as ThinkingBlock, U as UserPromptEntry, s as UserStep, V as ValidationCheck, t as ValidationContext, u as ValidationResult, w as VerificationCheck, x as addTaskToPlan, y as createEmptyPlan, z as createTask, B as emptyWarnings, E as flattenTasks, F as flattenTasksWithParents, G as migrateLegacyPlan, H as migratePlanState, I as migrateTask, J as removeTaskFromPlan, K as renumberTasks, N as updateTaskInPlan, O as validateModifiedPlan, W as warningsText } from './Task-4rDGr8Su.js';
|
|
3
|
-
import { f as IFileSystem, R as ReadFileOpts, T as ToolOutcome, d as GrepOptions, c as GlobOptions, b as FindSymbolOptions, I as IConfig, A as AiProvider, r as ProviderModelLists, i as ITerminalSession, h as ITerminalRunner, w as RunnerRegistry, k as OrchestratorOption, u as RunnerInvocation, g as IPluginStore, v as RunnerPluginManifest, t as ResolveContext } from './ITerminalRunner-
|
|
4
|
-
export { a as AllProviderModels, C as CatalogModel, D as DiscoveryCommand, F as FetchAllProviderModelsOptions, G as GREP_DEFAULT_HEAD_LIMIT, e as GrepOutputMode, M as ModelCatalog, j as ModelShortcut, O as ORCHESTRATOR_SHORTCUTS, P as PluginCloneFn, l as PluginEntry, m as PluginFeatures, n as PluginMode, o as PluginModelDiscovery, p as PluginRunnerDef, q as ProviderCredentialSource, s as ProviderModelsResult, S as SEARCH_EXCLUSIONS, x as collectProviderCredentials, y as enabledRunners, z as fetchAllProviderModels, B as isReservedRunnerName, E as knownModelId, H as resolveModelShortcut, J as resolveProvider, K as toOrchestratorOptions } from './ITerminalRunner-
|
|
3
|
+
import { f as IFileSystem, R as ReadFileOpts, T as ToolOutcome, d as GrepOptions, c as GlobOptions, b as FindSymbolOptions, I as IConfig, A as AiProvider, r as ProviderModelLists, i as ITerminalSession, h as ITerminalRunner, w as RunnerRegistry, k as OrchestratorOption, u as RunnerInvocation, g as IPluginStore, v as RunnerPluginManifest, t as ResolveContext } from './ITerminalRunner-Da1gIAFX.js';
|
|
4
|
+
export { a as AllProviderModels, C as CatalogModel, D as DiscoveryCommand, F as FetchAllProviderModelsOptions, G as GREP_DEFAULT_HEAD_LIMIT, e as GrepOutputMode, M as ModelCatalog, j as ModelShortcut, O as ORCHESTRATOR_SHORTCUTS, P as PluginCloneFn, l as PluginEntry, m as PluginFeatures, n as PluginMode, o as PluginModelDiscovery, p as PluginRunnerDef, q as ProviderCredentialSource, s as ProviderModelsResult, S as SEARCH_EXCLUSIONS, x as collectProviderCredentials, y as enabledRunners, z as fetchAllProviderModels, B as isReservedRunnerName, E as knownModelId, H as resolveModelShortcut, J as resolveProvider, K as toOrchestratorOptions } from './ITerminalRunner-Da1gIAFX.js';
|
|
5
5
|
import { I as IApproval, d as ApprovalRequest, a as ApprovalMode } from './ApprovalPolicy-BVhGdECT.js';
|
|
6
6
|
export { A as ApprovalKind, b as ApprovalPolicy, c as ApprovalPolicyOptions, e as ApprovalSource, D as DENY_ALL } from './ApprovalPolicy-BVhGdECT.js';
|
|
7
7
|
import { R as RunnerModeInfo } from './ModeResolver-Ob-ihQbI.js';
|
|
@@ -959,6 +959,8 @@ interface PreparedLaunch {
|
|
|
959
959
|
env: Record<string, string>;
|
|
960
960
|
/** True when the invocation was wrapped in `script` to allocate a PTY. */
|
|
961
961
|
pty: boolean;
|
|
962
|
+
/** True when the started process needs an explicit Enter sent to submit its pre-filled prompt. */
|
|
963
|
+
submitPromptKey: boolean;
|
|
962
964
|
}
|
|
963
965
|
declare class HeadlessRunner extends AbstractRunner<HeadlessSession> {
|
|
964
966
|
private spawnImpl;
|
package/dist/index.js
CHANGED
|
@@ -14402,7 +14402,8 @@ function resolveArgs(manifest, ctx) {
|
|
|
14402
14402
|
command: manifest.runner.command,
|
|
14403
14403
|
args,
|
|
14404
14404
|
env,
|
|
14405
|
-
promptInArgs: manifest.runner.promptInArgs
|
|
14405
|
+
promptInArgs: manifest.runner.promptInArgs,
|
|
14406
|
+
submitPromptKey: manifest.runner.submitPromptKey === true && isInteractive(ctx)
|
|
14406
14407
|
};
|
|
14407
14408
|
}
|
|
14408
14409
|
function parseBlockOpen(raw) {
|
|
@@ -14756,7 +14757,8 @@ var HeadlessRunner = class extends AbstractRunner {
|
|
|
14756
14757
|
launch: await planDirectLaunch(command, args, this.launchDeps),
|
|
14757
14758
|
resolvedPath,
|
|
14758
14759
|
env: invocation.env,
|
|
14759
|
-
pty
|
|
14760
|
+
pty,
|
|
14761
|
+
submitPromptKey: invocation.submitPromptKey
|
|
14760
14762
|
};
|
|
14761
14763
|
}
|
|
14762
14764
|
async spawn(opts) {
|
|
@@ -14766,6 +14768,7 @@ var HeadlessRunner = class extends AbstractRunner {
|
|
|
14766
14768
|
const modeStr = opts.mode === "plan" ? "plan" : "build";
|
|
14767
14769
|
console.error(`[headless] Starting ${opts.runner} [${modeStr}] (${opts.modelId || "default"}) for task ${opts.taskId.slice(0, 8)}${prepared.pty ? " (PTY)" : ""}`);
|
|
14768
14770
|
session.start(prepared.launch, opts.cwd, prepared.resolvedPath, prepared.env);
|
|
14771
|
+
if (prepared.submitPromptKey) session.write("\r");
|
|
14769
14772
|
this.registerSession(id, session);
|
|
14770
14773
|
return session;
|
|
14771
14774
|
}
|
|
@@ -15067,6 +15070,7 @@ var TmuxRunner = class extends AbstractRunner {
|
|
|
15067
15070
|
);
|
|
15068
15071
|
invocation.env = { ...invocation.env, PATH: await this.resolvePath() };
|
|
15069
15072
|
await session.start(invocation.command, invocation.args, opts.cwd, invocation.env);
|
|
15073
|
+
if (invocation.submitPromptKey) session.write("\r");
|
|
15070
15074
|
this.registerSession(id, session);
|
|
15071
15075
|
return session;
|
|
15072
15076
|
}
|
|
@@ -15535,7 +15539,12 @@ var OPENCODE_MANIFEST = {
|
|
|
15535
15539
|
OPENCODE_CONFIG_CONTENT: "{{if interactiveVariant}}{{opencodeVariantConfig}}{{/if}}"
|
|
15536
15540
|
},
|
|
15537
15541
|
promptInArgs: true,
|
|
15538
|
-
requiresTty: true
|
|
15542
|
+
requiresTty: true,
|
|
15543
|
+
// `--prompt` only pre-fills the TUI's composer; it does not submit it.
|
|
15544
|
+
// (`opencode run` — the headless subcommand — has no such gap: its
|
|
15545
|
+
// message is a positional arg that runs immediately.) An unattended
|
|
15546
|
+
// surface driving the TUI must press Enter itself.
|
|
15547
|
+
submitPromptKey: true
|
|
15539
15548
|
},
|
|
15540
15549
|
features: {
|
|
15541
15550
|
modelSelection: true,
|