@phnx-labs/agents-cli 1.23.11 → 1.23.13
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/CHANGELOG.md +10 -0
- package/dist/commands/permissions.js +36 -6
- package/dist/commands/setup.js +1 -1
- package/dist/lib/agent-spec/agents.js +15 -9
- package/dist/lib/installations/active-check.d.ts +1 -0
- package/dist/lib/installations/active-check.js +37 -4
- package/dist/lib/installations/versions.js +1 -2
- package/dist/lib/permissions-registry.d.ts +4 -0
- package/dist/lib/permissions-registry.js +70 -18
- package/dist/lib/permissions.d.ts +25 -5
- package/dist/lib/permissions.js +239 -53
- package/dist/lib/staleness/detectors/permissions.js +16 -8
- package/dist/lib/staleness/writers/permissions.js +6 -1
- package/dist/lib/types.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentId, PermissionSet, InstalledPermission, ClaudePermissions, CursorPermissions, OpenCodePermissions, CodexPermissions } from './types.js';
|
|
2
|
-
import { CODEX_RULES_FILENAME } from './permissions-registry.js';
|
|
3
|
-
export { CODEX_RULES_FILENAME };
|
|
2
|
+
import { CODEX_ASK_RULES_FILENAME, CODEX_RULES_FILENAME } from './permissions-registry.js';
|
|
3
|
+
export { CODEX_ASK_RULES_FILENAME, CODEX_RULES_FILENAME };
|
|
4
4
|
type ParsedRules = PermissionSet;
|
|
5
5
|
export declare const COMPUTER_APP_GATED_VERBS: readonly ["screenshot", "describe", "get-text", "launch", "raise", "click", "right-click", "type", "type-text", "key", "drag", "scroll", "ax-action", "focus", "wait"];
|
|
6
6
|
export declare function formatComputerPermissionGrantHint(bundleId?: string): string;
|
|
@@ -9,6 +9,7 @@ export declare function containsBroadGrants(rules: ParsedRules): {
|
|
|
9
9
|
reason: string;
|
|
10
10
|
} | null;
|
|
11
11
|
export declare function convertDenyToCodexRules(deny: string[]): string | null;
|
|
12
|
+
export declare function convertAskToCodexRules(ask: string[]): string | null;
|
|
12
13
|
export declare function parsePermissionSet(filePath: string): PermissionSet | null;
|
|
13
14
|
export declare function discoverPermissionsFromRepo(repoPath: string): Array<{
|
|
14
15
|
name: string;
|
|
@@ -59,9 +60,21 @@ interface CopilotPermissionsConfig {
|
|
|
59
60
|
}>;
|
|
60
61
|
}
|
|
61
62
|
export declare function convertToCopilotFormat(set: PermissionSet, location: string): CopilotPermissionsConfig;
|
|
63
|
+
interface DroidAskRule {
|
|
64
|
+
id: string;
|
|
65
|
+
decision: 'ask';
|
|
66
|
+
match: {
|
|
67
|
+
prefix: string[];
|
|
68
|
+
};
|
|
69
|
+
tests: {
|
|
70
|
+
match: string[];
|
|
71
|
+
noMatch: string[];
|
|
72
|
+
};
|
|
73
|
+
}
|
|
62
74
|
export declare function convertToDroidFormat(set: PermissionSet): {
|
|
63
75
|
commandAllowlist: string[];
|
|
64
76
|
commandDenylist: string[];
|
|
77
|
+
askRules?: DroidAskRule[];
|
|
65
78
|
};
|
|
66
79
|
export declare function convertToOpenClawFormat(set: PermissionSet): {
|
|
67
80
|
alsoAllow: string[];
|
|
@@ -77,6 +90,7 @@ export declare function convertToAntigravityFormat(set: PermissionSet): {
|
|
|
77
90
|
permissions: {
|
|
78
91
|
allow: string[];
|
|
79
92
|
deny?: string[];
|
|
93
|
+
ask?: string[];
|
|
80
94
|
};
|
|
81
95
|
};
|
|
82
96
|
export declare function convertToGrokFormat(set: PermissionSet): {
|
|
@@ -85,12 +99,12 @@ export declare function convertToGrokFormat(set: PermissionSet): {
|
|
|
85
99
|
};
|
|
86
100
|
};
|
|
87
101
|
type GrokRule = {
|
|
88
|
-
action: 'allow' | 'deny';
|
|
102
|
+
action: 'allow' | 'deny' | 'ask';
|
|
89
103
|
tool: string;
|
|
90
104
|
pattern?: string;
|
|
91
105
|
};
|
|
92
106
|
type KimiRule = {
|
|
93
|
-
decision: 'allow' | 'deny';
|
|
107
|
+
decision: 'allow' | 'deny' | 'ask';
|
|
94
108
|
pattern: string;
|
|
95
109
|
};
|
|
96
110
|
export declare function convertToKimiFormat(set: PermissionSet): {
|
|
@@ -109,10 +123,12 @@ export declare function applyClaudePermissions(set: PermissionSet, scope?: 'user
|
|
|
109
123
|
error?: string;
|
|
110
124
|
};
|
|
111
125
|
export declare function openCodeConfigPath(scope: 'user' | 'project', cwd?: string, home?: string): string;
|
|
112
|
-
export
|
|
126
|
+
export type ApplyPermissionsResult = {
|
|
113
127
|
success: boolean;
|
|
114
128
|
error?: string;
|
|
129
|
+
skipped?: string[];
|
|
115
130
|
};
|
|
131
|
+
export declare function applyPermissionsToVersion(agentId: AgentId, set: PermissionSet, versionHome: string, merge?: boolean, cwd?: string): ApplyPermissionsResult;
|
|
116
132
|
export declare function claudeToCanonical(perms: ClaudePermissions): PermissionSet;
|
|
117
133
|
export declare function openCodeToCanonical(perms: OpenCodePermissions): PermissionSet;
|
|
118
134
|
export declare function codexToCanonical(perms: CodexPermissions): PermissionSet;
|
|
@@ -128,6 +144,10 @@ export declare function computePermissionsDiff(existing: PermissionSet, incoming
|
|
|
128
144
|
added: string[];
|
|
129
145
|
existing: string[];
|
|
130
146
|
};
|
|
147
|
+
ask: {
|
|
148
|
+
added: string[];
|
|
149
|
+
existing: string[];
|
|
150
|
+
};
|
|
131
151
|
};
|
|
132
152
|
export declare function mergePermissionSets(existing: PermissionSet, incoming: PermissionSet): PermissionSet;
|
|
133
153
|
export declare function saveDefaultPermissionSet(set: PermissionSet): {
|