neoctl 0.1.19 → 0.1.21

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.
Files changed (120) hide show
  1. package/dist/agents/local-agent-task.js +2 -1
  2. package/dist/agents/local-agent-task.js.map +1 -1
  3. package/dist/agents/smoke-agents.js +21 -4
  4. package/dist/agents/smoke-agents.js.map +1 -1
  5. package/dist/context/prompts.js +4 -0
  6. package/dist/context/prompts.js.map +1 -1
  7. package/dist/core/image-storage.d.ts +6 -0
  8. package/dist/core/image-storage.js +38 -0
  9. package/dist/core/image-storage.js.map +1 -0
  10. package/dist/core/query-engine.d.ts +21 -1
  11. package/dist/core/query-engine.js +103 -13
  12. package/dist/core/query-engine.js.map +1 -1
  13. package/dist/core/query.d.ts +2 -1
  14. package/dist/core/query.js +60 -5
  15. package/dist/core/query.js.map +1 -1
  16. package/dist/core/smoke-core-loop.js +95 -6
  17. package/dist/core/smoke-core-loop.js.map +1 -1
  18. package/dist/index.d.ts +26 -1
  19. package/dist/index.js +26 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/model/communication-logger.d.ts +2 -1
  22. package/dist/model/communication-logger.js +3 -0
  23. package/dist/model/communication-logger.js.map +1 -1
  24. package/dist/model/config.d.ts +10 -4
  25. package/dist/model/config.js +61 -12
  26. package/dist/model/config.js.map +1 -1
  27. package/dist/model/context-window.js +1 -0
  28. package/dist/model/context-window.js.map +1 -1
  29. package/dist/model/deepseek-adapter.d.ts +29 -0
  30. package/dist/model/deepseek-adapter.js +108 -0
  31. package/dist/model/deepseek-adapter.js.map +1 -0
  32. package/dist/model/env.js +35 -19
  33. package/dist/model/env.js.map +1 -1
  34. package/dist/model/kimi-adapter.d.ts +29 -0
  35. package/dist/model/kimi-adapter.js +108 -0
  36. package/dist/model/kimi-adapter.js.map +1 -0
  37. package/dist/model/model-metadata.json +726 -677
  38. package/dist/model/openai-adapter.d.ts +1 -1
  39. package/dist/model/openai-chat-mapper.d.ts +4 -1
  40. package/dist/model/openai-chat-mapper.js +30 -8
  41. package/dist/model/openai-chat-mapper.js.map +1 -1
  42. package/dist/model/openai-mappers.d.ts +5 -2
  43. package/dist/model/openai-mappers.js +33 -6
  44. package/dist/model/openai-mappers.js.map +1 -1
  45. package/dist/model/openai-responses-mapper.d.ts +1 -1
  46. package/dist/model/openai-responses-mapper.js +2 -1
  47. package/dist/model/openai-responses-mapper.js.map +1 -1
  48. package/dist/model/provider-factory.js +32 -0
  49. package/dist/model/provider-factory.js.map +1 -1
  50. package/dist/model/smoke-deepseek-mapper.d.ts +1 -0
  51. package/dist/model/smoke-deepseek-mapper.js +65 -0
  52. package/dist/model/smoke-deepseek-mapper.js.map +1 -0
  53. package/dist/model/smoke-openai.js +1 -1
  54. package/dist/model/smoke-openai.js.map +1 -1
  55. package/dist/model/smoke-responses-mapper.js +6 -6
  56. package/dist/model/smoke-responses-mapper.js.map +1 -1
  57. package/dist/open-directory.d.ts +1 -0
  58. package/dist/open-directory.js +26 -0
  59. package/dist/open-directory.js.map +1 -0
  60. package/dist/paths.d.ts +7 -0
  61. package/dist/paths.js +12 -0
  62. package/dist/paths.js.map +1 -0
  63. package/dist/repl/commands.d.ts +15 -0
  64. package/dist/repl/commands.js +58 -0
  65. package/dist/repl/commands.js.map +1 -1
  66. package/dist/repl/index.js +1012 -171
  67. package/dist/repl/index.js.map +1 -1
  68. package/dist/session/session-export.d.ts +33 -0
  69. package/dist/session/session-export.js +351 -0
  70. package/dist/session/session-export.js.map +1 -0
  71. package/dist/session/session-store.js +2 -2
  72. package/dist/session/session-store.js.map +1 -1
  73. package/dist/session/simple-session-runtime.d.ts +74 -0
  74. package/dist/session/simple-session-runtime.js +171 -0
  75. package/dist/session/simple-session-runtime.js.map +1 -0
  76. package/dist/session/smoke-session.js +22 -1
  77. package/dist/session/smoke-session.js.map +1 -1
  78. package/dist/skills/skill-filesystem.d.ts +32 -0
  79. package/dist/skills/skill-filesystem.js +371 -0
  80. package/dist/skills/skill-filesystem.js.map +1 -0
  81. package/dist/skills/skill-management-tools.d.ts +36 -0
  82. package/dist/skills/skill-management-tools.js +188 -0
  83. package/dist/skills/skill-management-tools.js.map +1 -0
  84. package/dist/skills/skill-tool.d.ts +85 -5
  85. package/dist/skills/skill-tool.js +173 -14
  86. package/dist/skills/skill-tool.js.map +1 -1
  87. package/dist/skills/smoke-skills.js +54 -5
  88. package/dist/skills/smoke-skills.js.map +1 -1
  89. package/dist/tips.d.ts +10 -0
  90. package/dist/tips.js +168 -0
  91. package/dist/tips.js.map +1 -0
  92. package/dist/tools/builtins/image-generation-tool.d.ts +96 -0
  93. package/dist/tools/builtins/image-generation-tool.js +471 -0
  94. package/dist/tools/builtins/image-generation-tool.js.map +1 -0
  95. package/dist/tools/builtins/search-providers.d.ts +15 -1
  96. package/dist/tools/builtins/search-providers.js +195 -1
  97. package/dist/tools/builtins/search-providers.js.map +1 -1
  98. package/dist/tools/builtins/search-tool.js +2 -2
  99. package/dist/tools/builtins/search-tool.js.map +1 -1
  100. package/dist/tools/registry.d.ts +1 -0
  101. package/dist/tools/registry.js +11 -0
  102. package/dist/tools/registry.js.map +1 -1
  103. package/dist/tools/run-tool-use.js +1 -1
  104. package/dist/tools/run-tool-use.js.map +1 -1
  105. package/dist/tools/smoke-tool-system.js +43 -9
  106. package/dist/tools/smoke-tool-system.js.map +1 -1
  107. package/dist/tools/tool.d.ts +9 -1
  108. package/dist/tools/tool.js.map +1 -1
  109. package/dist/types/messages.d.ts +5 -0
  110. package/dist/types/messages.js.map +1 -1
  111. package/dist/ui/display-message.d.ts +103 -0
  112. package/dist/ui/display-message.js +115 -0
  113. package/dist/ui/display-message.js.map +1 -0
  114. package/dist/web/html.d.ts +1 -0
  115. package/dist/web/html.js +862 -0
  116. package/dist/web/html.js.map +1 -0
  117. package/dist/web/index.d.ts +241 -0
  118. package/dist/web/index.js +1873 -0
  119. package/dist/web/index.js.map +1 -0
  120. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html.js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ngine } from "../core/query-engine.js";
