@openacp/cli 2026.403.3 → 2026.403.5
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/cli.js +1744 -1308
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +49 -8
- package/dist/index.js +969 -616
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -653,10 +653,28 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
653
653
|
defaultAgent: z.ZodString;
|
|
654
654
|
workspace: z.ZodDefault<z.ZodObject<{
|
|
655
655
|
baseDir: z.ZodDefault<z.ZodString>;
|
|
656
|
+
security: z.ZodDefault<z.ZodObject<{
|
|
657
|
+
allowedPaths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
658
|
+
envWhitelist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
659
|
+
}, "strip", z.ZodTypeAny, {
|
|
660
|
+
allowedPaths: string[];
|
|
661
|
+
envWhitelist: string[];
|
|
662
|
+
}, {
|
|
663
|
+
allowedPaths?: string[] | undefined;
|
|
664
|
+
envWhitelist?: string[] | undefined;
|
|
665
|
+
}>>;
|
|
656
666
|
}, "strip", z.ZodTypeAny, {
|
|
657
667
|
baseDir: string;
|
|
668
|
+
security: {
|
|
669
|
+
allowedPaths: string[];
|
|
670
|
+
envWhitelist: string[];
|
|
671
|
+
};
|
|
658
672
|
}, {
|
|
659
673
|
baseDir?: string | undefined;
|
|
674
|
+
security?: {
|
|
675
|
+
allowedPaths?: string[] | undefined;
|
|
676
|
+
envWhitelist?: string[] | undefined;
|
|
677
|
+
} | undefined;
|
|
660
678
|
}>>;
|
|
661
679
|
security: z.ZodDefault<z.ZodObject<{
|
|
662
680
|
allowedUserIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -907,14 +925,18 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
907
925
|
monthlyBudget?: number | undefined;
|
|
908
926
|
};
|
|
909
927
|
defaultAgent: string;
|
|
910
|
-
workspace: {
|
|
911
|
-
baseDir: string;
|
|
912
|
-
};
|
|
913
928
|
security: {
|
|
914
929
|
allowedUserIds: string[];
|
|
915
930
|
maxConcurrentSessions: number;
|
|
916
931
|
sessionTimeoutMinutes: number;
|
|
917
932
|
};
|
|
933
|
+
workspace: {
|
|
934
|
+
baseDir: string;
|
|
935
|
+
security: {
|
|
936
|
+
allowedPaths: string[];
|
|
937
|
+
envWhitelist: string[];
|
|
938
|
+
};
|
|
939
|
+
};
|
|
918
940
|
logging: {
|
|
919
941
|
level: "fatal" | "error" | "warn" | "info" | "debug" | "silent";
|
|
920
942
|
logDir: string;
|
|
@@ -1001,14 +1023,18 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
1001
1023
|
currency?: string | undefined;
|
|
1002
1024
|
retentionDays?: number | undefined;
|
|
1003
1025
|
} | undefined;
|
|
1004
|
-
workspace?: {
|
|
1005
|
-
baseDir?: string | undefined;
|
|
1006
|
-
} | undefined;
|
|
1007
1026
|
security?: {
|
|
1008
1027
|
allowedUserIds?: string[] | undefined;
|
|
1009
1028
|
maxConcurrentSessions?: number | undefined;
|
|
1010
1029
|
sessionTimeoutMinutes?: number | undefined;
|
|
1011
1030
|
} | undefined;
|
|
1031
|
+
workspace?: {
|
|
1032
|
+
baseDir?: string | undefined;
|
|
1033
|
+
security?: {
|
|
1034
|
+
allowedPaths?: string[] | undefined;
|
|
1035
|
+
envWhitelist?: string[] | undefined;
|
|
1036
|
+
} | undefined;
|
|
1037
|
+
} | undefined;
|
|
1012
1038
|
logging?: {
|
|
1013
1039
|
level?: "fatal" | "error" | "warn" | "info" | "debug" | "silent" | undefined;
|
|
1014
1040
|
logDir?: string | undefined;
|
|
@@ -1196,6 +1222,7 @@ declare class AgentInstance extends TypedEmitter<AgentInstanceEvents> {
|
|
|
1196
1222
|
private terminalManager;
|
|
1197
1223
|
private static mcpManager;
|
|
1198
1224
|
private _destroying;
|
|
1225
|
+
private pathGuard;
|
|
1199
1226
|
sessionId: string;
|
|
1200
1227
|
agentName: string;
|
|
1201
1228
|
promptCapabilities?: {
|
|
@@ -1211,6 +1238,8 @@ declare class AgentInstance extends TypedEmitter<AgentInstanceEvents> {
|
|
|
1211
1238
|
};
|
|
1212
1239
|
middlewareChain?: MiddlewareChain;
|
|
1213
1240
|
debugTracer: DebugTracer | null;
|
|
1241
|
+
/** Allow external callers (e.g. SessionFactory) to whitelist additional read paths */
|
|
1242
|
+
addAllowedPath(p: string): void;
|
|
1214
1243
|
onPermissionRequest: (request: PermissionRequest) => Promise<string>;
|
|
1215
1244
|
private constructor();
|
|
1216
1245
|
private static spawnSubprocess;
|
|
@@ -1261,6 +1290,12 @@ declare class AgentCatalog {
|
|
|
1261
1290
|
getAvailable(): AgentListItem[];
|
|
1262
1291
|
checkAvailability(keyOrId: string): AvailabilityResult;
|
|
1263
1292
|
install(keyOrId: string, progress?: InstallProgress, force?: boolean): Promise<InstallResult>;
|
|
1293
|
+
/**
|
|
1294
|
+
* Register an agent directly into the catalog store without going through
|
|
1295
|
+
* the registry installer. Used to pre-register bundled agents (e.g. Claude)
|
|
1296
|
+
* when their CLI dependency is not yet installed.
|
|
1297
|
+
*/
|
|
1298
|
+
registerFallbackAgent(key: string, data: InstalledAgent): void;
|
|
1264
1299
|
uninstall(key: string): Promise<{
|
|
1265
1300
|
ok: boolean;
|
|
1266
1301
|
error?: string;
|
|
@@ -1677,7 +1712,7 @@ declare class SessionBridge {
|
|
|
1677
1712
|
private persistAcpState;
|
|
1678
1713
|
/** Resolve a permission request through the full pipeline: middleware -> auto-approve -> ask user */
|
|
1679
1714
|
private resolvePermission;
|
|
1680
|
-
/** Check if a permission request should be auto-approved (
|
|
1715
|
+
/** Check if a permission request should be auto-approved (bypass mode only) */
|
|
1681
1716
|
private checkAutoApprove;
|
|
1682
1717
|
/** Emit permission:afterResolve middleware hook (fire-and-forget) */
|
|
1683
1718
|
private emitAfterResolve;
|
|
@@ -1958,6 +1993,10 @@ declare class SessionFactory {
|
|
|
1958
1993
|
agentCatalog?: AgentCatalog;
|
|
1959
1994
|
/** Injected by Core — needed for context-aware session creation */
|
|
1960
1995
|
getContextManager?: () => ContextManager | undefined;
|
|
1996
|
+
/** Injected by Core — returns extra filesystem paths the agent is allowed to read.
|
|
1997
|
+
* Used to whitelist the file-service upload directory so agents can read attachments
|
|
1998
|
+
* saved outside the workspace (e.g. ~/.openacp/instances/main/files/). */
|
|
1999
|
+
getAgentAllowedPaths?: () => string[];
|
|
1961
2000
|
constructor(agentManager: AgentManager, sessionManager: SessionManager, speechServiceAccessor: SpeechService | (() => SpeechService), eventBus: EventBus, instanceRoot?: string | undefined);
|
|
1962
2001
|
private get speechService();
|
|
1963
2002
|
create(params: SessionCreateParams): Promise<Session>;
|
|
@@ -2394,7 +2433,7 @@ declare function uninstallAutoStart(): {
|
|
|
2394
2433
|
declare function isAutoStartInstalled(): boolean;
|
|
2395
2434
|
|
|
2396
2435
|
declare class FileService {
|
|
2397
|
-
|
|
2436
|
+
readonly baseDir: string;
|
|
2398
2437
|
constructor(baseDir: string);
|
|
2399
2438
|
/**
|
|
2400
2439
|
* Remove session file directories older than maxAgeDays.
|
|
@@ -3016,6 +3055,8 @@ declare class TelegramAdapter extends MessagingAdapter {
|
|
|
3016
3055
|
private _pendingSkillCommands;
|
|
3017
3056
|
/** Control message IDs per session (for updating status text/buttons) */
|
|
3018
3057
|
private controlMsgIds;
|
|
3058
|
+
private _threadReadyHandler?;
|
|
3059
|
+
private _configChangedHandler?;
|
|
3019
3060
|
/** Store control message ID in memory + persist to session record */
|
|
3020
3061
|
private storeControlMsgId;
|
|
3021
3062
|
/** Get control message ID (from Map, with fallback to session record) */
|