@ashx-j/lunr 0.1.4 → 0.1.6
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/builtin-extensions/index.d.ts +13 -4
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +30 -21
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-local-providers/index.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-local-providers/index.js +25 -3
- package/dist/builtin-extensions/lunr-local-providers/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-local-providers/local-servers.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-local-providers/local-servers.js +4 -2
- package/dist/builtin-extensions/lunr-local-providers/local-servers.js.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.d.ts +2 -3
- package/dist/builtin-extensions/pi-ollama-cloud/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.js +4 -25
- package/dist/builtin-extensions/pi-ollama-cloud/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +4 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +4 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +20 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
- package/dist/catalog/models.json +1 -1
- package/dist/catalog/providers/amazon-bedrock.json +1 -1
- package/dist/catalog/providers/cloudflare-workers-ai.json +1 -1
- package/dist/catalog/providers/huggingface.json +1 -1
- package/dist/catalog/providers/opencode-go.json +1 -1
- package/dist/catalog/providers/openrouter.json +1 -1
- package/dist/catalog/providers/together.json +1 -1
- package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
- package/dist/catalog/publication.json +3 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +19 -4
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +7 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +9 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +74 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +39 -7
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/catalog-merge.d.ts.map +1 -1
- package/dist/core/catalog-merge.js +4 -1
- package/dist/core/catalog-merge.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +2 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +12 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/grok-cli-auth.d.ts +13 -3
- package/dist/core/grok-cli-auth.d.ts.map +1 -1
- package/dist/core/grok-cli-auth.js +130 -21
- package/dist/core/grok-cli-auth.js.map +1 -1
- package/dist/core/model-runtime.d.ts +9 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +40 -12
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/official-catalog.d.ts +8 -1
- package/dist/core/official-catalog.d.ts.map +1 -1
- package/dist/core/official-catalog.js +38 -11
- package/dist/core/official-catalog.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +28 -4
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/plan-mode.d.ts +2 -0
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +7 -0
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/resource-loader.d.ts +2 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +27 -3
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/subagent-permission-inherit.d.ts +38 -0
- package/dist/core/subagent-permission-inherit.d.ts.map +1 -0
- package/dist/core/subagent-permission-inherit.js +110 -0
- package/dist/core/subagent-permission-inherit.js.map +1 -0
- package/dist/core/usage-service.d.ts.map +1 -1
- package/dist/core/usage-service.js +5 -5
- package/dist/core/usage-service.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +2 -2
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/command.d.ts.map +1 -1
- package/dist/gateway/command.js +2 -1
- package/dist/gateway/command.js.map +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +2 -2
- package/dist/gateway/cron.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +25 -4
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +7 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +35 -8
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -24,6 +24,7 @@ import { applyIncompleteAnswers, describeIncomplete, INCOMPLETE_PROMPT_CAP, pars
|
|
|
24
24
|
import { createCompactionSummaryMessage } from "../../core/messages.js";
|
|
25
25
|
import { isValidProviderBaseUrl, parseModelIds, slugifyProviderId, upsertCustomProvider, } from "../../core/model-config-writer.js";
|
|
26
26
|
import { defaultModelPerProvider, findExactModelReferenceMatch, resolveModelScope } from "../../core/model-resolver.js";
|
|
27
|
+
import { refreshModelCandidatesForInit } from "../../core/model-runtime.js";
|
|
27
28
|
import { getModelTiersBridge } from "../../core/model-tiers.js";
|
|
28
29
|
import { registerPermissionModeBridge } from "../../core/permission-mode.js";
|
|
29
30
|
import { AUTO_MODE_ADDENDUM, getPermissionMode, nextPermissionMode, registerApprovalHandler, resetPermissions, restorePermissionModeAfterPlan, setPermissionMode, } from "../../core/permissions.js";
|
|
@@ -38,6 +39,7 @@ import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
|
38
39
|
import { buildSwarmPrompt } from "../../core/swarm.js";
|
|
39
40
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
40
41
|
import { collectUsageHistory } from "../../core/usage-history.js";
|
|
42
|
+
import { time } from "../../core/timings.js";
|
|
41
43
|
import { getPlanUsageResult } from "../../core/usage-service.js";
|
|
42
44
|
import { modelToUserEntry } from "../../core/user-models.js";
|
|
43
45
|
import { copyToClipboard, readClipboardText } from "../../utils/clipboard.js";
|
|
@@ -45,7 +47,7 @@ import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipb
|
|
|
45
47
|
import { parseGitUrl } from "../../utils/git.js";
|
|
46
48
|
import { getCwdRelativePath } from "../../utils/paths.js";
|
|
47
49
|
import { killTrackedDetachedChildren } from "../../utils/shell.js";
|
|
48
|
-
import { ensureTool } from "../../utils/tools-manager.js";
|
|
50
|
+
import { ensureTool, getToolPath } from "../../utils/tools-manager.js";
|
|
49
51
|
import { ArminComponent } from "./components/armin.js";
|
|
50
52
|
import { AssistantMessageComponent } from "./components/assistant-message.js";
|
|
51
53
|
import { BashExecutionComponent } from "./components/bash-execution.js";
|
|
@@ -318,6 +320,7 @@ export class InteractiveMode {
|
|
|
318
320
|
options;
|
|
319
321
|
autoTrustOnReloadCwd;
|
|
320
322
|
themeController;
|
|
323
|
+
deferredBuiltinsAttached = false;
|
|
321
324
|
// Convenience accessors
|
|
322
325
|
get session() {
|
|
323
326
|
return this.runtimeHost.session;
|
|
@@ -533,10 +536,16 @@ export class InteractiveMode {
|
|
|
533
536
|
if (this.isInitialized)
|
|
534
537
|
return;
|
|
535
538
|
this.registerSignalHandlers();
|
|
536
|
-
//
|
|
537
|
-
//
|
|
538
|
-
|
|
539
|
-
|
|
539
|
+
// Use already-installed fd immediately. Download in the background so a
|
|
540
|
+
// missing binary or GitHub outage cannot block first paint.
|
|
541
|
+
this.fdPath = getToolPath("fd") ?? undefined;
|
|
542
|
+
void Promise.all([ensureTool("fd"), ensureTool("rg")]).then(([fdPath]) => {
|
|
543
|
+
if (fdPath && fdPath !== this.fdPath) {
|
|
544
|
+
this.fdPath = fdPath;
|
|
545
|
+
this.setupAutocompleteProvider();
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
time("ensureTools");
|
|
540
549
|
if (this.session.scopedModels.length > 0 && (this.options.verbose || !this.settingsManager.getQuietStartup())) {
|
|
541
550
|
const modelList = this.session.scopedModels
|
|
542
551
|
.map((sm) => {
|
|
@@ -570,6 +579,7 @@ export class InteractiveMode {
|
|
|
570
579
|
// Start the UI before initializing extensions so session_start handlers can use interactive dialogs
|
|
571
580
|
this.ui.start();
|
|
572
581
|
this.isInitialized = true;
|
|
582
|
+
time("ui.start");
|
|
573
583
|
// lunr: register the permission approval dialog handler so manual mode can prompt.
|
|
574
584
|
registerApprovalHandler(async (req) => {
|
|
575
585
|
// lunr: auto-activated agent swarms get their own dialog; on approval the
|
|
@@ -618,6 +628,9 @@ export class InteractiveMode {
|
|
|
618
628
|
this.ui.requestRender();
|
|
619
629
|
// Initialize extensions first so resources are shown before messages
|
|
620
630
|
await this.rebindCurrentSession();
|
|
631
|
+
time("rebindCurrentSession");
|
|
632
|
+
await this.attachDeferredBuiltinExtensions();
|
|
633
|
+
time("attachDeferredBuiltins");
|
|
621
634
|
// Render initial messages AFTER showing loaded resources
|
|
622
635
|
this.renderInitialMessages();
|
|
623
636
|
// Set up theme file watcher
|
|
@@ -632,6 +645,7 @@ export class InteractiveMode {
|
|
|
632
645
|
});
|
|
633
646
|
// Initialize available provider count for footer display
|
|
634
647
|
await this.updateAvailableProviderCount();
|
|
648
|
+
time("updateAvailableProviderCount");
|
|
635
649
|
}
|
|
636
650
|
/**
|
|
637
651
|
* Update terminal title with session name and cwd.
|
|
@@ -1189,6 +1203,20 @@ export class InteractiveMode {
|
|
|
1189
1203
|
/**
|
|
1190
1204
|
* Initialize the extension system with TUI-based UI context.
|
|
1191
1205
|
*/
|
|
1206
|
+
async attachDeferredBuiltinExtensions() {
|
|
1207
|
+
if (this.deferredBuiltinsAttached || !this.options.deferredBuiltinFactories) {
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1210
|
+
this.deferredBuiltinsAttached = true;
|
|
1211
|
+
const factories = await this.options.deferredBuiltinFactories();
|
|
1212
|
+
if (factories.length === 0)
|
|
1213
|
+
return;
|
|
1214
|
+
this.options.onDeferredBuiltinsAttached?.(factories);
|
|
1215
|
+
await this.session.attachInlineExtensions(factories);
|
|
1216
|
+
this.setupAutocompleteProvider();
|
|
1217
|
+
this.setupExtensionShortcuts(this.session.extensionRunner);
|
|
1218
|
+
this.showLoadedResources({ force: false, showDiagnosticsWhenQuiet: true });
|
|
1219
|
+
}
|
|
1192
1220
|
async bindCurrentSessionExtensions() {
|
|
1193
1221
|
const uiContext = this.createExtensionUIContext();
|
|
1194
1222
|
await this.session.bindExtensions({
|
|
@@ -3974,7 +4002,7 @@ export class InteractiveMode {
|
|
|
3974
4002
|
let ollama;
|
|
3975
4003
|
const runner = this.session.extensionRunner;
|
|
3976
4004
|
const cloudRefresh = globalThis[Symbol.for("@lunr/ollama-cloud-refresh")];
|
|
3977
|
-
if (cloudRefresh) {
|
|
4005
|
+
if (cloudRefresh && allowNetwork) {
|
|
3978
4006
|
try {
|
|
3979
4007
|
await cloudRefresh({ ui: runner.createCommandContext().ui });
|
|
3980
4008
|
}
|
|
@@ -4055,8 +4083,7 @@ export class InteractiveMode {
|
|
|
4055
4083
|
return this.session.scopedModels.map((scoped) => scoped.model);
|
|
4056
4084
|
}
|
|
4057
4085
|
try {
|
|
4058
|
-
await this.session.modelRuntime
|
|
4059
|
-
return [...(await this.session.modelRuntime.getAvailable())];
|
|
4086
|
+
return [...(await refreshModelCandidatesForInit(this.session.modelRuntime))];
|
|
4060
4087
|
}
|
|
4061
4088
|
catch {
|
|
4062
4089
|
return [];
|