portable-agent-layer 0.117.0 → 0.117.1-canary.1
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/assets/statusline.ps1 +13 -14
- package/assets/statusline.sh +10 -10
- package/package.json +1 -1
- package/src/cli/doctor/health.ts +1 -1
package/assets/statusline.ps1
CHANGED
|
@@ -54,24 +54,23 @@ $palSettings = Join-Path $env:USERPROFILE ".pal\settings.json"
|
|
|
54
54
|
if (-not (Test-Path $palSettings)) { $palSettings = Join-Path $env:USERPROFILE ".pal\memory\pal-settings.json" }
|
|
55
55
|
|
|
56
56
|
$OPEN_ISCS = 0
|
|
57
|
-
$PROJECT_NAME = ""
|
|
58
57
|
$projectsDir = Join-Path $env:USERPROFILE ".pal\work\projects"
|
|
59
58
|
if (-not (Test-Path $projectsDir)) { $projectsDir = Join-Path $env:USERPROFILE ".pal\memory\projects" }
|
|
60
|
-
|
|
59
|
+
$bindingsFile = Join-Path $env:USERPROFILE ".pal\bindings.json"
|
|
60
|
+
if ((Test-Path $projectsDir) -and (Test-Path $bindingsFile)) {
|
|
61
61
|
try {
|
|
62
62
|
$CWD_NORM = $CWD.Replace('/', '\').TrimEnd('\')
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
$
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
63
|
+
$bindings = Get-Content $bindingsFile -Raw | ConvertFrom-Json
|
|
64
|
+
$project = $bindings.PSObject.Properties |
|
|
65
|
+
ForEach-Object { [pscustomobject]@{ Slug = $_.Name; Path = ([string]$_.Value).Replace('/', '\').TrimEnd('\') } } |
|
|
66
|
+
Where-Object { $CWD_NORM -eq $_.Path -or $CWD_NORM.StartsWith($_.Path + '\', [StringComparison]::OrdinalIgnoreCase) } |
|
|
67
|
+
Sort-Object { $_.Path.Length } -Descending |
|
|
68
|
+
Select-Object -First 1
|
|
69
|
+
if ($project) {
|
|
70
|
+
$isa = Join-Path $projectsDir "$($project.Slug)\ISA.md"
|
|
71
|
+
if (Test-Path $isa) {
|
|
72
|
+
$content = Get-Content $isa -Raw -ErrorAction SilentlyContinue
|
|
73
|
+
$OPEN_ISCS = ([regex]::Matches($content, '- \[ \] ISC-')).Count
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
76
|
} catch { $OPEN_ISCS = 0 }
|
package/assets/statusline.sh
CHANGED
|
@@ -85,17 +85,17 @@ PAL_SETTINGS="$HOME/.pal/settings.json"
|
|
|
85
85
|
OPEN_ISCS=0
|
|
86
86
|
PROJECTS_DIR="$HOME/.pal/work/projects"
|
|
87
87
|
[ -d "$PROJECTS_DIR" ] || PROJECTS_DIR="$HOME/.pal/memory/projects"
|
|
88
|
-
|
|
88
|
+
BINDINGS="$HOME/.pal/bindings.json"
|
|
89
|
+
if [ -d "$PROJECTS_DIR" ] && [ -f "$BINDINGS" ]; then
|
|
89
90
|
CWD_NORM="${CWD%/}"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
done
|
|
91
|
+
PROJECT=$(jq -r --arg cwd "$CWD_NORM" '
|
|
92
|
+
to_entries
|
|
93
|
+
| map(select(.value as $p | ($p | rtrimstr("/")) as $p | $cwd == $p or ($cwd | startswith($p + "/"))))
|
|
94
|
+
| max_by(.value | length) | .key // empty' "$BINDINGS" 2>/dev/null)
|
|
95
|
+
ISA="$PROJECTS_DIR/$PROJECT/ISA.md"
|
|
96
|
+
if [ -n "$PROJECT" ] && [ -f "$ISA" ]; then
|
|
97
|
+
OPEN_ISCS=$(grep -c -- '- \[ \] ISC-' "$ISA" 2>/dev/null) || OPEN_ISCS=0
|
|
98
|
+
fi
|
|
99
99
|
fi
|
|
100
100
|
|
|
101
101
|
# Create context progress bar (20 chars wide)
|
package/package.json
CHANGED
package/src/cli/doctor/health.ts
CHANGED
|
@@ -110,7 +110,7 @@ export function loginExpiryFindings(
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
const MOVES_EXPLAINED =
|
|
113
|
-
"they move your data, so they run only when you start them: PAL must be idle, a verified backup is taken first, every file is hash-checked, and pal cli migrate --undo <id> puts it back. PAL reads the old folders until then. PAL 1.0
|
|
113
|
+
"they move your data, so they run only when you start them: PAL must be idle, a verified backup is taken first, every file is hash-checked, and pal cli migrate --undo <id> puts it back. PAL reads the old folders until then. PAL 1.0 needs every one of them";
|
|
114
114
|
|
|
115
115
|
function ownerMovesFinding(pending: PendingMigration[]): Finding[] {
|
|
116
116
|
const count = pending.filter((migration) => migration.ownerRun).length;
|