@openacp/cli 0.6.5 → 0.6.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/{adapter-YSEIZJBA.js → adapter-RKK7A5GI.js} +2 -2
- package/dist/{chunk-FW6HM4VU.js → chunk-AHPRT3RY.js} +349 -62
- package/dist/chunk-AHPRT3RY.js.map +1 -0
- package/dist/{chunk-FEWSQT3U.js → chunk-ZMVVW3BK.js} +888 -66
- package/dist/chunk-ZMVVW3BK.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +80 -1
- package/dist/index.js +6 -2
- package/dist/{main-TSZR4HPP.js → main-B5L3DD3Y.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-FEWSQT3U.js.map +0 -1
- package/dist/chunk-FW6HM4VU.js.map +0 -1
- /package/dist/{adapter-YSEIZJBA.js.map → adapter-RKK7A5GI.js.map} +0 -0
- /package/dist/{main-TSZR4HPP.js.map → main-B5L3DD3Y.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -1797,7 +1797,7 @@ async function cmdDefault(command2) {
|
|
|
1797
1797
|
}
|
|
1798
1798
|
const { markRunning } = await import("./daemon-5DS5BQXJ.js");
|
|
1799
1799
|
markRunning();
|
|
1800
|
-
const { startServer } = await import("./main-
|
|
1800
|
+
const { startServer } = await import("./main-B5L3DD3Y.js");
|
|
1801
1801
|
await startServer();
|
|
1802
1802
|
}
|
|
1803
1803
|
|
|
@@ -1828,7 +1828,7 @@ var commands = {
|
|
|
1828
1828
|
"tunnel": () => cmdTunnel(args),
|
|
1829
1829
|
"onboard": () => cmdOnboard(),
|
|
1830
1830
|
"--daemon-child": async () => {
|
|
1831
|
-
const { startServer } = await import("./main-
|
|
1831
|
+
const { startServer } = await import("./main-B5L3DD3Y.js");
|
|
1832
1832
|
await startServer();
|
|
1833
1833
|
}
|
|
1834
1834
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1183,6 +1183,7 @@ declare class Session extends TypedEmitter<SessionEvents> {
|
|
|
1183
1183
|
readonly permissionGate: PermissionGate;
|
|
1184
1184
|
private readonly queue;
|
|
1185
1185
|
private speechService?;
|
|
1186
|
+
private pendingContext;
|
|
1186
1187
|
constructor(opts: {
|
|
1187
1188
|
id?: string;
|
|
1188
1189
|
channelId: string;
|
|
@@ -1204,6 +1205,7 @@ declare class Session extends TypedEmitter<SessionEvents> {
|
|
|
1204
1205
|
/** Number of prompts waiting in queue */
|
|
1205
1206
|
get queueDepth(): number;
|
|
1206
1207
|
get promptRunning(): boolean;
|
|
1208
|
+
setContext(markdown: string): void;
|
|
1207
1209
|
setVoiceMode(mode: "off" | "next" | "on"): void;
|
|
1208
1210
|
enqueuePrompt(text: string, attachments?: Attachment[]): Promise<void>;
|
|
1209
1211
|
private processPrompt;
|
|
@@ -1482,6 +1484,61 @@ declare class SessionFactory {
|
|
|
1482
1484
|
wireSideEffects(session: Session, deps: SideEffectDeps): void;
|
|
1483
1485
|
}
|
|
1484
1486
|
|
|
1487
|
+
interface ContextProvider {
|
|
1488
|
+
readonly name: string;
|
|
1489
|
+
isAvailable(repoPath: string): Promise<boolean>;
|
|
1490
|
+
listSessions(query: ContextQuery): Promise<SessionListResult>;
|
|
1491
|
+
buildContext(query: ContextQuery, options?: ContextOptions): Promise<ContextResult>;
|
|
1492
|
+
}
|
|
1493
|
+
interface ContextQuery {
|
|
1494
|
+
repoPath: string;
|
|
1495
|
+
type: "branch" | "commit" | "pr" | "latest" | "checkpoint" | "session";
|
|
1496
|
+
value: string;
|
|
1497
|
+
}
|
|
1498
|
+
interface ContextOptions {
|
|
1499
|
+
maxTokens?: number;
|
|
1500
|
+
limit?: number;
|
|
1501
|
+
}
|
|
1502
|
+
interface SessionInfo {
|
|
1503
|
+
checkpointId: string;
|
|
1504
|
+
sessionIndex: string;
|
|
1505
|
+
transcriptPath: string;
|
|
1506
|
+
createdAt: string;
|
|
1507
|
+
endedAt: string;
|
|
1508
|
+
branch: string;
|
|
1509
|
+
agent: string;
|
|
1510
|
+
turnCount: number;
|
|
1511
|
+
filesTouched: string[];
|
|
1512
|
+
sessionId: string;
|
|
1513
|
+
}
|
|
1514
|
+
interface SessionListResult {
|
|
1515
|
+
sessions: SessionInfo[];
|
|
1516
|
+
estimatedTokens: number;
|
|
1517
|
+
}
|
|
1518
|
+
type ContextMode = "full" | "balanced" | "compact";
|
|
1519
|
+
interface ContextResult {
|
|
1520
|
+
markdown: string;
|
|
1521
|
+
tokenEstimate: number;
|
|
1522
|
+
sessionCount: number;
|
|
1523
|
+
totalTurns: number;
|
|
1524
|
+
mode: ContextMode;
|
|
1525
|
+
truncated: boolean;
|
|
1526
|
+
timeRange: {
|
|
1527
|
+
start: string;
|
|
1528
|
+
end: string;
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
declare class ContextManager {
|
|
1533
|
+
private providers;
|
|
1534
|
+
private cache;
|
|
1535
|
+
constructor();
|
|
1536
|
+
register(provider: ContextProvider): void;
|
|
1537
|
+
getProvider(repoPath: string): Promise<ContextProvider | null>;
|
|
1538
|
+
listSessions(query: ContextQuery): Promise<SessionListResult | null>;
|
|
1539
|
+
buildContext(query: ContextQuery, options?: ContextOptions): Promise<ContextResult | null>;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1485
1542
|
declare class OpenACPCore {
|
|
1486
1543
|
configManager: ConfigManager;
|
|
1487
1544
|
agentCatalog: AgentCatalog;
|
|
@@ -1502,6 +1559,7 @@ declare class OpenACPCore {
|
|
|
1502
1559
|
sessionFactory: SessionFactory;
|
|
1503
1560
|
readonly usageStore: UsageStore | null;
|
|
1504
1561
|
readonly usageBudget: UsageBudget | null;
|
|
1562
|
+
readonly contextManager: ContextManager;
|
|
1505
1563
|
constructor(configManager: ConfigManager);
|
|
1506
1564
|
get tunnelService(): TunnelService | undefined;
|
|
1507
1565
|
set tunnelService(service: TunnelService | undefined);
|
|
@@ -1539,6 +1597,17 @@ declare class OpenACPCore {
|
|
|
1539
1597
|
message: string;
|
|
1540
1598
|
}>;
|
|
1541
1599
|
handleNewChat(channelId: string, currentThreadId: string): Promise<Session | null>;
|
|
1600
|
+
createSessionWithContext(params: {
|
|
1601
|
+
channelId: string;
|
|
1602
|
+
agentName: string;
|
|
1603
|
+
workingDirectory: string;
|
|
1604
|
+
contextQuery: ContextQuery;
|
|
1605
|
+
contextOptions?: ContextOptions;
|
|
1606
|
+
createThread?: boolean;
|
|
1607
|
+
}): Promise<{
|
|
1608
|
+
session: Session;
|
|
1609
|
+
contextResult: ContextResult | null;
|
|
1610
|
+
}>;
|
|
1542
1611
|
/**
|
|
1543
1612
|
* Get active session by thread, or attempt lazy resume from store.
|
|
1544
1613
|
* Used by adapter command handlers that need a session but don't go through handleMessage().
|
|
@@ -1705,6 +1774,16 @@ declare function isHotReloadable(path: string): boolean;
|
|
|
1705
1774
|
declare function resolveOptions(def: ConfigFieldDef, config: Config): string[] | undefined;
|
|
1706
1775
|
declare function getConfigValue(config: Config, path: string): unknown;
|
|
1707
1776
|
|
|
1777
|
+
declare class EntireProvider implements ContextProvider {
|
|
1778
|
+
readonly name = "entire";
|
|
1779
|
+
isAvailable(repoPath: string): Promise<boolean>;
|
|
1780
|
+
listSessions(query: ContextQuery): Promise<SessionListResult>;
|
|
1781
|
+
buildContext(query: ContextQuery, options?: ContextOptions): Promise<ContextResult>;
|
|
1782
|
+
private buildSessionMarkdowns;
|
|
1783
|
+
private resolveSessions;
|
|
1784
|
+
private buildTitle;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1708
1787
|
interface TelegramChannelConfig extends ChannelConfig {
|
|
1709
1788
|
botToken: string;
|
|
1710
1789
|
chatId: number;
|
|
@@ -1748,4 +1827,4 @@ declare class TelegramAdapter extends ChannelAdapter<OpenACPCore> {
|
|
|
1748
1827
|
} | null>;
|
|
1749
1828
|
}
|
|
1750
1829
|
|
|
1751
|
-
export { type AdapterFactory, AgentCatalog, type AgentCommand, type AgentDefinition, type AgentDistribution, type AgentEvent, AgentInstance, type AgentListItem, AgentManager, AgentStore, type ApiConfig, ApiServer, type Attachment, type AvailabilityResult, type BridgeDeps, CONFIG_REGISTRY, ChannelAdapter, type ChannelConfig, type CleanupResult, type Config, type ConfigFieldDef, ConfigManager, type DeleteTopicResult, type DiscordPlatformData, EventBus, type EventBusEvents, FileService, GroqSTT, type IChannelAdapter, type IncomingMessage, type InstallProgress, type InstallResult, type InstalledAgent, type Logger, type LoggingConfig, MessageTransformer, NotificationManager, type NotificationMessage, OpenACPCore, type OutgoingMessage, PLUGINS_DIR, PermissionGate, type PermissionOption, type PermissionRequest, type PlanEntry, PromptQueue, type RegistryAgent, type RegistryBinaryTarget, type RegistryDistribution, SSEManager, type STTOptions, type STTProvider, type STTResult, SecurityGuard, Session, SessionBridge, type SessionCreateParams, type SessionEvents, SessionFactory, SessionManager, type SessionRecord, type SessionStatus, type SideEffectDeps, type SpeechProviderConfig, SpeechService, type SpeechServiceConfig, StaticServer, StderrCapture, type TTSOptions, type TTSProvider, type TTSResult, TelegramAdapter, type TelegramPlatformData, type TopicInfo, TopicManager, TypedEmitter, UsageBudget, type UsageConfig, type UsageRecord, UsageStore, type UsageSummary, cleanupOldSessionLogs, createChildLogger, createSessionLogger, expandHome, getConfigValue, getFieldDef, getPidPath, getSafeFields, getStatus, initLogger, installAutoStart, installPlugin, isAutoStartInstalled, isAutoStartSupported, isHotReloadable, listPlugins, loadAdapterFactory, log, nodeToWebReadable, nodeToWebWritable, resolveOptions, runConfigEditor, setLogLevel, shutdownLogger, startDaemon, stopDaemon, uninstallAutoStart, uninstallPlugin };
|
|
1830
|
+
export { type AdapterFactory, AgentCatalog, type AgentCommand, type AgentDefinition, type AgentDistribution, type AgentEvent, AgentInstance, type AgentListItem, AgentManager, AgentStore, type ApiConfig, ApiServer, type Attachment, type AvailabilityResult, type BridgeDeps, CONFIG_REGISTRY, ChannelAdapter, type ChannelConfig, type CleanupResult, type Config, type ConfigFieldDef, ConfigManager, ContextManager, type ContextOptions, type ContextProvider, type ContextQuery, type ContextResult, type SessionInfo as ContextSessionInfo, type DeleteTopicResult, type DiscordPlatformData, EntireProvider, EventBus, type EventBusEvents, FileService, GroqSTT, type IChannelAdapter, type IncomingMessage, type InstallProgress, type InstallResult, type InstalledAgent, type Logger, type LoggingConfig, MessageTransformer, NotificationManager, type NotificationMessage, OpenACPCore, type OutgoingMessage, PLUGINS_DIR, PermissionGate, type PermissionOption, type PermissionRequest, type PlanEntry, PromptQueue, type RegistryAgent, type RegistryBinaryTarget, type RegistryDistribution, SSEManager, type STTOptions, type STTProvider, type STTResult, SecurityGuard, Session, SessionBridge, type SessionCreateParams, type SessionEvents, SessionFactory, type SessionListResult, SessionManager, type SessionRecord, type SessionStatus, type SideEffectDeps, type SpeechProviderConfig, SpeechService, type SpeechServiceConfig, StaticServer, StderrCapture, type TTSOptions, type TTSProvider, type TTSResult, TelegramAdapter, type TelegramPlatformData, type TopicInfo, TopicManager, TypedEmitter, UsageBudget, type UsageConfig, type UsageRecord, UsageStore, type UsageSummary, cleanupOldSessionLogs, createChildLogger, createSessionLogger, expandHome, getConfigValue, getFieldDef, getPidPath, getSafeFields, getStatus, initLogger, installAutoStart, installPlugin, isAutoStartInstalled, isAutoStartSupported, isHotReloadable, listPlugins, loadAdapterFactory, log, nodeToWebReadable, nodeToWebWritable, resolveOptions, runConfigEditor, setLogLevel, shutdownLogger, startDaemon, stopDaemon, uninstallAutoStart, uninstallPlugin };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TelegramAdapter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AHPRT3RY.js";
|
|
4
4
|
import "./chunk-FCLGYYTY.js";
|
|
5
5
|
import "./chunk-PJVKOZTR.js";
|
|
6
6
|
import "./chunk-7QJS2XBD.js";
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
AgentInstance,
|
|
9
9
|
AgentManager,
|
|
10
10
|
ApiServer,
|
|
11
|
+
ContextManager,
|
|
12
|
+
EntireProvider,
|
|
11
13
|
EventBus,
|
|
12
14
|
FileService,
|
|
13
15
|
GroqSTT,
|
|
@@ -31,7 +33,7 @@ import {
|
|
|
31
33
|
UsageStore,
|
|
32
34
|
nodeToWebReadable,
|
|
33
35
|
nodeToWebWritable
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-ZMVVW3BK.js";
|
|
35
37
|
import {
|
|
36
38
|
ChannelAdapter
|
|
37
39
|
} from "./chunk-4GQ3I65A.js";
|
|
@@ -96,6 +98,8 @@ export {
|
|
|
96
98
|
CONFIG_REGISTRY,
|
|
97
99
|
ChannelAdapter,
|
|
98
100
|
ConfigManager,
|
|
101
|
+
ContextManager,
|
|
102
|
+
EntireProvider,
|
|
99
103
|
EventBus,
|
|
100
104
|
FileService,
|
|
101
105
|
GroqSTT,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
TelegramAdapter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AHPRT3RY.js";
|
|
5
5
|
import "./chunk-FCLGYYTY.js";
|
|
6
6
|
import "./chunk-PJVKOZTR.js";
|
|
7
7
|
import "./chunk-7QJS2XBD.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ApiServer,
|
|
10
10
|
OpenACPCore,
|
|
11
11
|
TopicManager
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZMVVW3BK.js";
|
|
13
13
|
import "./chunk-4GQ3I65A.js";
|
|
14
14
|
import "./chunk-NAMYZIS5.js";
|
|
15
15
|
import "./chunk-WVMSP4AF.js";
|
|
@@ -102,7 +102,7 @@ async function startServer() {
|
|
|
102
102
|
core.registerAdapter("telegram", new TelegramAdapter(core, channelConfig));
|
|
103
103
|
log.info({ adapter: "telegram" }, "Adapter registered");
|
|
104
104
|
} else if (channelName === "slack") {
|
|
105
|
-
const { SlackAdapter } = await import("./adapter-
|
|
105
|
+
const { SlackAdapter } = await import("./adapter-RKK7A5GI.js");
|
|
106
106
|
const slackConfig = channelConfig;
|
|
107
107
|
core.registerAdapter("slack", new SlackAdapter(core, slackConfig));
|
|
108
108
|
log.info({ adapter: "slack" }, "Adapter registered");
|
|
@@ -234,4 +234,4 @@ export {
|
|
|
234
234
|
RESTART_EXIT_CODE,
|
|
235
235
|
startServer
|
|
236
236
|
};
|
|
237
|
-
//# sourceMappingURL=main-
|
|
237
|
+
//# sourceMappingURL=main-B5L3DD3Y.js.map
|