portable-agent-layer 0.51.0 → 0.51.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 +5 -1
- package/assets/statusline.sh +5 -1
- package/package.json +1 -1
- package/src/cli/index.ts +1 -1
package/assets/statusline.ps1
CHANGED
|
@@ -172,11 +172,15 @@ $QUOTES = @(
|
|
|
172
172
|
"In the middle of difficulty lies opportunity.|Albert Einstein"
|
|
173
173
|
"A person who never made a mistake never tried anything new.|Albert Einstein"
|
|
174
174
|
"The journey of a thousand miles begins with one step.|Lao Tzu"
|
|
175
|
+
"The obstacle is the way.|Marcus Aurelius"
|
|
176
|
+
"Whether you think you can or you think you can't — you are right.|Henry Ford"
|
|
177
|
+
"Everything should be made as simple as possible, but not simpler.|Albert Einstein"
|
|
178
|
+
"You miss 100% of the shots you don't take.|Wayne Gretzky"
|
|
175
179
|
)
|
|
176
180
|
$EPOCH = [DateTimeOffset]::UtcNow.ToUnixTimeSeconds()
|
|
177
181
|
$SLOT = [int]([math]::Floor($EPOCH / 5400))
|
|
178
182
|
$SLOT_OFFSET = $EPOCH % 5400
|
|
179
|
-
if ($SLOT_OFFSET -lt
|
|
183
|
+
if ($SLOT_OFFSET -lt 1800) {
|
|
180
184
|
$QUOTE_IDX = $SLOT % $QUOTES.Count
|
|
181
185
|
$QUOTE_PARTS = $QUOTES[$QUOTE_IDX] -split '\|'
|
|
182
186
|
Write-Host ($DIM + $ITALIC + '"' + $QUOTE_PARTS[0] + '" - ' + $QUOTE_PARTS[1] + $RESET)
|
package/assets/statusline.sh
CHANGED
|
@@ -208,10 +208,14 @@ QUOTES=(
|
|
|
208
208
|
"In the middle of difficulty lies opportunity.|Albert Einstein"
|
|
209
209
|
"A person who never made a mistake never tried anything new.|Albert Einstein"
|
|
210
210
|
"The journey of a thousand miles begins with one step.|Lao Tzu"
|
|
211
|
+
"The obstacle is the way.|Marcus Aurelius"
|
|
212
|
+
"Whether you think you can or you think you can't — you are right.|Henry Ford"
|
|
213
|
+
"Everything should be made as simple as possible, but not simpler.|Albert Einstein"
|
|
214
|
+
"You miss 100% of the shots you don't take.|Wayne Gretzky"
|
|
211
215
|
)
|
|
212
216
|
SLOT=$(( $(date +%s) / 5400 ))
|
|
213
217
|
SLOT_OFFSET=$(( $(date +%s) % 5400 ))
|
|
214
|
-
if [ $SLOT_OFFSET -lt
|
|
218
|
+
if [ $SLOT_OFFSET -lt 1800 ]; then
|
|
215
219
|
QUOTE_IDX=$(( SLOT % ${#QUOTES[@]} ))
|
|
216
220
|
QUOTE_ENTRY="${QUOTES[$QUOTE_IDX]}"
|
|
217
221
|
QUOTE_TEXT="${QUOTE_ENTRY%|*}"
|
package/package.json
CHANGED
package/src/cli/index.ts
CHANGED
|
@@ -439,7 +439,7 @@ function checkAgentHookPrefix(filePath: string, agentName: string): HookPrefixCh
|
|
|
439
439
|
if (!existsSync(filePath)) return { ok: false, total: 0, missing: 0 };
|
|
440
440
|
try {
|
|
441
441
|
const data = JSON.parse(readFileSync(filePath, "utf-8"));
|
|
442
|
-
const commands = extractAllHookCommands(data);
|
|
442
|
+
const commands = extractAllHookCommands(data.hooks ?? data);
|
|
443
443
|
const prefix = `PAL_AGENT=${agentName} `;
|
|
444
444
|
const missing = commands.filter((c) => !c.startsWith(prefix));
|
|
445
445
|
return {
|