dominus-cli 0.6.0 → 2.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dominus-cli",
3
- "version": "0.6.0",
3
+ "version": "2.0.0",
4
4
  "description": "AI-powered autonomous agent for Roblox Studio development. Real-time WebSocket bridge, persistent memory, and intelligent tool use.",
5
5
  "type": "module",
6
6
  "bin": {
Binary file
@@ -677,7 +677,7 @@ function Properties.bulkSet(spec)
677
677
  modified = modified + 1
678
678
  end
679
679
  end
680
- elseif spec.root and spec.properties then
680
+ elseif spec.root and (spec.properties or spec.addChildren) then
681
681
  -- Filter mode: apply to all matching descendants
682
682
  local root = Explorer.resolveInstance(spec.root)
683
683
  if not root then
@@ -691,13 +691,73 @@ function Properties.bulkSet(spec)
691
691
  if spec.className and inst.ClassName ~= spec.className then
692
692
  return
693
693
  end
694
- for key, value in spec.properties do
695
- local coerced = coerceValue(inst, key, value)
696
- local ok, err = pcall(function()
697
- inst[key] = coerced
698
- end)
699
- if not ok then
700
- table.insert(errors, Explorer.getPath(inst) .. "." .. key .. ": " .. tostring(err))
694
+ if spec.properties then
695
+ for key, value in spec.properties do
696
+ local coerced = coerceValue(inst, key, value)
697
+ local ok, err = pcall(function()
698
+ inst[key] = coerced
699
+ end)
700
+ if not ok then
701
+ table.insert(errors, Explorer.getPath(inst) .. "." .. key .. ": " .. tostring(err))
702
+ end
703
+ end
704
+ end
705
+ -- addChildren: insert new child instances (e.g. UIStroke, UICorner)
706
+ if spec.addChildren and type(spec.addChildren) == "table" then
707
+ for _, childSpec in ipairs(spec.addChildren) do
708
+ local childClass = childSpec.ClassName or childSpec.className
709
+ if childClass then
710
+ -- Skip if child of this class already exists (idempotent)
711
+ local skipIfExists = childSpec.skipIfExists ~= false
712
+ if skipIfExists then
713
+ local existing = inst:FindFirstChildOfClass(childClass)
714
+ if existing then
715
+ continue
716
+ end
717
+ end
718
+ local ok2, child = pcall(Instance.new, childClass)
719
+ if ok2 and child then
720
+ if childSpec.Name or childSpec.name then
721
+ child.Name = childSpec.Name or childSpec.name
722
+ end
723
+ -- Set props on the new child
724
+ local props = childSpec.properties
725
+ or childSpec.Properties
726
+ or childSpec.props
727
+ or childSpec.Props
728
+ or {}
729
+ -- Also check flattened keys
730
+ for k, v in childSpec do
731
+ if
732
+ k ~= "ClassName"
733
+ and k ~= "className"
734
+ and k ~= "Name"
735
+ and k ~= "name"
736
+ and k ~= "properties"
737
+ and k ~= "Properties"
738
+ and k ~= "props"
739
+ and k ~= "Props"
740
+ and k ~= "skipIfExists"
741
+ and k ~= "Children"
742
+ and k ~= "children"
743
+ then
744
+ props[k] = v
745
+ end
746
+ end
747
+ for pk, pv in props do
748
+ local coerced = coerceValue(child, pk, pv)
749
+ pcall(function()
750
+ child[pk] = coerced
751
+ end)
752
+ end
753
+ child.Parent = inst
754
+ else
755
+ table.insert(
756
+ errors,
757
+ Explorer.getPath(inst) .. ": failed to create " .. tostring(childClass)
758
+ )
759
+ end
760
+ end
701
761
  end
702
762
  end
703
763
  modified = modified + 1
@@ -712,7 +772,7 @@ function Properties.bulkSet(spec)
712
772
  if recording then
713
773
  ChangeHistoryService:FinishRecording(recording, Enum.FinishRecordingOperation.Cancel)
714
774
  end
715
- return { success = false, error = "Provide either 'targets' array or 'root' + 'properties'" }
775
+ return { success = false, error = "Provide either 'targets' array or 'root' + 'properties'/'addChildren'" }
716
776
  end
717
777
 
718
778
  if recording then