prizmkit 1.1.64 → 1.1.66
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/bundled/VERSION.json
CHANGED
|
@@ -3,6 +3,47 @@ $ErrorActionPreference = 'Stop'
|
|
|
3
3
|
|
|
4
4
|
$script:PrizmAiProcess = $null
|
|
5
5
|
|
|
6
|
+
if (-not ('PrizmLineLogBridge' -as [type])) {
|
|
7
|
+
Add-Type -TypeDefinition @'
|
|
8
|
+
using System;
|
|
9
|
+
using System.Diagnostics;
|
|
10
|
+
using System.IO;
|
|
11
|
+
using System.Text;
|
|
12
|
+
|
|
13
|
+
public sealed class PrizmLineLogBridge : IDisposable
|
|
14
|
+
{
|
|
15
|
+
private readonly StreamWriter writer;
|
|
16
|
+
private readonly object sync = new object();
|
|
17
|
+
public readonly DataReceivedEventHandler Handler;
|
|
18
|
+
|
|
19
|
+
public PrizmLineLogBridge(string logPath)
|
|
20
|
+
{
|
|
21
|
+
writer = new StreamWriter(logPath, false, new UTF8Encoding(false));
|
|
22
|
+
Handler = new DataReceivedEventHandler(OnDataReceived);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
private void OnDataReceived(object sender, DataReceivedEventArgs eventArgs)
|
|
26
|
+
{
|
|
27
|
+
if (eventArgs.Data == null) return;
|
|
28
|
+
lock (sync)
|
|
29
|
+
{
|
|
30
|
+
writer.WriteLine(eventArgs.Data);
|
|
31
|
+
writer.Flush();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public void Dispose()
|
|
36
|
+
{
|
|
37
|
+
lock (sync)
|
|
38
|
+
{
|
|
39
|
+
writer.Flush();
|
|
40
|
+
writer.Dispose();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
'@
|
|
45
|
+
}
|
|
46
|
+
|
|
6
47
|
function Write-PrizmInfo { param([string]$Message) Write-Host "[INFO] $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') $Message" -ForegroundColor Blue }
|
|
7
48
|
function Write-PrizmWarn { param([string]$Message) Write-Host "[WARN] $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') $Message" -ForegroundColor Yellow }
|
|
8
49
|
function Write-PrizmError { param([string]$Message) Write-Host "[ERROR] $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') $Message" -ForegroundColor Red }
|
|
@@ -507,34 +548,9 @@ function Invoke-PrizmAiSession {
|
|
|
507
548
|
|
|
508
549
|
$process = [System.Diagnostics.Process]::Start($psi)
|
|
509
550
|
$script:PrizmAiProcess = $process
|
|
510
|
-
$
|
|
511
|
-
$
|
|
512
|
-
$
|
|
513
|
-
param($sender, $eventArgs)
|
|
514
|
-
if ($eventArgs.Data -ne $null) {
|
|
515
|
-
[System.Threading.Monitor]::Enter($logLock)
|
|
516
|
-
try {
|
|
517
|
-
$logWriter.WriteLine($eventArgs.Data)
|
|
518
|
-
$logWriter.Flush()
|
|
519
|
-
} finally {
|
|
520
|
-
[System.Threading.Monitor]::Exit($logLock)
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
$errorHandler = [System.Diagnostics.DataReceivedEventHandler]{
|
|
525
|
-
param($sender, $eventArgs)
|
|
526
|
-
if ($eventArgs.Data -ne $null) {
|
|
527
|
-
[System.Threading.Monitor]::Enter($logLock)
|
|
528
|
-
try {
|
|
529
|
-
$logWriter.WriteLine($eventArgs.Data)
|
|
530
|
-
$logWriter.Flush()
|
|
531
|
-
} finally {
|
|
532
|
-
[System.Threading.Monitor]::Exit($logLock)
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
$process.add_OutputDataReceived($outputHandler)
|
|
537
|
-
$process.add_ErrorDataReceived($errorHandler)
|
|
551
|
+
$logBridge = [PrizmLineLogBridge]::new($LogPath)
|
|
552
|
+
$process.add_OutputDataReceived($logBridge.Handler)
|
|
553
|
+
$process.add_ErrorDataReceived($logBridge.Handler)
|
|
538
554
|
if ($PidPath) {
|
|
539
555
|
$pidDir = Split-Path $PidPath -Parent
|
|
540
556
|
if ($pidDir) { New-Item -ItemType Directory -Force -Path $pidDir | Out-Null }
|
|
@@ -549,10 +565,9 @@ function Invoke-PrizmAiSession {
|
|
|
549
565
|
$process.WaitForExit()
|
|
550
566
|
return $process.ExitCode
|
|
551
567
|
} finally {
|
|
552
|
-
$process.remove_OutputDataReceived($
|
|
553
|
-
$process.remove_ErrorDataReceived($
|
|
554
|
-
$
|
|
555
|
-
$logWriter.Dispose()
|
|
568
|
+
$process.remove_OutputDataReceived($logBridge.Handler)
|
|
569
|
+
$process.remove_ErrorDataReceived($logBridge.Handler)
|
|
570
|
+
$logBridge.Dispose()
|
|
556
571
|
}
|
|
557
572
|
}
|
|
558
573
|
|
|
@@ -29,11 +29,6 @@ This project uses PrizmKit with the Prizm documentation system for AI-optimized
|
|
|
29
29
|
2. Generate a new L2 `.prizm` file following Prizm specification
|
|
30
30
|
3. Add a pointer in the parent L1 doc's SUBDIRS section
|
|
31
31
|
|
|
32
|
-
### Framework Source Parity
|
|
33
|
-
- When working in the PrizmKit framework source, `dev-pipeline/` and `dev-pipeline-windows/` are paired runtimes. Any runtime, prompt, schema, reset/recovery, timeout, heartbeat, logging, or AI CLI behavior change in one must be mirrored in the other, or explicitly documented as platform-specific.
|
|
34
|
-
- When working in the PrizmKit framework source, `core/skills/orchestration-skill/` and `core/skills/orchestration-skill-windows/` are paired skill sources. Any planner, workflow, launcher, prompt, or documentation behavior change in one must be mirrored in the other, or explicitly documented as platform-specific.
|
|
35
|
-
- Before finishing framework work, run `git diff --name-only` and verify these paired Unix/Windows paths were updated together.
|
|
36
|
-
|
|
37
32
|
### Available Commands
|
|
38
33
|
Run `/prizm-kit` to see all available PrizmKit commands.
|
|
39
34
|
|