Merge branch 'master' of github.com-dotta:paperclipai/paperclip
* 'master' of github.com-dotta:paperclipai/paperclip: Tighten transcript label styling Fix env-sensitive worktree and runtime config tests Refine executed command row centering Tighten live run transcript streaming and stdout Center collapsed command group rows Refine collapsed command failure styling Tighten command transcript rows and dashboard card Polish transcript event widgets Refine transcript chrome and labels fix: remove paperclip property from OpenClaw Gateway agent params Add a run transcript UX fixture lab Humanize run transcripts across run detail and live surfaces fix(adapters/gemini-local): address PR review feedback fix(adapters/gemini-local): inject skills into ~/.gemini/ instead of tmpdir fix(adapters/gemini-local): downgrade missing API key to info level feat(adapters/gemini-local): add auth detection, turn-limit handling, sandbox, and approval modes fix(adapters/gemini-local): address PR review feedback for skills and formatting feat(adapters): add Gemini CLI local adapter support # Conflicts: # cli/src/__tests__/worktree.test.ts
This commit is contained in:
@@ -119,6 +119,14 @@ function nonEmpty(value: string | null | undefined): string | null {
|
||||
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
||||
}
|
||||
|
||||
function isCurrentSourceConfigPath(sourceConfigPath: string): boolean {
|
||||
const currentConfigPath = process.env.PAPERCLIP_CONFIG;
|
||||
if (!currentConfigPath || currentConfigPath.trim().length === 0) {
|
||||
return false;
|
||||
}
|
||||
return path.resolve(currentConfigPath) === path.resolve(sourceConfigPath);
|
||||
}
|
||||
|
||||
function resolveWorktreeMakeName(name: string): string {
|
||||
const value = nonEmpty(name);
|
||||
if (!value) {
|
||||
@@ -440,9 +448,10 @@ export function copySeededSecretsKey(input: {
|
||||
|
||||
mkdirSync(path.dirname(input.targetKeyFilePath), { recursive: true });
|
||||
|
||||
const allowProcessEnvFallback = isCurrentSourceConfigPath(input.sourceConfigPath);
|
||||
const sourceInlineMasterKey =
|
||||
nonEmpty(input.sourceEnvEntries.PAPERCLIP_SECRETS_MASTER_KEY) ??
|
||||
nonEmpty(process.env.PAPERCLIP_SECRETS_MASTER_KEY);
|
||||
(allowProcessEnvFallback ? nonEmpty(process.env.PAPERCLIP_SECRETS_MASTER_KEY) : null);
|
||||
if (sourceInlineMasterKey) {
|
||||
writeFileSync(input.targetKeyFilePath, sourceInlineMasterKey, {
|
||||
encoding: "utf8",
|
||||
@@ -458,7 +467,7 @@ export function copySeededSecretsKey(input: {
|
||||
|
||||
const sourceKeyFileOverride =
|
||||
nonEmpty(input.sourceEnvEntries.PAPERCLIP_SECRETS_MASTER_KEY_FILE) ??
|
||||
nonEmpty(process.env.PAPERCLIP_SECRETS_MASTER_KEY_FILE);
|
||||
(allowProcessEnvFallback ? nonEmpty(process.env.PAPERCLIP_SECRETS_MASTER_KEY_FILE) : null);
|
||||
const sourceConfiguredKeyPath = sourceKeyFileOverride ?? input.sourceConfig.secrets.localEncrypted.keyFilePath;
|
||||
const sourceKeyFilePath = resolveRuntimeLikePath(sourceConfiguredKeyPath, input.sourceConfigPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user