A VS Code / Kiro IDE extension for editing Mongoose IDO Collection metadata
(ObjectStudioExport XML) through a friendly, visual UI instead of hand-editing deeply
nested XML.
Version 2.13.2. See CHANGELOG.md for release notes and DESIGN.md for the design and roadmap.
User guide: English (PDF) · 中文 (PDF) · tutorial video (bilingual, script).
Features (v1)
- Visual custom editor for any
**/Collections/**/*.xml IDO file, with tabs:
- Properties — the primary working view: a sticky Identity bar (name, module,
ext-class, revision, inline-editable description), a read-only property grid
(# · Name · Set / Where · Binding badge · Class · Source) that filters, sorts and scrolls
independently, with the Property Grid opening in document order by default and supporting drag reordering, and a resizable, toggleable editor side panel that stays in view.
The panel edits every field with dropdowns/checkboxes, shows inline validation, has Editor, Data Rules, and Bound Components sub-tabs, Open ↗ buttons to jump to a referenced IDO, and a read-only inherited PropertyClass section. Bound Components queries the installed SyteLine IDS Form Designer for direct IDS/IV2 bindings of the selected property and can reveal the exact control in its custom editor. Completed lookups are cached briefly in memory with bounded LRU storage; repeated requests are deduplicated, empty results are cached, and Refresh forces a rescan without starting a background query for every Property.
- Overview — edit identity / ext-class / revision fields.
- Tables — relationship-aware master–detail view with Primary/Secondary and IDO Alias badges, database table/view identity, Property usage counts and links, collapsible/filterable Usage, editable Join fields, inline validation, and add/edit/delete operations.
- Properties — master–detail with binding badges, key markers, drag-to-reorder
(auto-renumbers
Sequence), add/delete, and a binding-aware detail form
(BOUND/DERIVED/UNBOUND/SUBCOLLECTION fields + PropertyAttributes) with enum dropdowns.
- Methods — editable method cards (name, type, transactional, stored proc, description)
with a parameter grid (name, DB type/length/scale, in/out/message) and add/delete for methods
and parameters. Parameter and Result Set Column Sequence values are calculated from row order:
each grid displays in sequence order and offers Move up / Move down controls that reorder
the XML nodes and recalculate
1…N. SP + Result Set and C# + Result Set methods also expose
a Result Set Columns grid for the <ResultSetProperties> output contract; during a Dev Hub CLM refresh, its Match column lists deterministic/inferred/ambiguous candidate Properties for explicit selection, and the selected candidate is copied into the searchable Reference Property picker. Candidate selection updates locally without rebuilding or jumping the Methods editor; the persistent grid still preserves free-text output names.
Duplicate Method is available on the selected method and deep-copies its full XML subtree, including parameters and result-set columns.
- Data Rules — edit rule actions, activation conditions and filter conditions, with Set / Where filtering in the Property Editor side panel to focus on rules that set properties or filter rows, and Duplicate Rule for a complete deep copy that preserves unknown XML fields and nested content. When an IDO is saved, its direct DataRule nodes are ordered by
RuleName without reordering other metadata or rule internals.
- Feature Status — an IDO-level right-side panel collects Feature IDs from Data Rule activation conditions in an IDS Form Designer-style collapsible tree, with summary cards, grouped status cards, expandable details, text/status filters, AppFeatures details, and direct rule-reference navigation. Live
AppFeatures status querying through the MG REST Client runs automatically once when the panel is opened, if the client is available; opening without the client remains static and does not prompt. Check Feature Status is always available as the explicit force-refresh action and follows the active MG REST Client connection profile, reusing its stored token without opening the IDO Editor connection form, matching IDS Form Designer behavior. Live results distinguish Force GA, GA Active/Inactive, Pre-Release Active/Inactive, and Hidden Active/Inactive; ActivatedBy is only considered for active GA features. Force GA remains an advisory warning based on current AppFeatures data, not an authoritative audit, and the editor never removes conditions or DataRules automatically.
- Cached Settings — inspect and edit IDO cached-setting declarations, with Duplicate Cached Setting to deep-copy the selected declaration and all of its XML children while assigning a unique name.
- Data tab (read-only live preview) — when the MG REST Client extension (
jeking.mg-rest-client)
is installed, a Data tab runs a LoadCollection against the server and shows the rows in a grid.
Columns are seeded from the IDO's own properties (keys first; subcollections excluded) via a
searchable column picker (All / None / Reset, key markers); a SQL-WHERE server filter, a
Top-N cap, an in-results Find box, click-to-sort headers (numeric-aware), Copy (TSV,
copies the rows shown) and an Open in MG REST Client hand-off (opens the same query in the full
REST client) round it out. Read-only, and hidden when the MG REST Client isn't installed.
- IDO Outline — a second sidebar tree showing the structure of the active IDO
(Tables, Properties grouped by binding, Methods → parameters, Data Rules, Cached Settings).
Clicking a node navigates the visual editor to that item and focuses it.
- Cached-setting aware data rules — authoring a
Cached Setting activation condition now resolves the
chosen IDO's <CachedSetting> declarations on demand: the Setting IDO field lists only the IDOs that
actually declare cached settings (9 of ~5,700 in a real corpus), the Setting field becomes a picker of the real
setting names, Value offers the backing property's coded values, a hint shows the scope/source
(Site/User · property/method), and a name that isn't declared there is flagged inline. Both fields stay
free-text so a not-yet-indexed name can still be typed. The condition's comparison also offers the full
six operators (=, ≠, ≥, >, ≤, <).
- IDO Cached Settings panel — an activity-bar tree of every
<CachedSetting> declaration and whether any
data rule reads it (IDO → setting), showing all declarations by default; the title-bar filter toggle narrows
to the ones with no data-rule reference (22 of 41 in a real corpus). Each IDO node has an inline
cloud-upload icon (and a right-click Import to SyteLine…) that imports that declaring IDO's XML. Each
setting that a data rule reads is expandable — its reading references are grouped by reading IDO,
with the individual rules (part · kind) listed beneath each; clicking an IDO group or a rule opens that IDO
on the Data Rules tab. Each setting row's tooltip also
lists the reading rule parts and the scope/source. Detection covers all three reference kinds: action (ValueType=1/ActionType=10), activation condition (SourceType=4) and filter condition
(ValueType=2). IDO metadata only — an empty reference list means "no data-rule reference found", not
that the setting is unused: a form script or C# extension class may still read it.
- Labeled enums — "magic number" fields (MethodType, Binding, OperationType,
ActionType, comparison operators, …) render as dropdowns with human labels.
- Validation — semantic + intra-file reference checks surfaced as diagnostics
(Problems panel) and a live footer summary: required fields, invalid enum codes,
duplicate names, BOUND/DERIVED/SUBCOLLECTION requirements,
ColumnTableAlias must
match a real table alias, duplicate sequences, a Set Property Value on a Read-Only property
with no paired Set Property Updateable before it in the same rule (since 2.6.0 a Set Property Enabled for that
property under the same trigger also satisfies it, and the editor adds the missing Updateable as you author the
write), a Set Property Value rule on Update
whose filter has no Is Modified condition (warning), and more. A Fix all button in the
Problems panel applies safe default fixes for eligible errors (e.g. setting IsReadOnly on a
property targeted by a "Set Property Enabled" data-rule action, or inserting the missing
Set Property Updateable action before a read-only Set Property Value). IDO: Validate All scans every
indexed collection at once (batched, schema-aware), lists every flagged file in the Problems panel,
and offers a themed report (IDOs sorted by error/warning count). After a scan the IDO Explorer
filter can narrow the tree to IDOs with errors / warnings / clean, and flagged rows show a
⛔ N · ⚠ M badge.
- IDO Explorer — activity-bar tree of all collections grouped by module, with a
fuzzy Go to Collection… quick-pick.
_IDS variants are flagged. Its filter (title-bar search)
combines a name substring with a validation status (all / has errors / has warnings / clean;
a status pick runs IDO: Validate All first if nothing has been scanned yet).
- Base ⇄ _IDS compare — open a diff between a collection and its
_IDS sibling.
- PropertyClass editor —
**/PropertyClasses/**/*.xml files open in a dedicated visual
master–detail editor (list of PropertyClass definitions + a detail form covering the full
PropertyAttributes set from PropertyClass.xsd), with clean round-trip and validation.
A dedicated IDO Property Classes activity-bar panel (grouped by module) and the
IDO: Go to PropertyClass… quick-pick help you find and open them.
- Clean round-trip — writes are format-conformant (BOM, CRLF, 3-space indent,
self-closing empties) and schema-faithful. 98% of the real corpus round-trips
byte-for-byte; the rest are irregularly-indented files that get normalized by design.
- Always available: one-click Open as XML to drop to the raw text editor.
Configuration
| Setting |
Default |
Description |
mgIdo.collectionsGlob |
**/IdoMetadata/**/Collections/**/*.xml |
Files discovered for the explorer/index. |
mgIdo.devHub.preserveExistingMethodMetadata |
false |
When refreshing Method parameters from Dev Hub, preserve existing same-name direction/message and DBDataType/Length/Scale metadata instead of applying returned metadata. |
mgIdo.devHub.mapCsharpTypeToDbDataType |
true |
Map known C# primitive types to IDO DBDataType during Method Parameter refresh. Unknown types are retained with warnings; CLM Result Set Columns are not type-mapped. |
mgIdo.formsGlob |
**/*.{ids,iv2}.json |
Files scanned by the Forms Using This IDO panel (SyteLine IDS/IV2 form JSON). |
mgIdo.metadataRoots / mgIdo.metadataRoot / mgIdo.mongooseMetadataRoot |
(empty) |
Explicit IDO metadata root folders to index (Collections + PropertyClasses). When all empty (default), the extension auto-detects metadata from the open workspace via collectionsGlob. |
mgIdo.fallbackDevRoot |
C:\\Development\\csi |
Fallback CSI dev root used only when no metadata-root setting is set and the open workspace has no IDO metadata. The extension then indexes <fallbackDevRoot>\\IdoMetadata and <fallbackDevRoot>\\Mongoose.submod\\IdoMetadata\\Mongoose. |
mgIdo.indentSize |
3 |
Indent width fallback. |
mgIdo.validateOnSave |
true |
Validate on save. |
mgIdo.openVisualByDefault |
true |
Retained for compatibility; matching metadata files use the visual editor by default. Choose Open With Text Editor for raw XML. |
mgIdo.sequenceMode |
contiguous |
contiguous | preserve | gapped sequence numbering. |
mgIdo.formatScope |
document |
document | touched formatting scope (v1: document). |
mgIdo.referenceScope |
module |
module | workspace cross-reference resolution. |
mgIdo.sytelineInstallPath |
C:\Program Files\Infor\CSI |
Folder with AppMetadataTransport.exe used to import IDO XML for testing. Falls back to …\Setup\WinStudio and the dev …\Mongoose.submod\Setup\WinStudio. |
mgIdo.importConfig |
(empty) |
Target SyteLine configuration for imports (e.g. Demo_DALS). Prompted and saved here on first import if empty. |
mgIdo.clearCacheAfterImport |
true |
After a successful IDO import, discard that configuration's IDO metadata cache so the imported changes reload. For the AppMetadataTransport path it runs ConfigManCMD.exe -U:CACHE -c:<config>; for the MG REST path (mgRest.enabled) it invokes IdoProjects.DiscardMetadataCache. Requires no login token (transport) / reuses the REST connection. |
mgIdo.mgRest.enabled |
false |
Use the MG REST Client extension (jeking.mg-rest-client) to import/export IDOs over the Mongoose REST API (IdoCollections.ImportFromXmlString / GenerateXml) instead of AppMetadataTransport.exe. When on, Import goes over REST and IDO: Export from SyteLine becomes available; you're prompted for the connection each time. |
mgIdo.mgRest.baseUrl / mgIdo.mgRest.config / mgIdo.mgRest.username |
(empty) |
Defaults used to pre-fill the connection prompt. The password is always prompted and never stored. |
mgIdo.mgRest.insecure |
false |
Skip TLS certificate verification for MG REST import/export (self-signed dev servers). |
mgIdo.bumpRevisionOnSave |
true |
On save of a changed IDO file, stamp <RevisionDate> and calculate <RevisionNo>. With Git file history, the committed HEAD RevisionNo + 1 is the minimum, repeated uncommitted saves stay stable, and a manually higher value is preserved; without Git, the legacy current-value + 1 behavior remains. A Git repository with no history for the file starts at 1. |
mgIdo.schemaCatalog |
(empty) |
Path to a JSON DB schema catalog { "Table": ["Col", …] }. When set, validation also flags Table names not in the schema and BOUND properties whose BoundToColumn isn't a real column of its table. |
Schema-aware validation (verify tables & columns)
Point mgIdo.schemaCatalog at a JSON file mapping each table to its columns; validation then
checks that every <Table Name> exists and every BOUND property's BoundToColumn is a real
column of its table (surfaced as warnings in the Problems panel). Generate the catalog from
INFORMATION_SCHEMA, e.g. with sqlcmd + a small transform:
sqlcmd -S localhost -E -d <YourDb> -h -1 -W -s "," -Q \
"SELECT TABLE_NAME + ',' + COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS" \
| awk -F, 'NF==2{printf "%s\t%s\n",$1,$2}' \
| node -e "const m={};require('readline').createInterface({input:process.stdin}).on('line',l=>{const [t,c]=l.split('\t');if(t&&c){(m[t]=m[t]||[]).push(c);}}).on('close',()=>process.stdout.write(JSON.stringify(m)))" \
> schema-catalog.json
Commands
- IDO: Open in Visual Editor / IDO: Open as XML
- IDO: Validate / IDO: Validate All — validate the active file, or scan every indexed collection
(Problems panel + a themed report; then filter the explorer to flagged IDOs)
- IDO: Go to Collection…
- IDO: Compare base ⇄ _IDS variant — native side-by-side XML diff
- IDO: Compare base ⇄ _IDS (structured) — a readable HTML report (themed tables) of what differs
(added / removed / changed properties, tables, methods, data rules), ignoring the revision stamp
- IDO: Analyze Cached Setting Impact… — cross-file report of every data rule (action/condition)
that reads a chosen cached setting, so you can see what breaks before renaming/removing it
- IDO: Analyze Data Rules (test plan) — writes
<IDO>.datarules.md: a test-plan analysis that
classifies every rule by REST-testability, renders trigger logic trees, lists environment
dependencies, derives test scenarios (for automated MG API test generation), and reports Standard Operations
baselines (IDOOp*/FormOp* + Enable Operation rules) and UI expectations (form operations, property visibility)
- IDO: Show Data Rule Logic (pseudo-code + Mermaid) — opens an untitled Markdown document with the
IDO's data rules grouped by operation, activation conditions (compared as a set) and row filter
(compared by truth table, so differently written but equivalent filters share a group), as pseudo-code
and Mermaid flowcharts; VS Code's built-in Markdown preview renders the diagrams. In the editor, the
Logic button in the Data Rules list shows the same grouping as a searchable, filterable tree, and
rules with an identical trigger are linked (
≡N badge, Same trigger as … links, Show in Logic
view). In the logic view, clicking a rule opens the rule editor beside the tree, and Edit group
changes a whole condition group at once (the shared conditions' values, Active, Enforce in UI) with a
preview and a single undo; + Add rule on a row filter creates a new rule with that trigger. A Feature ID or cached setting in the tree opens a menu: show the rules that
use it, or open it in Feature Status / in the IDO that declares the setting. Each action shows as a
colour-coded tag (SET, DEFAULT, REQUIRED, PRE-SAVE, …) next to the rule name. By target
regroups the actions by what they change (property → action → ON → FOR → rule) and marks targets that
several rules change or that are set to different values (in red when under the same trigger). The Markdown export is read-only and none of it shows the runtime order of rules
- IDO: Apply Authoring Spec… — pick an
idoAuthoringSpec:1 JSON file and apply it to the active
IDO (add/update properties + add data rules); strictly validated, shows a summary and confirms
before writing (same engine as the ido_apply_spec MCP tool)
- IDO: Import to SyteLine (for testing) — deploys the current IDO XML via
AppMetadataTransport.exe
(or, when mgIdo.mgRest.enabled is on, over the Mongoose REST API via IdoCollections.ImportFromXmlString)
- IDO: Import to SyteLine (AppMetadataTransport) — always uses
AppMetadataTransport.exe, even when
mgIdo.mgRest.enabled is on — a fallback that doesn't require toggling the setting off (also offered
as a button if a REST import fails)
- IDO: Export from SyteLine (MG REST) — with
mgIdo.mgRest.enabled on, exports the IDO's XML from the
server via IdoCollections.GenerateXml and offers to diff it against the workspace file (format/semantic
fidelity check). Every REST call is verified (HTTP + ReturnValue/infobar) with visible errors.
- IDO: Test in MG REST Client — opens a pre-selected quick test form (Load/Update/Invoke/…) using the REST client's active profile, or Generate Data Rule Tests (calls
mgRestClient.generateDataRuleTests to build a test collection from this IDO's data rules); shown only when the jeking.mg-rest-client extension is installed
- IDO: Generate REST Tests for Properties… (also a beaker button on a property's Data Rules tab and on a property row of the logic view's By target) — MG REST Client 4.0.44+ generates only the chosen properties' data-rule and validator cases, while it still reads the whole IDO to arrange them (
mgRestClient.generateDataRuleTests(path, { scope })). Saves the IDO first. With an older MG REST Client it offers Generate for the whole IDO. mgIdo.propertyTests.includeFilterUse also includes the rules that only read the property in their row filter
- SyteLine Dev Hub integration (shown only when the SyteLine Dev Hub extension is installed):
IDO: Open C# Entry Point (title-bar → jump to the IDO's C# entry-point code), IDO: Forms
Using This IDO (title-bar → every form that consumes the IDO), IDO: Trace Dependencies in Dev
Hub (title-bar → down-trace the IDO's C# entry point), and IDO: Trace GetService Roots
(right-click a method in the IDO Outline → trace that method's services)
- SyteLine IDS Form Designer integration (shown only when the
jeking.sl-ids-form-designer
extension is installed): IDO: Forms Using This IDO Method… (title-bar → pick one of the open
IDO's methods and list the workspace forms that call it — declarative event calls and form-script
Invoke — then pick a form to open it). The same lookup is also a per-method button in the
Methods editor (scoped to that method, no picker). The selected Property Editor also has a
Bound Components tab that calls slIds.findComponentsBoundToPropertyData for the exact
IDO/property; each result can call slIds.selectLayoutNode to activate the IDS/IV2 custom
editor and reveal the bound control. This part is available only when the Form Designer exposes
both commands.
- IDO: Enable XSD Validation (Red Hat XML) — binds the bundled official Mongoose
IDODefinition.xsd to **/Collections/**/*.xml so the Red Hat XML extension validates IDO files against the schema
- IDO: Rebuild Index
For other extensions (programmatic)
mgIdo.openIdoByName(name: string): Promise<boolean> — resolve an IDO by name via the
workspace index and open it in the visual editor; returns true if found. Hidden from the
Command Palette. Example:
const ext = vscode.extensions.getExtension('jeking.mg-ido-pro-editor');
await ext.activate();
const ok = await vscode.commands.executeCommand('mgIdo.openIdoByName', 'SLItems');
Read-only metadata API (used by MG REST Client to source IDO metadata from the workspace files
instead of live Mongoose REST queries — faster and works offline). Each returns undefined when the
IDO isn't found in the workspace, so the caller can fall back to REST. Activate the extension first.
| Command |
Returns |
mgIdo.api.getIdoNames() |
string[] — distinct IDO collection names in the workspace |
mgIdo.api.validateAll() |
{ scanned, withErrors, withWarnings, idos:[{ ido, path, errors, warnings, issues[] }] } — validate every indexed collection (schema-aware; same engine as the ido_validate_all MCP tool) and return the flagged IDOs. Cross-extension callers (e.g. SyteLine Dev Hub) use this because extensions can call commands but not MCP tools; also refreshes the IDO Explorer's validation badges. |
mgIdo.api.getMethods(ido, kind?, opts?) |
{ name, type }[] — kind='load' for custom-load (result-set) methods, else invokable |
mgIdo.api.getProperties(ido, opts?) |
{ name, isKey, readOnly, required, type, binding }[] — binding is BOUND (default) / DERIVED / UNBOUND / SUBCOLLECTION |
mgIdo.api.getPropertiesDetail(ido, opts?) |
IdoPropertyDetail[] — batch form of getProperty (one workspace lookup, each PropertyClass resolved once; identical field semantics). With { resolve:'effective' } returns { ido, chain, unresolved, complete, warnings, properties[] } instead |
mgIdo.api.getIdo(ido, opts?) |
IdoInfo — IDO-level info: name, module, isIds, path, serverName, accessAs, description, labelStringId, extends, replaceFlag, customAssemblyName, extClassNamespace, extClassName, quoteTableAliases, quoteSchemaNames, revisionNo, revisionDate, the raw standardOps tags, and standardOpsNormalized ({ ido, form } baselines enabled/disabled/default/inherited-unknown — same as analyzeDataRules().spec.standardOps). Lets a consumer know whether Insert/Update/Delete are Disabled at the baseline without parsing XML |
mgIdo.api.getProperty(ido, name, opts?) |
IdoPropertyDetail — full detail for one property (case-insensitive). Convenience fields (type, dataLength, labelStringId, readOnly, required, isHTML, isRORecordFlag, defaultValue) are effective: the property's own value, else inherited from its PropertyClass chain. Also returns name, binding, sequence, isKey, propertyClass, propertyClassChain, boundToColumn, columnTableAlias, expression, subcollection, initialValue, plus three attribute bags — attributes (own only), inheritedAttributes (from the PropertyClass chain), effectiveAttributes (merged, own wins; canonical camelCase keys). labelStringId is the caption string id (e.g. sItemDescription), not resolved text. undefined if not found. |
mgIdo.api.getMethodParameters(ido, method, opts?) |
{ name, direction, type, sequence, length?, scale? }[] (direction: in/out/inout/message; type is the DB data type) |
mgIdo.api.getMethod(ido, name, opts?) |
IdoMethodDetail — { name, methodType, isLoad, transactional, storedProcedure, description, parameters[], resultSetProperties[{name,sequence}] }; resultSetProperties is the declared output-column contract of a result-set method (MethodType 1/3), so a consumer can show the columns without running the method. undefined if not found |
mgIdo.api.getPropertyDomain(ido, property, opts?) |
PropertyDomain — allowed values of one property, own attributes over the PropertyClass chain: kind (inline-list / in-collection / domain-ido / none), codes[] (stored codes; honours VALUE(n)), runtimeExpressions (the list also has V(...) entries only known at runtime), domainIdo / domainProperty / listProperties, the validators[], and ruleOverrides[] (data-rule actions 4/5/6 that can change the list at runtime) |
mgIdo.api.getPropertyRules(ido, property, opts?) |
PropertyRuleRef[] — every data rule that acts on the property (role:'set' – set / default / require / validate / enable ...) or filters on it (role:'where'), with actionType (+label), REST-testability class, activation conditions[], the row filter and a one-line summary. A rule that does both appears twice |
mgIdo.api.validateIdo(idoNameOrPath) |
{ ido, path, errors, warnings, suggestions, issues[] } — validate one IDO (same engine and issue shape as validateAll), or undefined if not found |
mgIdo.api.getSnapshot(ido, opts?) |
{ fingerprint, ido, properties[], methods[], dataRules[] } — everything in one call. fingerprint is a SHA-256 over the IDO file bytes (every Extends chain file in effective mode) and the PropertyClass files its properties resolve through; cache the snapshot and refresh when it changes. Does not cover other IDOs referenced by validators or the Forms |
mgIdo.api.getDataRules(ido, opts?) |
IdoDataRuleInfo[] — all data rules with active/inheritToUI/operationType (+label) and their actions (incl. operationName for Enable Operation) / conditions / filters (each with decoded labels, e.g. ActionType → "Set Property Enabled") |
mgIdo.api.getDataRule(ido, ruleName, opts?) |
a single data rule by name (case-insensitive), or undefined |
mgIdo.api.analyzeDataRules(idoNameOrPath) |
{ markdown, spec } — the full Data Rule + property-validator test-plan analysis (accepts an IDO name or a file path), or undefined. spec also carries standardOps (IDO/form operation baselines + the rules that enable them) and uiExpectations (form operations / property visibility - UI-only, not REST-testable); ActionType 10 is class operation, 11/12 are ui-only. When the IDO Extends a base that is in the workspace, the base's Standard Operations flags are resolved (an undeclared flag is no longer inherited-unknown). Since 1.128.0, every kind:'setting' activation condition (and every valueType:'2' row-filter predicate) also carries setting - the resolved <CachedSetting> source { ido, name, resolved, scopeLevel?, sourceType?, propertyName?, methodName?, filter?, allowed?, declaredIn? } - and features[] has condition-setting-source. Only the declaring file and its _IDS sibling are searched; a setting declared by an Extends base is resolved:false. |
mgIdo.api.getCachedSettingUsage() |
CachedSettingUsage[] — every declared <CachedSetting> with { ido, settingName, scopeLevel, sourceType, propertyName/methodName, references[] }. references covers action / activation-condition / filter-condition reads, each with the reading IDO and location. An empty references list means no data-rule reference in the IDO metadata — not proof the setting is unused. |
mgIdo.api.applySpec(idoNameOrPath, spec, opts?) |
{ ok, applied, ido, path, accessAs, summary:{added,updated,rules}, changes[{ kind, op, name, field, before?, after? }], unchanged, error? } - the one writing command (2.2.0). Previews (default) or, with { apply: true }, applies an idoAuthoringSpec:1 to one IDO (exact name, _IDS names included, or a file path). Same validation and engine as Apply Authoring Spec / ido_apply_spec; reads the open editor buffer; respects mgIdo.accessAs; writes through a WorkspaceEdit (Undo-able, saved only with save: true); a spec that changes nothing writes nothing. field is a property field or attributes.<key> (e.g. attributes.validators). Since 2.2.1: an add of an existing property or RuleName, or a name listed twice in the spec, is ok:false; so is a spec that would introduce a validation error (listed in issues[]; errors already in the file don't count). The preview returns fingerprint; pass it back as { apply: true, fingerprint } and the write is refused if the file changed since the preview. Since 2.3.0: data rules accept op: 'upsert' (a new RuleName is added; an existing rule is replaced in place - position and name kept, Active/InheritToUI/OperationType set when given, actions/conditions/filters each replaced whole, an omitted list emptied; a repeated upsert writes nothing); summary.rulesUpdated counts replaced rules; changes[] lists data-rule fields (active, inheritToUI, operationType, and actions/conditions/filters as text, one line per item in run order); the Read Only checks follow the PropertyClass chain; a name that matches two workspace files is refused as ambiguous, and Name.xml without a folder is looked up as the name Name |
mgIdo.api.applySpecs(items, opts?) |
{ ok, applied, error?, items:[{ ido, path, ok, applied, saved?, error?, accessAs, summary, changes, unchanged, fingerprint, issues? }] } - several IDOs, all or nothing (2.3.0). items: [{ ido, spec, fingerprint? }]. Every item is previewed against its open buffer; if any fails (not found, ambiguous, Access As, spec error, name conflict, new validation errors, fingerprint mismatch, the same file twice) nothing is written and every item still reports its own result. Otherwise { apply: true } writes every changed file through one WorkspaceEdit; save: true saves each and reports saved per item (VS Code has no multi-file save transaction, so a failed save is reported, not rolled back). Feature flags: capabilities().authoring |
mgIdo.api.convertFormStateRules(formPath, opts?) |
{ ok, error?, form, ido, idoPath, spec, items[], formChanges[], requires:{conditionGroups}, counts } - never writes (2.4.0). Converts the form's enabled_when / visible_when / required_when expressions on primary-IDO properties into an idoAuthoringSpec draft: Set Property Enabled (9) / Visible (12) / Required (3) rules (op: 'upsert', InheritToUI 1, deterministic names) plus IsReadOnly / IsHidden updates. Preview/apply the spec with mgIdo.api.applySpec, then make formChanges. Each items[] entry is converted, skipped (with the reason: #V, non-feature #GV, functions, several tuples on one target, …), conflict (another form on the same IDO uses a different expression) or existing. Conditions are copied in written order (form and filter share the left-to-right evaluator); a False value is negated; every rule is checked by truth table. opts: components, settings, primaryCacheNew: 'skip' \| 'operationType', featureVar: 'convention' \| 'skip'. Since 2.5.0: the first argument may be { form: <in-memory JSON>, path? }; ido (exact target IDO, e.g. SLItems_IDS); conflicts compare only forms whose primary IDO is the target (conflictScope: 'none' or a caller otherForms list instead); variables ({ "<#GV/#V name>": { setting: { ido, name } } \| { feature } }) and builtInVariables (Avail_<X> → the SLOptionalModules_IDS setting that SLParms.GetStartupAvailParms checks, e.g. Avail_TMS → TransportationManagement; Avail_PP / MO / AU / GenAI are refused as variable-not-equivalent; other names → a unique Cached Setting name, inferred) turn license / parameter terms into SourceType 4 activation conditions or ValueType 2 filters, checked against the declared settings; extraProperties (added by the caller in the same write). post301_format ENABLEDWHEN / VISIBLEWHEN / REQUIREDWHEN directives are converted and removed; a converted required clears flags bit 512; rules[] lists each rule's triggers (incl. ComparisonPropertyName) and settings; items[].source is when / post301 |
mgIdo.api.findFormsUsingIdo(idoName) |
FormUsageRow[] — workspace IDS/IV2 forms that use the IDO, each with { formName, path, variant, isPrimary, primaryIdo, properties, objectRefs } (where-used detail). isPrimary resolves every real primary_ido shape (plain, SL.-prefixed, Ido.CustomLoadSp, or empty → falls back to primary_datasource). Name matching is exact — SLItems and SLItems_IDS are different collections; a form that uses the sibling is returned with sibling: true + matchedIdo and never counted as a use of the requested IDO. properties covers every collection slot the IDO occupies — primary and secondary (object2…objectN) — and objectRefs lists those slots. Results are cached per file (invalidated by mtime + a file watcher), so repeat lookups are near-instant. |
opts – the Extends-effective view. getIdo, getProperties, getProperty, getPropertiesDetail, getMethods, getMethod, getMethodParameters, getPropertyDomain, getPropertyRules, getDataRules, getDataRule and getSnapshot accept an optional last argument { resolve: 'self' | 'effective' }. 'self' (default) is exactly the previous behaviour — the IDO's own file only. 'effective' follows the IDO's <Extends> chain (cycle-guarded, at most 8 bases; _IDS is never implied) and merges: properties and methods by case-insensitive name, data rules by RuleName, Standard Operations flags by tag — the child always wins and base-only items are kept. Each returned item carries declaredIn (the IDO that declares it). getIdo adds chain, unresolved (bases not in the workspace), complete and warnings; an unresolvable base never throws — you get what is known with complete:false.
mgIdo.api.v2.* and mgIdo.api.capabilities() (1.126.0). Every v2 command takes one request object and returns one result envelope; the v1 commands above are unchanged and remain the compatibility entry point.
// request // result
{ ido?: string; path?: string; { ok: boolean;
resolve?: 'self' | 'effective'; reason?: 'bad-request' | 'ido-not-found' | 'item-not-found' | 'ambiguous' | 'read-error';
property?; method?; ruleName?; kind?; generated? } complete: boolean; source: 'ido-xml'; contractVersion: 2;
ido?; path?; candidates?; chain?; unresolved?; replacedBy?; replaces?;
warnings: { code, message }[]; data?: T }
- Commands:
getIdo, getProperties, getProperty, getPropertiesDetail, getMethods (kind), getMethod (method), getMethodParameters (method), getPropertyDomain (property), getPropertyRules (property), getDataRules, getDataRule (ruleName), validateIdo, getSnapshot, analyzeDataRules - all as mgIdo.api.v2.<name>. Array results are always in data, in both modes.
ido or path: at least one. Both given -> path wins; if the file's IDO name differs from ido you get the warning path-name-mismatch. Two files with the same IDO name -> reason:'ambiguous' with candidates (pass path).
complete says how much the answer saw (unresolved or ambiguous base, Extends cycle, depth cap -> false). The four "nothing read" reasons are always false; item-not-found keeps the real value (true = the item does not exist, false = not found in the part that could be seen).
- Warning codes:
path-name-mismatch, base-unresolved, base-ambiguous, extends-cycle, extends-depth, replaced-by, replaced-by-multiple, item-not-found.
replacedBy / replaces: an IDO that Extends a base with ReplaceFlag=1 replaces it - per the Infor documentation (Extend and Replace IDOs), requests for the base are rerouted through the extending IDO. This is a documentation excerpt, not verified against a running tenant. It does not change how metadata merges. replacedBy only sees IDOs in the indexed workspace: an empty list means "no replacer found there", not "not replaced".
- Baselines (
getIdo): standardOpsNormalized entries carry value (raw reading), effective (enabled/disabled/unknown), basis (declared / inherited / assumed-default / unresolved) and declaredIn. They are resolved through the Extends chain in both resolve modes; assumed-default is the unverified assumption that an undeclared flag means enabled.
- Tables (v2
getIdo, since 1.129.0): data.tables lists the declared <Tables> as raw facts - { alias, name, type, joinType?, explicitJoin?, declaredIn? }, trimmed only (the ON clause is not parsed; XML entities are decoded), empty joinType / explicitJoin omitted. Always present ([] when none). self = the file's own tables in document order; effective = alias-merged (case-insensitive, child wins, a child override keeps the base position, declaredIn per entry). Look tables up by alias, not by index or by 'primary first'. v1 getIdo does not carry tables.
getPropertyDomain v2: base.sources[] lists every source present (inline list, INCOLLECTION validator, Domain IDO); overrides[] are the data-rule actions (4/5/6) that can change them, each with the value it sets, when (activation conditions) and filter. Which override wins when several fire is not known (precedence:'unspecified').
analyzeDataRules v2: self is the v1 result; effective analyses the merged view. Rules that come from a base carry declaredIn and inherited:true, and the spec gets the gap inherited-rules-unverified - that a base IDO's rules apply to the extending IDO is a convention, not verified. getPropertyRules uses the same analysis, so the two cannot disagree. The spec now carries features[] (append-only capability names). Since 1.127.0 operation baselines in spec.standardOps are { flag, value, effective, basis, declaredIn? } (assumed-default = undeclared treated as enabled, an unverified assumption), and Enable-IDO-Operation scenarios carry operation, ruleOperationType, a structured arrange (one dimension per scenario, breakGate, subject, selectFilter, otherEnablingRules) and reject:{by:'unspecified'} for negatives - details in docs/datarule-tests-mg-rest-client-request.md section 7.
getSnapshot v2: the fingerprint also hashes the contract version, and the Extends chain files whenever bases were consulted.
- Merge convention (
resolve:'effective', unverified against the runtime): items match by name (RuleName for rules, alias for tables, setting name for cached settings); a child item replaces the base item as a whole (no per-field merge); a child cannot delete a base item; base items keep their position, child-only items are appended.
mgIdo.api.capabilities() returns { contractVersion, extensionVersion, commands[{name, since, v2?}], request, spec:{specVersion, features[]}, limits }. A consumer should cache it but drop the cache when a v2 call fails because the command does not exist, when extensions change, or when extensionVersion changes.
MCP server (for AI agents)
The extension ships a dependency-free MCP server (dist/mcp/server.js, stdio JSON-RPC)
that exposes the IDO engine to MCP-capable agents (e.g. Kiro). Register it with
IDO: Register MCP Server with Kiro (writes .kiro/settings/mcp.json, seeding
MG_IDO_ROOTS from your metadata-root settings); remove it with IDO: Unregister MCP
Server from Kiro. After an extension upgrade, an existing registration is refreshed
automatically on activation (the launcher + entry are regenerated so the newest server ships
without re-running the command); this never creates a registration you didn't opt into and can be
turned off with mgIdo.mcpAutoReregister. Tools:
| Tool |
Purpose |
ido_create |
Create a new IDO collection file at a path or in an existing folder (identity + optional initial tables/properties/methods/data-rules) — dry-run/apply, won't overwrite unless overwrite:true. |
ido_update |
Update an IDO's definition-level (identity) fields — dry-run/apply. |
ido_delete |
Delete the entire IDO collection file (dry-run/apply; distinct from ido_delete_item). |
ido_list_collections |
Discover IDOs under MG_IDO_ROOTS (name, module, AccessAs, _IDS, path). |
ido_get_model |
Full structured model (tables/properties/methods/data-rules) for one file. |
ido_get_property / ido_get_table / ido_get_method / ido_get_data_rule |
Fetch a single item by name. |
ido_list_property_classes |
List PropertyClasses discovered under MG_IDO_ROOTS (name, BaseClass, file). |
ido_describe_enums |
Code↔label catalog for every "magic number" field (Data Rule OperationType/ActionType/ValueType/SourceType/ComparisonOperator, Binding, MethodType, DataType, formats); optional enum filters to one. Makes the server self-documenting for agents. |
ido_validate |
Semantic + reference validation issues (schema-aware when MG_IDO_SCHEMA is set); pass checkReferences:true to also resolve cross-file INCOLLECTION/IDOMETHOD/Domain + cached-setting references against MG_IDO_ROOTS and flag dangling ones, plus one suggestion listing properties whose PropertyClass (or a BaseClass in its chain) is not under MG_IDO_ROOTS. |
ido_validate_all |
Batch-validate every collection under MG_IDO_ROOTS in one call → { scanned, withErrors, withWarnings, idos:[{ ido, path, errors, warnings, issues[] }] } for flagged IDOs; schema-aware, checkReferences/errorsOnly options. |
ido_compare_ids |
Structured base ⇄ _IDS diff (summary + Markdown). |
ido_analyze_datarules |
Analyze data rules + property validators → a test-plan (Markdown/JSON spec): per-rule REST-testability class, trigger tree, scenarios, env deps, Standard Operations baselines and UI expectations. With PropertyClasses resolved, propertyClassUnresolved (feature property-class-unresolved) lists BOUND properties whose class chain is incomplete, and rules carry non-firing (polarity: 'negative') scenarios for their required and set-literal effects (feature effect-negative-scenarios). |
ido_get_cached_settings |
List an IDO's <CachedSetting>s (name + fields; ScopeLevel/SourceType decoded). |
ido_add_cached_setting / ido_set_cached_setting / ido_delete_cached_setting |
Cached-setting CRUD (by SettingName) — dry-run/apply. |
ido_cached_setting_usage |
Cross-reference every declared <CachedSetting> against every data-rule part that reads it (action / condition / filter); unreferencedOnly:true returns just the ones nothing reads. IDO metadata only. |
ido_analyze_cached_setting_impact |
Cross-file: every data rule that reads a cached setting (impact of renaming/removing it). |
ido_resolve_property_class |
Resolve a PropertyClass chain → effective attributes. |
ido_add_property / ido_set_property |
Add / edit a property (bindings, PropertyAttributes) — dry-run/apply. |
ido_reorder_property |
Move a property to a new position and renumber — dry-run/apply. |
ido_add_table / ido_set_table |
Add / edit a table (name, alias, type, join) — dry-run/apply. |
ido_add_method / ido_set_method |
Add / edit a method + parameters — dry-run/apply. |
ido_add_parameter / ido_set_parameter / ido_delete_parameter |
Method-parameter CRUD — dry-run/apply. |
ido_add_data_rule / ido_set_data_rule |
Add / edit a data rule + actions/conditions/filters — dry-run/apply. |
ido_apply_spec |
Apply an authoring spec (idoAuthoringSpec:1) in one call — add/update properties + add data rules from an inline spec or a JSON specPath; strictly validated (rejected whole if malformed) — dry-run/apply. |
ido_add_rule_item / ido_delete_rule_item |
Add / delete a rule action/condition/filter — dry-run/apply. |
ido_change_rule_sub_type |
Change a rule sub-item's type field (action ActionType/ValueType, condition SourceType, filter ComparisonOperator) and clean up children the new type no longer uses (optional restore re-applies prior values) — the same shared engine the visual editor uses — dry-run/apply. |
ido_tidy_data_rules |
Tidy every data rule — remove stale, type-irrelevant child elements from all actions/conditions/filters (foreign tags preserved), reporting how many were removed — dry-run/apply. |
ido_rename_item |
Rename a property/table/method/data rule — dry-run/apply. |
ido_delete_item |
Delete a property/table/method/data rule by key — dry-run/apply. |
ido_import |
Deploy/import an IDO into a SyteLine config via AppMetadataTransport.exe — dry-run/apply (uses MG_SL_INSTALL / MG_IMPORT_CONFIG). |
ido_import_changed |
Import all IDOs changed vs a base git ref (batch deploy) — dry-run/apply. |
ido_sync_to_ids |
Copy one item into the _IDS sibling (no tables come with a property: use ido_sync_properties_to_ids) — dry-run/apply. |
ido_bump_revision |
Increment RevisionNo + stamp RevisionDate — dry-run/apply. |
ido_format |
Canonically re-serialize a file — dry-run/apply. |
ido_clone |
2.13.0: a new IDO file as a text-level copy of another (Name, RevisionNo 1, RevisionDate now; the rest kept); refused for a taken name, an existing file, ReplaceFlag 1 — dry-run/apply (as mgIdo.api.cloneIdo). |
ido_sync_properties_to_ids |
2.13.0: copy base properties into the _IDS with the tables their ColumnTableAlias / ExplicitJoin need; refused when the copy adds a validation error — dry-run/apply (as mgIdo.api.syncToIds). |
pc_create |
2.13.0: a Property Class inheriting from baseClass, in the folder of the _IDS classes — dry-run/apply (as mgIdo.api.createPropertyClass). |
pc_set_attributes |
2.13.0: set / remove PropertyAttributes of one Property Class (a self-closing <Tag /> in place) — dry-run/apply (as mgIdo.api.setPropertyClassAttributes). |
ido_set_middle_tier |
2.13.0: the extension class fields and new C# IDO methods (an existing method stays) — dry-run/apply (as mgIdo.api.setIdoMiddleTier). |
Read tools are auto-approved; the write tools default to a dry-run and only touch disk
with apply:true.
Access As (2.13.0). Every write tool (dry runs included) refuses a file whose own <AccessAs> is not
mgIdo.accessAs, as the editor does; the server reads it from MG_ACCESS_AS, which the registration writes (* when
the setting is empty: any file may be changed). A registration made before 2.13.0 has no MG_ACCESS_AS and uses
BaseSyteLine until it is refreshed (automatically on upgrade, and when mgIdo.accessAs changes). ido_create writes
the configured Access As when ido.accessAs is not given. ido_import / ido_import_changed write no local file and
are not checked.
Architecture
src/
model/ XML tree (parse/serialize), typed projection, enums, sequence, edits
validation/ semantic + reference validation
editor/ CustomTextEditorProvider (hosts the webview, applies edits)
explorer/ workspace index + collections tree + active-IDO outline tree
webview/ UI (framework-free TS) + host/webview message protocol
extension.ts activation: editor, explorer, commands, diagnostics
media/ webview.css + activity-bar icon
test/ node:test suites (core + corpus round-trip)
The open TextDocument is the single source of truth. Webview edits post typed messages;
the host applies them to the XML tree, re-serializes canonically, and replaces the document
via a WorkspaceEdit — so text view, undo/redo, and external edits all stay in sync.
Development
npm install
npm run build # bundle extension + webview (esbuild)
npm run watch # rebuild on change
npm run typecheck # tsc --noEmit
npm test # compile + run node:test suites
Run the extension: open this folder in VS Code / Kiro and press F5 (Extension
Development Host), then open any IDO collection XML.
Tests
test/roundtrip.test.ts — runs against the real corpus (set MG_CORPUS to override the
path, MG_SAMPLE to change the file count). Hard gates: semantic equality (no data
loss) and idempotency (no formatting drift); plus a byte-exact rate metric.
test/core.test.ts — enum catalog, model projection, sequence renumbering, edit ops, and
validation.
test/edits.test.ts — full CRUD edit operations (add/edit/delete for properties, tables,
methods, parameters) with serialization-stability checks.
test/webview.test.ts — jsdom smoke test that runs the real bundled webview, asserts the
Canvas renders, and that inline edits / row-expand / add emit the correct messages.
Status / Roadmap
This is the MVP. Planned next: cross-file reference go-to-definition, the guided DataRule
builder, canvas relationship lines + drag-drop binding conversions, _IDS sync, and editors
for the sibling constructs (PropertyClass, Form/ComponentClass/Validator). See DESIGN.md.
| |