Initial commit: Wonderware / System Platform tools and reference

Five tools under one repo, all docs organized per DOCS-GUIDE.md:

- aalogcli: .NET 4.8 / x86 CliFx CLI for reading System Platform binary
  logs (*.aaLGX) for LLM debugging, built on aaOpenSource/aaLog. Commands:
  last, tail, range, unread, fields. Stable JSON envelope under --llm-json.
  Build template under lib/build/ for rebuilding aaLogReader.dll.

- aot: ArchestrA Object Toolkit 2014 v4.0 reference material. Dev guide
  (Markdown converted from CHM), API reference for the ArchestrA.Toolkit
  namespace, and the Monitor / Watchdog VS sample solutions.

- graccesscli: .NET 4.8 / x86 CliFx CLI that automates Galaxy
  configuration via the ArchestrA GRAccess COM interop. Includes session
  daemon, IPC protocol, and llm-json envelope contract.

- grdb: SQL/DDL exploration of the Galaxy Repository database. DDL
  captures, reusable queries, hierarchy / contained-name <-> tag-name
  translation notes.

- histdb: LLM-oriented reference for AVEVA Historian retrieval. INSQL
  linked-server, extension tables, every wwXxx time-domain extension,
  every retrieval mode, alarm/event SQL recipes, REST API. Distilled
  from the 243-page Historian Retrieval Guide.

Root contains:
- CLAUDE.md: thin index pointing into each tool's README.
- DOCS-GUIDE.md: doctrine for organizing docs for LLM consumption.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-05-03 18:22:20 -04:00
commit 32f26272ae
411 changed files with 69973 additions and 0 deletions
@@ -0,0 +1,36 @@
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace ZB.MOM.WW.GRAccess.Cli.Protocol
{
public static class PipeProtocol
{
public const string PipePrefix = "graccess-session-";
public static string GetPipeName(string galaxyName)
{
return PipePrefix + galaxyName.ToLowerInvariant();
}
public static async Task WriteMessageAsync<T>(Stream stream, T message)
{
var json = JsonConvert.SerializeObject(message, Formatting.None);
var bytes = Encoding.UTF8.GetBytes(json + "\n");
await stream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false);
await stream.FlushAsync().ConfigureAwait(false);
}
public static async Task<T> ReadMessageAsync<T>(Stream stream)
{
using (var reader = new StreamReader(stream, Encoding.UTF8, false, 4096, leaveOpen: true))
{
var line = await reader.ReadLineAsync().ConfigureAwait(false);
if (line == null)
return default;
return JsonConvert.DeserializeObject<T>(line);
}
}
}
}
@@ -0,0 +1,35 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace ZB.MOM.WW.GRAccess.Cli.Protocol
{
public class PipeRequest
{
[JsonProperty("type")]
public string Type { get; set; } = "execute";
[JsonProperty("command")]
public string Command { get; set; }
[JsonProperty("subcommand")]
public string Subcommand { get; set; }
[JsonProperty("args")]
public Dictionary<string, object> Args { get; set; } = new Dictionary<string, object>();
public static PipeRequest Execute(string command, string subcommand, Dictionary<string, object> args = null)
{
return new PipeRequest
{
Type = "execute",
Command = command,
Subcommand = subcommand,
Args = args ?? new Dictionary<string, object>()
};
}
public static PipeRequest Shutdown() => new PipeRequest { Type = "shutdown" };
public static PipeRequest Status() => new PipeRequest { Type = "status" };
}
}
@@ -0,0 +1,33 @@
using Newtonsoft.Json;
namespace ZB.MOM.WW.GRAccess.Cli.Protocol
{
public class PipeResponse
{
[JsonProperty("success")]
public bool Success { get; set; }
[JsonProperty("output")]
public string Output { get; set; }
[JsonProperty("error")]
public string Error { get; set; }
[JsonProperty("exitCode")]
public int ExitCode { get; set; }
public static PipeResponse Ok(string output) => new PipeResponse
{
Success = true,
Output = output,
ExitCode = 0
};
public static PipeResponse Fail(string error, int exitCode = 1) => new PipeResponse
{
Success = false,
Error = error,
ExitCode = exitCode
};
}
}