@phnx-labs/agents-cli 1.20.0 → 1.20.4
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 +81 -0
- package/README.md +4 -4
- package/dist/commands/cli.js +3 -3
- package/dist/commands/cloud.js +1 -1
- package/dist/commands/commands.js +24 -7
- package/dist/commands/exec.js +36 -16
- package/dist/commands/feedback.d.ts +7 -0
- package/dist/commands/feedback.js +89 -0
- package/dist/commands/helper.d.ts +12 -0
- package/dist/commands/helper.js +87 -0
- package/dist/commands/hooks.js +86 -7
- package/dist/commands/import.js +90 -37
- package/dist/commands/mcp.js +166 -10
- package/dist/commands/packages.js +196 -27
- package/dist/commands/permissions.js +21 -6
- package/dist/commands/profiles.d.ts +8 -0
- package/dist/commands/profiles.js +117 -4
- package/dist/commands/pull.js +4 -4
- package/dist/commands/routines.js +6 -6
- package/dist/commands/rules.js +8 -4
- package/dist/commands/secrets-migrate.d.ts +24 -0
- package/dist/commands/secrets-migrate.js +198 -0
- package/dist/commands/secrets-sync.d.ts +11 -0
- package/dist/commands/secrets-sync.js +155 -0
- package/dist/commands/secrets.js +74 -39
- package/dist/commands/skills.js +22 -5
- package/dist/commands/subagents.js +69 -49
- package/dist/commands/teams.js +48 -10
- package/dist/commands/utils.d.ts +33 -0
- package/dist/commands/utils.js +139 -0
- package/dist/commands/versions.js +4 -4
- package/dist/commands/view.d.ts +6 -0
- package/dist/commands/view.js +169 -8
- package/dist/commands/workflows.js +29 -6
- package/dist/index.js +4 -0
- package/dist/lib/acp/client.js +6 -1
- package/dist/lib/agents.d.ts +4 -0
- package/dist/lib/agents.js +41 -17
- package/dist/lib/auto-pull-worker.js +18 -1
- package/dist/lib/browser/chrome.js +4 -0
- package/dist/lib/browser/drivers/ssh.js +1 -1
- package/dist/lib/browser/profiles.d.ts +3 -3
- package/dist/lib/browser/profiles.js +3 -3
- package/dist/lib/browser/service.js +19 -0
- package/dist/lib/browser/types.d.ts +4 -4
- package/dist/lib/cli-resources.d.ts +36 -8
- package/dist/lib/cli-resources.js +268 -46
- package/dist/lib/cloud/factory.d.ts +1 -1
- package/dist/lib/cloud/factory.js +1 -1
- package/dist/lib/events.d.ts +16 -2
- package/dist/lib/events.js +33 -2
- package/dist/lib/exec.d.ts +39 -11
- package/dist/lib/exec.js +90 -31
- package/dist/lib/help.js +11 -5
- package/dist/lib/hooks/cache.d.ts +38 -0
- package/dist/lib/hooks/cache.js +242 -0
- package/dist/lib/hooks/profile.d.ts +33 -0
- package/dist/lib/hooks/profile.js +129 -0
- package/dist/lib/hooks.d.ts +0 -10
- package/dist/lib/hooks.js +68 -15
- package/dist/lib/import.d.ts +21 -0
- package/dist/lib/import.js +55 -2
- package/dist/lib/mcp.d.ts +15 -0
- package/dist/lib/mcp.js +40 -0
- package/dist/lib/permissions.d.ts +13 -0
- package/dist/lib/permissions.js +51 -1
- package/dist/lib/plugin-marketplace.d.ts +10 -0
- package/dist/lib/plugin-marketplace.js +47 -1
- package/dist/lib/plugins.js +15 -1
- package/dist/lib/profiles-presets.d.ts +26 -0
- package/dist/lib/profiles-presets.js +187 -8
- package/dist/lib/profiles.d.ts +34 -0
- package/dist/lib/profiles.js +112 -1
- package/dist/lib/pty-server.js +27 -3
- package/dist/lib/routines-format.d.ts +17 -5
- package/dist/lib/routines-format.js +37 -16
- package/dist/lib/routines.d.ts +1 -1
- package/dist/lib/routines.js +2 -2
- package/dist/lib/runner.js +64 -10
- package/dist/lib/secrets/Agents CLI.app/Contents/CodeResources +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/MacOS/Agents CLI +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/_CodeSignature/CodeResources +1 -9
- package/dist/lib/secrets/bundles.d.ts +18 -22
- package/dist/lib/secrets/bundles.js +75 -99
- package/dist/lib/secrets/index.d.ts +51 -27
- package/dist/lib/secrets/index.js +147 -156
- package/dist/lib/secrets/install-helper.d.ts +45 -0
- package/dist/lib/secrets/install-helper.js +165 -0
- package/dist/lib/secrets/linux.js +4 -4
- package/dist/lib/secrets/sync.d.ts +56 -0
- package/dist/lib/secrets/sync.js +180 -0
- package/dist/lib/session/render.js +4 -4
- package/dist/lib/session/types.d.ts +1 -1
- package/dist/lib/shims.d.ts +4 -1
- package/dist/lib/shims.js +5 -35
- package/dist/lib/state.d.ts +14 -1
- package/dist/lib/state.js +49 -5
- package/dist/lib/teams/agents.d.ts +5 -4
- package/dist/lib/teams/agents.js +47 -21
- package/dist/lib/teams/api.d.ts +2 -1
- package/dist/lib/teams/api.js +4 -3
- package/dist/lib/types.d.ts +57 -1
- package/dist/lib/types.js +2 -0
- package/dist/lib/usage.d.ts +27 -2
- package/dist/lib/usage.js +100 -17
- package/dist/lib/versions.d.ts +35 -1
- package/dist/lib/versions.js +288 -64
- package/package.json +13 -12
- package/scripts/install-helper.js +97 -0
- package/scripts/postinstall.js +16 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/embedded.provisionprofile +0 -0
|
@@ -136,38 +136,59 @@ export function humanizeNextRun(date, now, tz) {
|
|
|
136
136
|
// ---------------------------------------------------------------------------
|
|
137
137
|
// formatRepoLink
|
|
138
138
|
// ---------------------------------------------------------------------------
|
|
139
|
+
/**
|
|
140
|
+
* Maximum display length for a repo cell. Display strings longer than this
|
|
141
|
+
* are truncated with an ellipsis so column alignment is preserved.
|
|
142
|
+
* Consumers that render the column should use this constant as the column width.
|
|
143
|
+
*/
|
|
144
|
+
export const REPO_DISPLAY_MAX = 24;
|
|
139
145
|
/**
|
|
140
146
|
* Parse a repo string into a display label and an optional hyperlink target.
|
|
141
147
|
*
|
|
142
148
|
* Rules:
|
|
143
|
-
* - undefined / empty
|
|
144
|
-
* - 'owner/name' (one slash)
|
|
145
|
-
* - 'https://...' or 'http
|
|
146
|
-
* - anything else
|
|
149
|
+
* - null / undefined / empty / non-string → display '-', href null
|
|
150
|
+
* - 'owner/name' (one slash) → display 'owner/name', href 'https://github.com/owner/name/pulls'
|
|
151
|
+
* - 'https://...' or 'http://...' → display hostname+path, href the URL verbatim
|
|
152
|
+
* - anything else → display raw string, href null
|
|
153
|
+
*
|
|
154
|
+
* The display string is truncated to REPO_DISPLAY_MAX characters (with a
|
|
155
|
+
* trailing '…') when it would otherwise exceed the column width. The href
|
|
156
|
+
* is always the full untruncated URL so hyperlinks remain functional.
|
|
157
|
+
*
|
|
158
|
+
* NEVER throws — mirrors the contract of humanizeCron.
|
|
147
159
|
*/
|
|
148
160
|
export function formatRepoLink(repo) {
|
|
149
|
-
if (
|
|
161
|
+
if (repo == null || typeof repo !== 'string' || repo.trim() === '') {
|
|
150
162
|
return { display: '-', href: null };
|
|
151
163
|
}
|
|
152
164
|
const trimmed = repo.trim();
|
|
165
|
+
let display;
|
|
166
|
+
let href;
|
|
153
167
|
// Absolute URL
|
|
154
168
|
if (trimmed.startsWith('https://') || trimmed.startsWith('http://')) {
|
|
155
169
|
try {
|
|
156
170
|
const url = new URL(trimmed);
|
|
157
|
-
|
|
158
|
-
|
|
171
|
+
display = url.hostname + url.pathname.replace(/\/$/, '');
|
|
172
|
+
href = trimmed;
|
|
159
173
|
}
|
|
160
174
|
catch {
|
|
161
|
-
|
|
175
|
+
display = trimmed;
|
|
176
|
+
href = null;
|
|
162
177
|
}
|
|
163
178
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
179
|
+
else if (/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/.test(trimmed)) {
|
|
180
|
+
// GitHub shorthand: owner/name (exactly one slash, no scheme, no extra slashes)
|
|
181
|
+
display = trimmed;
|
|
182
|
+
href = `https://github.com/${trimmed}/pulls`;
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
// Anything else: plain text, no link
|
|
186
|
+
display = trimmed;
|
|
187
|
+
href = null;
|
|
188
|
+
}
|
|
189
|
+
// Truncate display to column width; href stays untruncated.
|
|
190
|
+
if (display.length > REPO_DISPLAY_MAX) {
|
|
191
|
+
display = display.slice(0, REPO_DISPLAY_MAX - 1) + '…';
|
|
170
192
|
}
|
|
171
|
-
|
|
172
|
-
return { display: trimmed, href: null };
|
|
193
|
+
return { display, href };
|
|
173
194
|
}
|
package/dist/lib/routines.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface JobConfig {
|
|
|
19
19
|
schedule: string;
|
|
20
20
|
agent: AgentId;
|
|
21
21
|
workflow?: string;
|
|
22
|
-
mode: 'plan' | 'edit' | 'full';
|
|
22
|
+
mode: 'plan' | 'edit' | 'auto' | 'skip' | 'full';
|
|
23
23
|
effort: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
24
24
|
timeout: string;
|
|
25
25
|
enabled: boolean;
|
package/dist/lib/routines.js
CHANGED
|
@@ -135,8 +135,8 @@ export function validateJob(config) {
|
|
|
135
135
|
errors.push('workflow must be a lowercase alphanumeric name (hyphens and underscores allowed, e.g. autodev)');
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
if (config.mode && !['plan', 'edit', 'full'].includes(config.mode)) {
|
|
139
|
-
errors.push(
|
|
138
|
+
if (config.mode && !['plan', 'edit', 'auto', 'skip', 'full'].includes(config.mode)) {
|
|
139
|
+
errors.push("mode must be plan, edit, auto, or skip ('full' accepted as alias for skip)");
|
|
140
140
|
}
|
|
141
141
|
if (config.effort && !['low', 'medium', 'high', 'xhigh', 'max', 'auto'].includes(config.effort)) {
|
|
142
142
|
errors.push('effort must be low, medium, high, xhigh, max, or auto');
|
package/dist/lib/runner.js
CHANGED
|
@@ -14,7 +14,8 @@ import { resolveJobPrompt, parseTimeout, writeRunMeta, getRunDir, } from './rout
|
|
|
14
14
|
import { getRunsDir } from './state.js';
|
|
15
15
|
import { prepareJobHome, buildSpawnEnv } from './sandbox.js';
|
|
16
16
|
import { resolveModel, buildReasoningFlags } from './models.js';
|
|
17
|
-
import { createTimer, maybeRotate,
|
|
17
|
+
import { createTimer, maybeRotate, redactPrompt } from './events.js';
|
|
18
|
+
import { normalizeMode } from './exec.js';
|
|
18
19
|
/** CLI command templates per agent, with {prompt} as a placeholder. */
|
|
19
20
|
const AGENT_COMMANDS = {
|
|
20
21
|
claude: ['claude', '-p', '--verbose', '{prompt}', '--output-format', 'stream-json', '--permission-mode', 'plan'],
|
|
@@ -36,13 +37,20 @@ export function buildJobCommand(config, resolvedPrompt) {
|
|
|
36
37
|
throw new Error(`Unsupported agent for daemon jobs: ${config.agent}`);
|
|
37
38
|
}
|
|
38
39
|
let cmd = template.map((part) => part.replace('{prompt}', resolvedPrompt));
|
|
40
|
+
// Canonicalize mode (accepts legacy `full` as alias for `skip`).
|
|
41
|
+
const mode = normalizeMode(config.mode);
|
|
39
42
|
if (config.agent === 'claude') {
|
|
40
|
-
if (
|
|
43
|
+
if (mode === 'edit') {
|
|
41
44
|
const planIndex = cmd.indexOf('plan');
|
|
42
45
|
if (planIndex !== -1)
|
|
43
46
|
cmd[planIndex] = 'acceptEdits';
|
|
44
47
|
}
|
|
45
|
-
else if (
|
|
48
|
+
else if (mode === 'auto') {
|
|
49
|
+
const planIndex = cmd.indexOf('plan');
|
|
50
|
+
if (planIndex !== -1)
|
|
51
|
+
cmd[planIndex] = 'auto';
|
|
52
|
+
}
|
|
53
|
+
else if (mode === 'skip') {
|
|
46
54
|
// Replace --permission-mode plan with --dangerously-skip-permissions
|
|
47
55
|
const pmIndex = cmd.indexOf('--permission-mode');
|
|
48
56
|
if (pmIndex !== -1)
|
|
@@ -63,10 +71,10 @@ export function buildJobCommand(config, resolvedPrompt) {
|
|
|
63
71
|
appendModelAndReasoning(cmd, config);
|
|
64
72
|
}
|
|
65
73
|
if (config.agent === 'codex') {
|
|
66
|
-
if (
|
|
74
|
+
if (mode === 'edit') {
|
|
67
75
|
cmd.push('--full-auto');
|
|
68
76
|
}
|
|
69
|
-
else if (
|
|
77
|
+
else if (mode === 'skip') {
|
|
70
78
|
// Remove sandbox restriction, just --full-auto
|
|
71
79
|
const sbIndex = cmd.indexOf('--sandbox');
|
|
72
80
|
if (sbIndex !== -1)
|
|
@@ -76,7 +84,10 @@ export function buildJobCommand(config, resolvedPrompt) {
|
|
|
76
84
|
appendModelAndReasoning(cmd, config);
|
|
77
85
|
}
|
|
78
86
|
if (config.agent === 'gemini') {
|
|
79
|
-
if (
|
|
87
|
+
if (mode === 'edit') {
|
|
88
|
+
cmd.push('--approval-mode', 'auto_edit');
|
|
89
|
+
}
|
|
90
|
+
else if (mode === 'skip') {
|
|
80
91
|
cmd.push('--yolo');
|
|
81
92
|
}
|
|
82
93
|
appendModelAndReasoning(cmd, config);
|
|
@@ -122,7 +133,7 @@ export async function executeJob(config) {
|
|
|
122
133
|
version: config.version,
|
|
123
134
|
jobName: config.name,
|
|
124
135
|
mode: config.mode,
|
|
125
|
-
|
|
136
|
+
...redactPrompt(config.prompt),
|
|
126
137
|
schedule: config.schedule,
|
|
127
138
|
});
|
|
128
139
|
const resolvedPrompt = resolveJobPrompt(config);
|
|
@@ -321,6 +332,39 @@ export function extractReport(stdoutPath, agentType) {
|
|
|
321
332
|
return null;
|
|
322
333
|
}
|
|
323
334
|
}
|
|
335
|
+
/** Derive the final status of a detached run by reading the agent's stream-json
|
|
336
|
+
* tail. Detached children fire-and-forget, so we never see their exit code
|
|
337
|
+
* directly — but Claude's stream-json terminates with a `type: result` line
|
|
338
|
+
* that carries `is_error`. If we find it, the run completed cleanly (modulo
|
|
339
|
+
* agent-reported error). If not, the process likely died mid-stream and the
|
|
340
|
+
* caller should treat the run as failed. */
|
|
341
|
+
function inferFinalStatusFromLog(stdoutPath, agent) {
|
|
342
|
+
if (!fs.existsSync(stdoutPath))
|
|
343
|
+
return null;
|
|
344
|
+
try {
|
|
345
|
+
const content = fs.readFileSync(stdoutPath, 'utf-8');
|
|
346
|
+
const lines = content.split('\n').filter((l) => l.trim());
|
|
347
|
+
// Walk backwards over the last few lines — the result marker is always
|
|
348
|
+
// at the tail. Cap the scan so a huge stdout doesn't iterate forever.
|
|
349
|
+
for (let i = lines.length - 1, scanned = 0; i >= 0 && scanned < 20; i--, scanned++) {
|
|
350
|
+
try {
|
|
351
|
+
const parsed = JSON.parse(lines[i]);
|
|
352
|
+
if (agent === 'claude' && parsed.type === 'result') {
|
|
353
|
+
return parsed.is_error
|
|
354
|
+
? { status: 'failed', exitCode: 1 }
|
|
355
|
+
: { status: 'completed', exitCode: 0 };
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
catch {
|
|
359
|
+
// malformed JSONL line — keep scanning
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
catch {
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
324
368
|
/** Scan all runs marked "running" and finalize any whose process has exited. */
|
|
325
369
|
export function monitorRunningJobs() {
|
|
326
370
|
const runsDir = getRunsDir();
|
|
@@ -346,11 +390,21 @@ export function monitorRunningJobs() {
|
|
|
346
390
|
process.kill(meta.pid, 0);
|
|
347
391
|
}
|
|
348
392
|
catch { /* process no longer running */
|
|
349
|
-
|
|
393
|
+
const runDirPath = path.join(jobRunsPath, runDirEntry.name);
|
|
394
|
+
const stdoutPath = path.join(runDirPath, 'stdout.log');
|
|
395
|
+
// Prefer the agent's own success/error marker; fall back to "failed"
|
|
396
|
+
// only when the stream ended without one (process killed mid-run).
|
|
397
|
+
const inferred = inferFinalStatusFromLog(stdoutPath, meta.agent);
|
|
398
|
+
if (inferred) {
|
|
399
|
+
meta.status = inferred.status;
|
|
400
|
+
meta.exitCode = inferred.exitCode;
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
meta.status = 'failed';
|
|
404
|
+
}
|
|
350
405
|
meta.completedAt = new Date().toISOString();
|
|
351
406
|
writeRunMeta(meta);
|
|
352
|
-
|
|
353
|
-
extractAndSaveReport(stdoutPath, meta.agent, path.join(jobRunsPath, runDirEntry.name));
|
|
407
|
+
extractAndSaveReport(stdoutPath, meta.agent, runDirPath);
|
|
354
408
|
}
|
|
355
409
|
}
|
|
356
410
|
catch { /* corrupt or unreadable meta.json */ }
|
|
Binary file
|
|
Binary file
|
|
@@ -5,15 +5,7 @@
|
|
|
5
5
|
<key>files</key>
|
|
6
6
|
<dict/>
|
|
7
7
|
<key>files2</key>
|
|
8
|
-
<dict
|
|
9
|
-
<key>embedded.provisionprofile</key>
|
|
10
|
-
<dict>
|
|
11
|
-
<key>hash2</key>
|
|
12
|
-
<data>
|
|
13
|
-
2vfA/eR3dTYgNc/fXhdADUPkp5tRIepPzE3FCLfDx4w=
|
|
14
|
-
</data>
|
|
15
|
-
</dict>
|
|
16
|
-
</dict>
|
|
8
|
+
<dict/>
|
|
17
9
|
<key>rules</key>
|
|
18
10
|
<dict>
|
|
19
11
|
<key>^Resources/</key>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Secret bundles
|
|
2
|
+
* Secret bundles — named sets of keychain-backed environment variables.
|
|
3
3
|
*
|
|
4
4
|
* Bundle metadata (name, description, vars map) is stored in the macOS
|
|
5
|
-
* Keychain as a JSON blob under `agents-cli.bundles.<name>`.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* the
|
|
5
|
+
* Keychain as a JSON blob under `agents-cli.bundles.<name>`. Secret values
|
|
6
|
+
* live one per keychain item under `agents-cli.secrets.<bundle>.<key>`.
|
|
7
|
+
* Every item is device-local and gated by Touch ID / device passcode — see
|
|
8
|
+
* src/lib/secrets/index.ts for the access-control story. Nothing about
|
|
9
|
+
* secrets ever lives in plaintext on disk.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* `icloud_sync` flag.
|
|
11
|
+
* Cross-machine sync is handled by src/lib/secrets/sync.ts via an explicit
|
|
12
|
+
* encrypted export/import flow; the bundle layer is sync-agnostic.
|
|
13
13
|
*/
|
|
14
14
|
import { type BundleValue, type SecretRef } from './index.js';
|
|
15
15
|
/** Allowed values for a secret's `type` metadata field. */
|
|
@@ -28,8 +28,6 @@ export interface SecretsBundle {
|
|
|
28
28
|
name: string;
|
|
29
29
|
description?: string;
|
|
30
30
|
allow_exec?: boolean;
|
|
31
|
-
/** When true, keychain-backed values and bundle metadata sync via iCloud Keychain. */
|
|
32
|
-
icloud_sync?: boolean;
|
|
33
31
|
/** ISO 8601 UTC timestamp. Set once on the first writeBundle() for a bundle. */
|
|
34
32
|
created_at?: string;
|
|
35
33
|
/** ISO 8601 UTC timestamp. Refreshed on every writeBundle(). */
|
|
@@ -49,6 +47,7 @@ export declare const RESERVED_ENV_NAMES: Set<string>;
|
|
|
49
47
|
export declare function bundleToEnvPrefix(name: string): string;
|
|
50
48
|
export declare function isReservedEnvName(key: string): boolean;
|
|
51
49
|
export declare function isLoaderOrInterpreterEnv(name: string): boolean;
|
|
50
|
+
export declare function sanitizeProcessEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
52
51
|
/** Validate a bundle name against the allowed pattern. Throws on invalid input. */
|
|
53
52
|
export declare function validateBundleName(name: string): void;
|
|
54
53
|
export declare function validateEnvKey(key: string): void;
|
|
@@ -62,11 +61,7 @@ export declare function validateSecretType(t: string): asserts t is SecretType;
|
|
|
62
61
|
export declare function validateExpiresFutureDated(iso: string): void;
|
|
63
62
|
export declare function bundleExists(name: string): boolean;
|
|
64
63
|
export declare function readBundle(name: string): SecretsBundle;
|
|
65
|
-
export
|
|
66
|
-
/** Emit a secrets.set audit event. Internal bookkeeping writes turn this off. */
|
|
67
|
-
emitEvent?: boolean;
|
|
68
|
-
}
|
|
69
|
-
export declare function writeBundle(bundle: SecretsBundle, opts?: WriteBundleOptions): void;
|
|
64
|
+
export declare function writeBundle(bundle: SecretsBundle): void;
|
|
70
65
|
export declare function deleteBundle(name: string): boolean;
|
|
71
66
|
export declare function listBundles(): SecretsBundle[];
|
|
72
67
|
export interface BundleEntryInfo {
|
|
@@ -78,14 +73,15 @@ export declare function describeBundle(bundle: SecretsBundle): BundleEntryInfo[]
|
|
|
78
73
|
/** Options for resolveBundleEnv. */
|
|
79
74
|
export interface ResolveBundleOptions {
|
|
80
75
|
/**
|
|
81
|
-
* Human-readable label for who is requesting the secrets.
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
76
|
+
* Human-readable label for who is requesting the secrets. Currently
|
|
77
|
+
* informational only — the helper's Touch ID prompt is set by the OS and
|
|
78
|
+
* cannot be reliably customized once we drop the per-batch reason path,
|
|
79
|
+
* but we keep this in the API so call sites stay explicit about who's
|
|
80
|
+
* about to read the bundle.
|
|
85
81
|
*/
|
|
86
82
|
caller?: string;
|
|
87
83
|
}
|
|
88
|
-
export declare function resolveBundleEnv(bundle: SecretsBundle,
|
|
84
|
+
export declare function resolveBundleEnv(bundle: SecretsBundle, _opts?: ResolveBundleOptions): Record<string, string>;
|
|
89
85
|
/**
|
|
90
86
|
* Read a bundle's metadata AND resolve its env in a single Touch ID prompt.
|
|
91
87
|
*
|
|
@@ -135,8 +131,8 @@ export interface RenameOptions {
|
|
|
135
131
|
* 4) write new bundle metadata
|
|
136
132
|
* 5) delete the old per-key keychain items + old metadata
|
|
137
133
|
*
|
|
138
|
-
* Steps 1-4 are reversible. If 5 partially fails
|
|
139
|
-
*
|
|
134
|
+
* Steps 1-4 are reversible. If 5 partially fails, running `rename` again is
|
|
135
|
+
* a safe no-op for the source items.
|
|
140
136
|
*/
|
|
141
137
|
export declare function renameBundle(oldName: string, newName: string, opts?: RenameOptions): void;
|
|
142
138
|
export declare function keychainItemsForBundle(bundle: SecretsBundle): Array<{
|