4
+ import { type ModelProviderName } from "../model/config.js";
5
+ import { CommunicationLogger, LoggingModelGateway } from "../model/communication-logger.js";
6
+ import type { ModelUsage, ReasoningConfig } from "../model/model-gateway.js";
7
+ import { ToolRegistry } from "../tools/registry.js";
8
+ import { type AgentToolRuntime } from "../agents/agent-tool.js";
9
+ import { TaskStore } from "../tasks/task-store.js";
10
+ import type { ContextMetrics } from "../types/events.js";
11
+ export interface WebRuntime {
12
+ engine: QueryEngine;
13
+ communicationLogger: CommunicationLogger;
14
+ modelGateway: LoggingModelGateway;
15
+ agentRuntime: AgentToolRuntime;
16
+ usage: SessionUsageTracker;
17
+ taskStore: TaskStore;
18
+ tools: ToolRegistry;
19
+ initialMetrics: ContextMetrics;
20
+ defaultReasoning?: ReasoningConfig | null;
21
+ envPath: string;
22
+ envNotice?: string;
23
+ }
24
+ export interface UsageTotals {
25
+ inputTokens: number;
26
+ outputTokens: number;
27
+ totalTokens: number;
28
+ reasoningTokens: number;
29
+ cachedTokens: number;
30
+ requests: number;
31
+ computedTotalTokens: boolean;
32
+ }
33
+ export declare class SessionUsageTracker {
34
+ private totals;
35
+ private lastUsage?;
36
+ add(usage: ModelUsage): void;
37
+ reset(): void;
38
+ snapshot(): UsageTotals;
39
+ }
40
+ interface UiLineImage {
41
+ src: string;
42
+ label?: string;
43
+ mimeType: string;
44
+ }
45
+ interface UiLine {
46
+ id: number;
47
+ kind: "system" | "user" | "assistant" | "thinking" | "tool" | "error" | "meta";
48
+ text: string;
49
+ title?: string;
50
+ bodyTitle?: string;
51
+ titleStatus?: "success" | "failure";
52
+ format?: "markdown" | "ansi" | "plain" | "diff";
53
+ previewStyle?: "summary";
54
+ summaryMaxLines?: number;
55
+ live?: boolean;
56
+ pendingReplacement?: boolean;
57
+ collapsible?: boolean;
58
+ image?: UiLineImage;
59
+ }
60
+ interface UiStatus {
61
+ phase: string;
62
+ detail?: string;
63
+ metrics?: ContextMetrics;
64
+ usage?: ModelUsage;
65
+ streamedOutputTokens: number;
66
+ activityTick: number;
67
+ inputTokenUpdatedAt?: number;
68
+ outputTokenUpdatedAt?: number;
69
+ retryCooldownUntil?: number;
70
+ }
71
+ export interface WebServerOptions {
72
+ host: string;
73
+ port: number;
74
+ }
75
+ export interface CreateWebRuntimeOptions {
76
+ /** Override the initial session id for this runtime. */
77
+ sessionId?: string;
78
+ /** Override whether the initial session should resume transcript history. */
79
+ resume?: boolean;
80
+ /** Override the QueryEngine agent id. Defaults to main. */
81
+ agentId?: string;
82
+ }
83
+ export interface WebRuntimeScope {
84
+ /** Browser-tab or client-instance identifier. Omit for the legacy singleton runtime. */
85
+ tabId?: string;
86
+ /** Optional session id used when a scoped runtime is created after page refresh/process restart. */
87
+ sessionId?: string;
88
+ }
89
+ export interface WebRuntimeRouterOptions {
90
+ createRuntime?: (options?: CreateWebRuntimeOptions) => Promise<WebRuntime>;
91
+ createRepl?: (runtime: WebRuntime) => WebRepl;
92
+ }
93
+ type LoginProviderName = ModelProviderName;
94
+ interface LoginFieldDefinition {
95
+ key: string;
96
+ label: string;
97
+ envKey: string;
98
+ scope: "provider" | "shared";
99
+ required?: boolean;
100
+ secret?: boolean;
101
+ placeholder?: string;
102
+ options?: readonly string[];
103
+ }
104
+ interface LoginFormPayload {
105
+ envPath: string;
106
+ providers: LoginProviderName[];
107
+ provider: LoginProviderName;
108
+ fields: LoginFieldDefinition[];
109
+ values: Record<string, string>;
110
+ }
111
+ interface WebAttachmentPayload {
112
+ kind: "image";
113
+ label: string;
114
+ mimeType: string;
115
+ data: string;
116
+ }
117
+ export declare function runWebServer(argv?: string[]): Promise<void>;
118
+ export declare function createWebRuntime(options?: CreateWebRuntimeOptions): Promise<WebRuntime>;
119
+ export declare class WebRuntimeRouter {
120
+ private readonly repls;
121
+ private readonly createRuntime;
122
+ private readonly createRepl;
123
+ constructor(options?: WebRuntimeRouterOptions);
124
+ get(scope?: WebRuntimeScope): Promise<WebRepl>;
125
+ snapshot(scope?: WebRuntimeScope, includeCatalog?: boolean): Promise<ReturnType<WebRepl["snapshot"]>>;
126
+ activeScopes(): string[];
127
+ }
128
+ export declare function createWebRuntimeRouter(options?: WebRuntimeRouterOptions): Promise<WebRuntimeRouter>;
129
+ export declare class WebRepl {
130
+ private runtime;
131
+ private readonly subscribers;
132
+ private lineId;
133
+ private assistantLineId;
134
+ private thinkingLineId;
135
+ private finalizedThinkingLineId;
136
+ private activeAbortController;
137
+ private interruptArmed;
138
+ private readonly toolLineIds;
139
+ private lines;
140
+ private status;
141
+ private busy;
142
+ private queuedInput;
143
+ private foregroundRun;
144
+ private foregroundRunToken;
145
+ private readonly backgroundSessionRuns;
146
+ private readonly suppressReattachedStreaming;
147
+ private backgroundTaskCount;
148
+ constructor(runtime: WebRuntime);
149
+ subscribe(res: ServerResponse): void;
150
+ snapshot(includeCatalog?: boolean): {
151
+ lines: UiLine[];
152
+ status: UiStatus;
153
+ busy: boolean;
154
+ queuedInput: string | undefined;
155
+ backgroundTaskCount: number;
156
+ backgroundTasks: {
157
+ taskId: string;
158
+ agentId: string;
159
+ type: import("../index.js").LocalAgentTaskType;
160
+ status: import("../index.js").LocalAgentTaskStatus;
161
+ description: string;
162
+ createdAt: string;
163
+ }[];
164
+ backgroundSessionRunCount: number;
165
+ runningSessionIds: string[];
166
+ session: import("../index.js").SessionStoreSnapshot | undefined;
167
+ catalog: {
168
+ commands: import("../repl/commands.js").ReplCommandDefinition[];
169
+ modelIds: string[];
170
+ reasoning: string[];
171
+ envPath: string;
172
+ } | undefined;
173
+ interactive: {
174
+ sessions: boolean;
175
+ login: LoginFormPayload;
176
+ } | undefined;
177
+ tips: import("../tips.js").AppTip[] | undefined;
178
+ tipIndex: number;
179
+ };
180
+ submit(text: string, attachments?: WebAttachmentPayload[]): Promise<{
181
+ ok: true;
182
+ } | {
183
+ ok: false;
184
+ error: string;
185
+ }>;
186
+ listSessions(): Promise<{
187
+ sessions: import("../index.js").SessionSummary[];
188
+ runningSessionIds: string[];
189
+ }>;
190
+ resumeSession(sessionId: string): Promise<{
191
+ ok: true;
192
+ } | {
193
+ ok: false;
194
+ error: string;
195
+ }>;
196
+ newSession(): Promise<{
197
+ ok: true;
198
+ } | {
199
+ ok: false;
200
+ error: string;
201
+ }>;
202
+ private refreshSessionView;
203
+ deleteSession(sessionId: string): Promise<{
204
+ ok: true;
205
+ } | {
206
+ ok: false;
207
+ error: string;
208
+ }>;
209
+ loginForm(providerValue?: string): LoginFormPayload;
210
+ saveLogin(providerValue: string, values: Record<string, string>): Promise<{
211
+ ok: true;
212
+ } | {
213
+ ok: false;
214
+ error: string;
215
+ }>;
216
+ interrupt(): {
217
+ ok: true;
218
+ interrupted: boolean;
219
+ };
220
+ private append;
221
+ private updateLine;
222
+ private replaceLineText;
223
+ private replaceLine;
224
+ private setBusy;
225
+ private setStatus;
226
+ private finalizeForegroundView;
227
+ private stopForegroundRun;
228
+ private backgroundTasks;
229
+ private detachRunningForeground;
230
+ private reattachRunningSession;
231
+ private reduce;
232
+ private finalizeLiveLine;
233
+ private finalizeThinkingLine;
234
+ private finalizeActiveToolLines;
235
+ private handleEvent;
236
+ private handleCommandOrPrompt;
237
+ private runCompaction;
238
+ private send;
239
+ private broadcastSync;
240
+ }
241
+ export {};