@yachiyo-5i/xlyra-agent 0.2.0

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/index.js ADDED
@@ -0,0 +1,145 @@
1
+ import {
2
+ APPROX_BYTES_PER_TOKEN,
3
+ AgentRunRecorder,
4
+ AgentRunner,
5
+ AgentSessionStore,
6
+ AnthropicMessagesProtocol,
7
+ COMPACT_PROMPT,
8
+ COMPACT_TRIGGER_RATIO,
9
+ EndpointResolver,
10
+ HttpError,
11
+ LlmError,
12
+ OpenAIResponsesProtocol,
13
+ PREVIEW_MAX_CHARS,
14
+ ProcessManager,
15
+ RETAINED_USER_TOKEN_BUDGET,
16
+ RunRegistry,
17
+ SESSION_FORMAT_VERSION,
18
+ SUMMARY_PREFIX,
19
+ SessionIndex,
20
+ TERMINAL_EVENT_TYPES,
21
+ ToolCallBuffer,
22
+ addUsage,
23
+ agentCompactionSchema,
24
+ agentDoneSchema,
25
+ agentEscalationSchema,
26
+ agentEventSchema,
27
+ agentStartParamsSchema,
28
+ agentToolResultSchema,
29
+ buildAvailableToolsPrompt,
30
+ buildReplacementHistory,
31
+ buildSystemPrompt,
32
+ builtinContextWindow,
33
+ builtinTools,
34
+ chatMessageSchema,
35
+ compact,
36
+ configExists,
37
+ createAgentRoutes,
38
+ createAgentServer,
39
+ defaultConfigPath,
40
+ defaultDataDir,
41
+ defaultSessionsDir,
42
+ emptyUsage,
43
+ estimateTokens,
44
+ formatProcessResult,
45
+ isCompactionEntry,
46
+ isEscalationEntry,
47
+ isMessageEntry,
48
+ isSummaryMessage,
49
+ loadConfig,
50
+ makeApplyPatchTool,
51
+ makeCreateTool,
52
+ makeEditTool,
53
+ makeExecCommandTool,
54
+ makeListTool,
55
+ makeReadTool,
56
+ makeSearchTool,
57
+ makeWriteStdinTool,
58
+ makeWriteTool,
59
+ messageText,
60
+ modelSettingsSchema,
61
+ parseSse,
62
+ removeEndpoint,
63
+ resolveSandboxed,
64
+ responseToMessage,
65
+ saveConfig,
66
+ serveFromConfig,
67
+ shouldCompact,
68
+ tokenUsageSchema,
69
+ toolCallSchema,
70
+ upsertEndpoint,
71
+ validateToolCall
72
+ } from "./chunk-QH6SEOO6.js";
73
+ export {
74
+ APPROX_BYTES_PER_TOKEN,
75
+ AgentRunRecorder,
76
+ AgentRunner,
77
+ AgentSessionStore,
78
+ AnthropicMessagesProtocol,
79
+ COMPACT_PROMPT,
80
+ COMPACT_TRIGGER_RATIO,
81
+ EndpointResolver,
82
+ HttpError,
83
+ LlmError,
84
+ OpenAIResponsesProtocol,
85
+ PREVIEW_MAX_CHARS,
86
+ ProcessManager,
87
+ RETAINED_USER_TOKEN_BUDGET,
88
+ RunRegistry,
89
+ SESSION_FORMAT_VERSION,
90
+ SUMMARY_PREFIX,
91
+ SessionIndex,
92
+ TERMINAL_EVENT_TYPES,
93
+ ToolCallBuffer,
94
+ addUsage,
95
+ agentCompactionSchema,
96
+ agentDoneSchema,
97
+ agentEscalationSchema,
98
+ agentEventSchema,
99
+ agentStartParamsSchema,
100
+ agentToolResultSchema,
101
+ buildAvailableToolsPrompt,
102
+ buildReplacementHistory,
103
+ buildSystemPrompt,
104
+ builtinContextWindow,
105
+ builtinTools,
106
+ chatMessageSchema,
107
+ compact,
108
+ configExists,
109
+ createAgentRoutes,
110
+ createAgentServer,
111
+ defaultConfigPath,
112
+ defaultDataDir,
113
+ defaultSessionsDir,
114
+ emptyUsage,
115
+ estimateTokens,
116
+ formatProcessResult,
117
+ isCompactionEntry,
118
+ isEscalationEntry,
119
+ isMessageEntry,
120
+ isSummaryMessage,
121
+ loadConfig,
122
+ makeApplyPatchTool,
123
+ makeCreateTool,
124
+ makeEditTool,
125
+ makeExecCommandTool,
126
+ makeListTool,
127
+ makeReadTool,
128
+ makeSearchTool,
129
+ makeWriteStdinTool,
130
+ makeWriteTool,
131
+ messageText,
132
+ modelSettingsSchema,
133
+ parseSse,
134
+ removeEndpoint,
135
+ resolveSandboxed,
136
+ responseToMessage,
137
+ saveConfig,
138
+ serveFromConfig,
139
+ shouldCompact,
140
+ tokenUsageSchema,
141
+ toolCallSchema,
142
+ upsertEndpoint,
143
+ validateToolCall
144
+ };
145
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@yachiyo-5i/xlyra-agent",
3
+ "version": "0.2.0",
4
+ "description": "通用对话式 Agent 执行引擎:OpenAI Responses / Anthropic Messages 双协议 + Agent loop + 文件工具 + 可选 REST/SSE 服务层",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/Yachiyo-5i/xLyra-agent.git"
8
+ },
9
+ "homepage": "https://github.com/Yachiyo-5i/xLyra-agent#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/Yachiyo-5i/xLyra-agent/issues"
12
+ },
13
+ "type": "module",
14
+ "license": "AGPL-3.0-only",
15
+ "packageManager": "pnpm@11.22.0",
16
+ "engines": {
17
+ "node": ">=22"
18
+ },
19
+ "main": "./dist/index.cjs",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js",
26
+ "require": "./dist/index.cjs"
27
+ }
28
+ },
29
+ "bin": {
30
+ "xlyra": "dist/cli.js"
31
+ },
32
+ "files": [
33
+ "dist"
34
+ ],
35
+ "scripts": {
36
+ "build": "tsup",
37
+ "pack:check": "npm pack --dry-run",
38
+ "prepublishOnly": "npm run typecheck && npm test && npm run build",
39
+ "build:bin": "pnpm build:bin:win",
40
+ "build:bin:win": "pnpm build && node -e \"require('fs').mkdirSync('dist/bin',{recursive:true})\" && bun build src/cli.ts --compile --outfile dist/bin/xlyra-agent.exe && node -e \"console.log('✓ 二进制:dist/bin/xlyra-agent.exe')\"",
41
+ "install:local": "pnpm install:local:win",
42
+ "install:local:win": "pnpm build:bin:win && node scripts/install-windows.mjs",
43
+ "typecheck": "tsc --noEmit",
44
+ "test": "vitest run",
45
+ "test:smoke": "set XLYRA_SMOKE=1&& vitest run tests/e2e/e2e.test.ts",
46
+ "test:watch": "vitest",
47
+ "dev:serve": "tsx src/cli.ts serve",
48
+ "start": "node dist/cli.js serve"
49
+ },
50
+ "dependencies": {
51
+ "@hono/node-server": "^1.14.0",
52
+ "hono": "^4.7.0",
53
+ "zod": "^4.0.0"
54
+ },
55
+ "devDependencies": {
56
+ "@types/node": "^22.10.0",
57
+ "tsup": "^8.3.0",
58
+ "tsx": "^4.19.0",
59
+ "typescript": "^5.7.0",
60
+ "vitest": "^3.0.0",
61
+ "ws": "^8.21.3"
62
+ }
63
+ }