openhorse 0.2.8 → 0.2.9
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 +2 -2
- package/README.zh-CN.md +10 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +9 -16
- package/dist/cli.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +20 -24
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/types.d.ts +7 -28
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/types.js.map +1 -1
- package/dist/ink-ui/App.d.ts +2 -2
- package/dist/ink-ui/App.d.ts.map +1 -1
- package/dist/ink-ui/components/PixelHorseBanner.d.ts +2 -2
- package/dist/ink-ui/components/PixelHorseBanner.d.ts.map +1 -1
- package/dist/ink-ui/components/StatusLine.d.ts +2 -2
- package/dist/ink-ui/components/StatusLine.d.ts.map +1 -1
- package/dist/ink-ui/launch.d.ts +2 -2
- package/dist/ink-ui/launch.d.ts.map +1 -1
- package/dist/ink-ui/launch.js.map +1 -1
- package/dist/ink-ui/screens/ReplScreen.d.ts +2 -2
- package/dist/ink-ui/screens/ReplScreen.d.ts.map +1 -1
- package/dist/ink-ui/screens/ReplScreen.js +4 -2
- package/dist/ink-ui/screens/ReplScreen.js.map +1 -1
- package/dist/print-ui/launch.d.ts +44 -2
- package/dist/print-ui/launch.d.ts.map +1 -1
- package/dist/print-ui/launch.js +12 -0
- package/dist/print-ui/launch.js.map +1 -1
- package/dist/runtime/agent-runtime-controller.d.ts +3 -1
- package/dist/runtime/agent-runtime-controller.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-controller.js +12 -1
- package/dist/runtime/agent-runtime-controller.js.map +1 -1
- package/dist/runtime/agent-runtime-protocol.d.ts +7 -1
- package/dist/runtime/agent-runtime-protocol.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-protocol.js +12 -0
- package/dist/runtime/agent-runtime-protocol.js.map +1 -1
- package/dist/runtime/chat-controller.d.ts +4 -1
- package/dist/runtime/chat-controller.d.ts.map +1 -1
- package/dist/runtime/chat-controller.js +16 -0
- package/dist/runtime/chat-controller.js.map +1 -1
- package/dist/runtime/ui-events.d.ts +29 -2
- package/dist/runtime/ui-events.d.ts.map +1 -1
- package/dist/runtime/ui-events.js +34 -0
- package/dist/runtime/ui-events.js.map +1 -1
- package/dist/services/config.d.ts +9 -2
- package/dist/services/config.d.ts.map +1 -1
- package/dist/services/config.js +22 -7
- package/dist/services/config.js.map +1 -1
- package/dist/services/doctor.d.ts.map +1 -1
- package/dist/services/doctor.js +3 -4
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/format.d.ts +2 -0
- package/dist/services/format.d.ts.map +1 -0
- package/dist/services/format.js +20 -0
- package/dist/services/format.js.map +1 -0
- package/dist/services/global-config.d.ts +3 -3
- package/dist/services/global-config.d.ts.map +1 -1
- package/dist/services/storage-maintenance.d.ts.map +1 -1
- package/dist/services/storage-maintenance.js +3 -9
- package/dist/services/storage-maintenance.js.map +1 -1
- package/dist/terminal-ui/launch.d.ts +30 -2
- package/dist/terminal-ui/launch.d.ts.map +1 -1
- package/dist/terminal-ui/launch.js +6 -14
- package/dist/terminal-ui/launch.js.map +1 -1
- package/dist/tui-ui/launch.d.ts +2 -2
- package/dist/tui-ui/launch.d.ts.map +1 -1
- package/dist/tui-ui/launch.js +2 -0
- package/dist/tui-ui/launch.js.map +1 -1
- package/dist/tui-ui/layout.d.ts.map +1 -1
- package/dist/tui-ui/layout.js +2 -13
- package/dist/tui-ui/layout.js.map +1 -1
- package/dist/tui-ui/state.d.ts +13 -1
- package/dist/tui-ui/state.d.ts.map +1 -1
- package/dist/tui-ui/state.js +13 -0
- package/dist/tui-ui/state.js.map +1 -1
- package/dist/ui/command-panel.d.ts +1 -1
- package/dist/ui/command-panel.d.ts.map +1 -1
- package/dist/ui/command-panel.js +37 -34
- package/dist/ui/command-panel.js.map +1 -1
- package/dist/ui/file-completion.d.ts +1 -1
- package/dist/ui/file-completion.d.ts.map +1 -1
- package/dist/ui/file-completion.js +4 -4
- package/dist/ui/file-completion.js.map +1 -1
- package/dist/ui/shared/command-palette.d.ts +3 -0
- package/dist/ui/shared/command-palette.d.ts.map +1 -0
- package/dist/ui/shared/command-palette.js +54 -0
- package/dist/ui/shared/command-palette.js.map +1 -0
- package/dist/ui/shared/command-suggestions.d.ts +19 -0
- package/dist/ui/shared/command-suggestions.d.ts.map +1 -0
- package/dist/ui/shared/command-suggestions.js +67 -0
- package/dist/ui/shared/command-suggestions.js.map +1 -0
- package/dist/ui/shared/input-frame.d.ts +19 -0
- package/dist/ui/shared/input-frame.d.ts.map +1 -0
- package/dist/ui/shared/input-frame.js +74 -0
- package/dist/ui/shared/input-frame.js.map +1 -0
- package/dist/ui/shared/text.d.ts +5 -0
- package/dist/ui/shared/text.d.ts.map +1 -0
- package/dist/ui/shared/text.js +55 -0
- package/dist/ui/shared/text.js.map +1 -0
- package/dist/ui/shared/types.d.ts +27 -0
- package/dist/ui/shared/types.d.ts.map +1 -0
- package/dist/ui/shared/types.js +3 -0
- package/dist/ui/shared/types.js.map +1 -0
- package/dist/ui/user-input.js +2 -2
- package/dist/ui/user-input.js.map +1 -1
- package/dist/ui-v2/components/command-palette.d.ts +1 -5
- package/dist/ui-v2/components/command-palette.d.ts.map +1 -1
- package/dist/ui-v2/components/command-palette.js +15 -54
- package/dist/ui-v2/components/command-palette.js.map +1 -1
- package/dist/ui-v2/components/shell.d.ts +1 -14
- package/dist/ui-v2/components/shell.d.ts.map +1 -1
- package/dist/ui-v2/components/shell.js +4 -55
- package/dist/ui-v2/components/shell.js.map +1 -1
- package/dist/ui-v2/runtime/text.d.ts +1 -7
- package/dist/ui-v2/runtime/text.d.ts.map +1 -1
- package/dist/ui-v2/runtime/text.js +15 -55
- package/dist/ui-v2/runtime/text.js.map +1 -1
- package/dist/ui-v2/state/sessions.d.ts +1 -1
- package/dist/ui-v2/state/sessions.d.ts.map +1 -1
- package/dist/ui-v2/state/sessions.js +5 -18
- package/dist/ui-v2/state/sessions.js.map +1 -1
- package/dist/ui-v2/state/suggestions.d.ts +1 -21
- package/dist/ui-v2/state/suggestions.d.ts.map +1 -1
- package/dist/ui-v2/state/suggestions.js +15 -67
- package/dist/ui-v2/state/suggestions.js.map +1 -1
- package/dist/ui-v2/types.d.ts +1 -32
- package/dist/ui-v2/types.d.ts.map +1 -1
- package/dist/ui-v2/types.js +15 -6
- package/dist/ui-v2/types.js.map +1 -1
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../../src/ui-v2/state/suggestions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../../src/ui-v2/state/suggestions.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -1,70 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
exports.buildCommandSuggestions = buildCommandSuggestions;
|
|
8
|
-
exports.commandToSuggestion = commandToSuggestion;
|
|
9
|
-
exports.DEFAULT_COMMAND_LIMIT = 8;
|
|
10
|
-
exports.FILTERED_COMMAND_LIMIT = 6;
|
|
11
|
-
function buildCommandSuggestions(commands, query = '', options = {}) {
|
|
12
|
-
const normalizedQuery = normalizeQuery(query);
|
|
13
|
-
const defaultLimit = options.defaultLimit ?? exports.DEFAULT_COMMAND_LIMIT;
|
|
14
|
-
const filteredLimit = options.filteredLimit ?? exports.FILTERED_COMMAND_LIMIT;
|
|
15
|
-
const limit = normalizedQuery ? filteredLimit : defaultLimit;
|
|
16
|
-
const visibleCommands = commands.filter(cmd => !cmd.isHidden);
|
|
17
|
-
const matches = normalizedQuery
|
|
18
|
-
? visibleCommands
|
|
19
|
-
.filter(cmd => commandMatches(cmd, normalizedQuery))
|
|
20
|
-
.sort((a, b) => commandMatchRank(a, normalizedQuery) - commandMatchRank(b, normalizedQuery))
|
|
21
|
-
: visibleCommands;
|
|
22
|
-
const limitedCommands = matches.slice(0, limit);
|
|
23
|
-
return {
|
|
24
|
-
query: normalizedQuery,
|
|
25
|
-
total: matches.length,
|
|
26
|
-
limit,
|
|
27
|
-
moreCount: Math.max(0, matches.length - limitedCommands.length),
|
|
28
|
-
items: limitedCommands.map(commandToSuggestion),
|
|
29
|
-
commands: limitedCommands,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function commandToSuggestion(command) {
|
|
33
|
-
const shortcut = command.aliases?.[0];
|
|
34
|
-
return {
|
|
35
|
-
id: `command:${command.name}`,
|
|
36
|
-
kind: 'command',
|
|
37
|
-
label: `/${command.name}`,
|
|
38
|
-
detail: command.description,
|
|
39
|
-
shortcut,
|
|
40
|
-
value: `/${command.name}`,
|
|
41
|
-
metadata: {
|
|
42
|
-
argumentHint: command.argumentHint,
|
|
43
|
-
type: command.type,
|
|
44
|
-
aliases: command.aliases ?? [],
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function commandMatches(command, query) {
|
|
49
|
-
const name = command.name.toLowerCase();
|
|
50
|
-
if (name.startsWith(query))
|
|
51
|
-
return true;
|
|
52
|
-
return command.aliases?.some(alias => alias.toLowerCase().startsWith(query)) ?? false;
|
|
53
|
-
}
|
|
54
|
-
function commandMatchRank(command, query) {
|
|
55
|
-
const name = command.name.toLowerCase();
|
|
56
|
-
const aliases = command.aliases?.map(alias => alias.toLowerCase()) ?? [];
|
|
57
|
-
if (name === query)
|
|
58
|
-
return 0;
|
|
59
|
-
if (aliases.some(alias => alias === query))
|
|
60
|
-
return 1;
|
|
61
|
-
if (name.startsWith(query))
|
|
62
|
-
return 2;
|
|
63
|
-
if (aliases.some(alias => alias.startsWith(query)))
|
|
64
|
-
return 3;
|
|
65
|
-
return 4;
|
|
66
|
-
}
|
|
67
|
-
function normalizeQuery(query) {
|
|
68
|
-
return query.trim().replace(/^\//, '').toLowerCase();
|
|
69
|
-
}
|
|
17
|
+
__exportStar(require("../../ui/shared/command-suggestions"), exports);
|
|
70
18
|
//# sourceMappingURL=suggestions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestions.js","sourceRoot":"","sources":["../../../src/ui-v2/state/suggestions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"suggestions.js","sourceRoot":"","sources":["../../../src/ui-v2/state/suggestions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD"}
|
package/dist/ui-v2/types.d.ts
CHANGED
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* OpenHorse UI v2 shared types.
|
|
3
|
-
*
|
|
4
|
-
* The first v2 slice keeps rendering lightweight and state-driven so the
|
|
5
|
-
* legacy REPL can adopt it incrementally before a full Ink renderer lands.
|
|
6
|
-
*/
|
|
7
|
-
export type SuggestionKind = 'command' | 'file' | 'session' | 'model' | 'mcp-resource' | 'skill' | 'edit';
|
|
8
|
-
export interface SuggestionItem {
|
|
9
|
-
id: string;
|
|
10
|
-
kind: SuggestionKind;
|
|
11
|
-
label: string;
|
|
12
|
-
detail?: string;
|
|
13
|
-
shortcut?: string;
|
|
14
|
-
disabledReason?: string;
|
|
15
|
-
value?: string;
|
|
16
|
-
metadata?: Record<string, unknown>;
|
|
17
|
-
}
|
|
18
|
-
export interface PaletteTheme {
|
|
19
|
-
accent: (text: string) => string;
|
|
20
|
-
dim: (text: string) => string;
|
|
21
|
-
selected: (text: string) => string;
|
|
22
|
-
}
|
|
23
|
-
export interface PaletteRenderOptions {
|
|
24
|
-
title: string;
|
|
25
|
-
items: SuggestionItem[];
|
|
26
|
-
selectedIndex: number;
|
|
27
|
-
width: number;
|
|
28
|
-
moreCount?: number;
|
|
29
|
-
footer?: string;
|
|
30
|
-
emptyLabel?: string;
|
|
31
|
-
theme: PaletteTheme;
|
|
32
|
-
}
|
|
1
|
+
export * from '../ui/shared/types';
|
|
33
2
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ui-v2/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ui-v2/types.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
package/dist/ui-v2/types.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
8
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../ui/shared/types"), exports);
|
|
9
18
|
//# sourceMappingURL=types.js.map
|
package/dist/ui-v2/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ui-v2/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ui-v2/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openhorse",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "OpenHorse - Universal Agent Harness Framework. A complete coding CLI agent with tools, MCP, memory system.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -79,7 +79,10 @@
|
|
|
79
79
|
"@types/node": "^20.0.0",
|
|
80
80
|
"@types/react": "^17.0.83",
|
|
81
81
|
"@types/uuid": "^9.0.0",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
83
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
82
84
|
"eslint": "^8.56.0",
|
|
85
|
+
"eslint-config-prettier": "^9.1.2",
|
|
83
86
|
"jest": "^29.7.0",
|
|
84
87
|
"nodemon": "^3.0.0",
|
|
85
88
|
"prettier": "^3.1.0",
|