mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-20 18:07:43 -05:00
Releasing element-rack jobs from an agent meant hand-writing a console runner around SetReleaseSession, posting set JSON by hand (opaque "Invalid set JSON." and 428 without If-Match) and re-nesting by hand when the 60x120 default wasted sheets. The MCP server now does it through the desktop's own clients and release session: - search_drawings, get_drawing, search_sets, get_set - create_set, update_set, archive_set, restore_set (revision guard handled) - plan_release: material groups, refusals and mergeable drafts, read-only - make_nests: SetReleaseSession with headless ReleaseRenest, File > New nests from NewNestSource (server-allocated names), MaterialLedger when set up, optional merges into drafts - renest_nest: re-nest a Draft/Quote nest, saved with the expected-revision guard only when every part is placed - nest_summary, get_release, undo_release make_nests and renest_nest take candidate sheet sizes: each alone and all together as plate options are tried on copies, keeping the fewest unplaced, then fewest sheets, then least sheet area, because the engine's own stock choice minimizes area, not sheet count. Tests run the tools against the in-process server; docs in docs/mcp-nest-server-tools.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
897 B
C#
30 lines
897 B
C#
namespace OpenNest.Mcp.Database;
|
|
|
|
/// <summary>A drawing set and how many kits of it.</summary>
|
|
public sealed class ReleaseSetInput
|
|
{
|
|
/// <summary>The set's id, or its exact name.</summary>
|
|
public string Set { get; set; }
|
|
|
|
public int Quantity { get; set; } = 1;
|
|
}
|
|
|
|
/// <summary>A library drawing (released on its own, or a set member) and how many.</summary>
|
|
public sealed class DrawingQuantityInput
|
|
{
|
|
/// <summary>The drawing's id, or its exact name.</summary>
|
|
public string Drawing { get; set; }
|
|
|
|
public int Quantity { get; set; } = 1;
|
|
}
|
|
|
|
/// <summary>Merges one material group of a release into an existing Draft nest.</summary>
|
|
public sealed class MergeInput
|
|
{
|
|
/// <summary>The group key plan_release prints.</summary>
|
|
public string Group { get; set; }
|
|
|
|
/// <summary>The draft nest's id, or its exact name.</summary>
|
|
public string Draft { get; set; }
|
|
}
|