Commit Graph

3 Commits

Author SHA1 Message Date
Joseph Doherty 87c0124174 Clarify script mutation limits 2026-05-05 16:40:55 -04:00
Joseph Doherty 3f6bfebd6d graccesscli: extend script editor surface — --field, --lock-trigger-type, scripts delete
Three additions to the script editor commands. Each one closes a real
gap surfaced by the round-trip-test against \$DelmiaReceiver.ProcessRecipe.

1. `object scripts set --field <name>` — explicit text-field selection.

   Previously `scripts set` always wrote to <Name>.ExecuteText (via
   ScriptAttributeName's default). To rewrite DeclarationsText / StartupText
   / ShutdownText / OnScanText / OffScanText / Expression, callers had to
   pass the full attribute name as `--script Foo.StartupText`, which is
   brittle. The new `--field` flag accepts any of the seven canonical
   ScriptTextSuffixes and composes <script>.<field> directly. Validates
   against the suffix list so an unrecognised --field surfaces a friendly
   error rather than a downstream FindAttributeForMutation failure.
   Default behavior (no --field) is unchanged: ExecuteText.

2. `object scripts settings set --lock-trigger-type` — parallel to the
   existing --lock-trigger-period. After writing TriggerType the new flag
   calls SetLocked(MxLockedInMe), matching the lock pattern on the period
   field. Without it, --trigger-type writes the value but leaves the
   attribute unlocked.

3. `object scripts delete` — script-named alias for the existing
   extension-delete subcommand. Wraps obj.DeleteExtensionPrimitive(
   "ScriptExtension", scriptName) inside AtomicObjectEdit (checkout / save
   / checkin). Removes the burden of remembering the generic
   `--extension-type ScriptExtension --primitive <Name>` form.

Test count delta: 61 -> 63 (+2 command-shape assertions for the new
ObjectScriptsSetCommand and ObjectScriptsDeleteCommand).

Live round-trip-test against \$DelmiaReceiver.ProcessRecipe:
- `--field DeclarationsText` write composed `ProcessRecipe.DeclarationsText`,
  CheckOut/Save/CheckIn all returned OK.
- `--field ExecuteText` round-trip same.
- A subsequent re-read shows the original body, suggesting that
  IAttribute.SetValue silently no-ops for ScriptExtension text fields on
  this GRAccess version (or the package-export reader pulls from a
  different snapshot than the just-saved revision). This is upstream of
  the editor surface — the new flags route correctly to the same SetValue
  path that scripts set already used. Diagnosing the SetValue
  ineffectiveness for script-text fields is a separate followup that
  should look at IScriptExtension-specific COM interfaces (per
  docs/script-parsing.md:8 "Object-level scripts are less direct").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 15:09:34 -04:00
Joseph Doherty 32f26272ae 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>
2026-05-03 18:22:20 -04:00