Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/DRAG_CHAIN_050B.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ playback. The panel exposes the shared link definition's section through
`Edit link geometry` and its driving expressions through `Source parameters`.
Individual link placement, grounding and deletion controls are omitted because
the chain owns those occurrences.

Since 079C, dragging the carriage also evaluates each affected cable's native
sweep at the displayed pose. Escape restores the original cable and picking
geometry. Releasing the drag saves the joint position and refreshes current
bakes that drive that joint at their recorded frame rates. If a motion cannot
be baked from the new pose, Studio reports the cause and saves the drive alone
when the pose is valid. See [079C verification](iterations/079C.md).
No new action IDs are used.

## Persistence
Expand Down
30 changes: 21 additions & 9 deletions docs/IMAGE_AUTHORING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ attachment reaches the ARK authoring assistant and the Studio team, with an
explicit design intent and editable-model instructions. It is not a certified
photogrammetry or automatic exact reconstruction engine.

In the Assistant composer, choose **Attach image**, select a PNG or JPEG, and
review its thumbnail. Select one of the two modes:
In the Assistant composer, use the paperclip to select one or more PNG or JPEG
files. Ctrl-click selects individual files and Shift-click selects a range.
You can also drop several images together, or use the paperclip again to add
more. The counter and arrows let you review each thumbnail. **Remove** removes
the displayed reference. One mode applies to all imported images in the brief.

- **Inspire design** asks the agent to translate the image's shape language,
- **Inspire design** asks the agent to translate the references' shape language,
curves and proportions into a coherent editable concept using ARK tools.
- **Image to CAD** asks the agent to recreate the visible form with editable
sketches, parameters, features or an explicitly authored mesh body. It directs
Expand All @@ -28,20 +31,28 @@ an automatic pixel-vectorization tool.
overall dimension. Each blank field is left to the model's judgment; leaving all
three blank also works. Values are estimates, not measurements extracted from
image pixels. Switching to Inspire design hides the fields and preserves their
values; switching back restores them. Attaching another image or removing the
pending attachment clears those estimates. Invalid, zero, negative, non-finite
values. Adding or removing individual references preserves the shared estimates.
Removing the last reference clears them. Invalid, zero, negative, non-finite
or oversized numbers reject before sending; no zero/default dimensions are
silently inserted.

The image remains local until **Send**, **Start** or **Queue** is used. Attaching,
Use **Snapshot** under the chat input or right-click the model and choose
**Snapshot for agent**. Frame the detail before capturing. The thumbnail shows
the captured view and its document revision. Rotate the model and capture again
to discuss several angles in one message. Type a question or describe the edit,
then use **Send**, or **Queue** while the agent is working. You can include
imported references and a viewport snapshot in the same message.

All references remain local until **Send**, **Start** or **Queue** is used. Attaching,
previewing, switching intent and cancelling a file picker do not contact a model.
Remove discards the pending attachment. A changed document, connector/account or
A changed document, connector/account or
explicit object target invalidates the pending attachment and requires attaching
it again. Filename, mode and supplied estimates appear in the visible chat;
private directory paths and image bytes do not appear in that log.

The actual PNG/JPEG bytes are validated and fully decoded in memory before they
enter a user message. The limits are **4 MiB** encoded file size, **8192 pixels**
enter a user message. A message accepts up to **32 references**, subject to the
connector's request limits. Each image is limited to **4 MiB** encoded file size, **8192 pixels**
per side and **16 megapixels** decoded area. The thumbnail uses those decoded
pixels. Responses, compatible Chat Completions and native Anthropic Messages
requests retain the actual inline image payload; the ChatGPT plan request uses
Expand All @@ -64,7 +75,8 @@ is limited to 4 MiB; a file below the file-size limit can still require resizing
to fit that route. This is an explicit request rejection, with reference pixels
preserved rather than silently omitted.

The lead's first team turn receives the original user image, intent and estimates.
The lead's first team turn receives all reference images in the submitted order,
with the shared intent and estimates.
Shared team context retains them for a specialist's later assigned work; this
does not assign every agent to reproduce the whole design. Multimodal steering
is consumed before the next provider request and uses the same revision/write
Expand Down
17 changes: 17 additions & 0 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# ARK roadmap A–G

082D (**B.01/D.02 — Verificado no escopo local**) lets users attach the current
Studio view to a question or steer an active CAD turn with several views.
[Viewport snapshots in chat](iterations/082D.md)

081D (**A.03/D.02 — Verificado no escopo local**) keeps recent tool results
available during visual edits and shows the outcome of edits and batched reads
in the Single Assistant chat. [Context regression and verification](iterations/081D.md)

080D (**B.01/D.02 — Verificado no escopo local**) lets Inspire design and Image
to CAD use several selected or dropped references in one brief. The Studio
composer previews and removes individual references. [Verification](iterations/080D.md)

079C (**B.04/C.04 — Verificado no escopo local**) updates occurrence-bound
cable sweeps during manual joint dragging. Escape restores the initial pose.
Releasing the drag refreshes current bakes that drive the same joint.
[Manual drag and playback verification](iterations/079C.md)

078B (**A.02/A.03/A.04/B.01/B.02/B.03/D.02/D.05/F.05 — Verificado no escopo local**): visual geometry
nodes, shared native-worker/RAM admission, bounded display-memory staging and
actionable graph/Obsidian context. Native/script 210/210 and focused Studio 6/6
Expand Down
20 changes: 20 additions & 0 deletions docs/iterations/079C.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 079C — flexible cables during manual component movement

Runtime **0.9.80**. **B.04/C.04 — Verificado no escopo local**.

Studio resolves occurrence-bound cable guides against the same joint pose
used to display the carriage and chain links during a drag. The native cable
producer evaluates the affected sweeps before the viewport displays that pose.
Escape restores the original cable mesh, picking data and rigid placements.

On release, Studio refreshes previously current bakes that drive the moved
joint, using their recorded frame rates. A successful drive and bake share one
undo step. A rejected combined transaction can fall back to the checked drive
at the original revision, with the bake failure shown in the status bar.

The local Windows native tests `drag-chain-050b`, `studio-drag-chain-ui`,
`studio-baked-motions-ui` and `release-metadata` passed. The Studio drag-chain
fixture checks the displayed cable before release, Escape, a second drag,
release and subsequent flexible cable playback. These checks cover sampled
kinematics and display geometry. Physical cable dynamics and continuous
clearance remain outside their scope.
21 changes: 21 additions & 0 deletions docs/iterations/080D.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 080D — Multiple image references

Runtime **0.9.81**. **B.01/D.02 — Verificado no escopo local**.

Studio accepts a set of PNG and JPEG references from a single file selection
or shell drop. Additional selections append to the pending brief. Both authoring
modes send the ordered references together. Image to CAD shares one set of
rough overall dimensions across the references.

The native Windows Studio image-attachment test exercised preview navigation,
individual removal, append, invalid-batch rollback, multi-file drop and delivery
of two distinct images to one offline request. The rendered two-reference card,
mode controls and rough dimension fields were inspected. Connector tests used
synthetic PNG and JPEG inputs. The team tests checked the lead and assigned
specialist, and the Claude Code fixture inspected the ordered image blocks.

Twelve focused CTest checks passed on Windows with the patched OCCT SDK.
They covered release metadata, assistant connectors, ACP, Claude Code, agent
team, image attachment, two steering layouts, CAD import, baked playback,
drag-chain geometry and manual drag in Studio. Remote model interpretation
and reconstruction accuracy were outside the local verification scope.
26 changes: 26 additions & 0 deletions docs/iterations/081D.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 081D — Context for follow-up edits

Runtime **0.9.82**, milestones **A.03/D.02**.

The request history projection measures the recent tool exchanges separately
from messages that it preserves in full. A large image between two inspections
can now travel with the detailed results of both inspections. The final
serialized request still has to fit the connector's byte limit.

A successful, identified `doc_info` row at the batch revision satisfies the
post-compaction inspection guard. An oversized sibling row includes a query
for recovering that row alone when its observed size fits the batch protocol.
Feedback on tool usage preserves detection of repeated identical design reads.
Single Assistant chat displays the provider round, the revision reported by
`doc_apply`, and the number of successful reads in a batch.

In a local comparison against 080D, both versions received the same 632,825-byte
synthetic history, including an inline PNG of 320,772 base64 bytes. Both sent
the image. Only 081D also retained the complete recent inspection in the
projected request. This comparison measures context retention. It does not
measure provider latency, model quality, or convergence on a CAD design.

Windows checks covered release metadata, the assistant connector, batched
queries, agent team, Studio steering, image attachment and two chat layouts.
The fixtures exercised partial success, revision mismatches, repeated reads
interleaved with feedback, and recovery of a single oversized row.
20 changes: 20 additions & 0 deletions docs/iterations/082D.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 082D — Viewport snapshots in chat

Runtime **0.9.83**, milestones **B.01** and **D.02**.

**Snapshot** in the Studio composer captures the current 3D view. The viewport
context menu offers **Snapshot for agent** beside **Ask Agent about this object**.
The user can orbit, add more views, review each thumbnail, and send a question
or queue a direction for a running agent. Each image carries its capture
revision. A message can also include imported inspiration or Image to CAD
references with their own shared authoring intent.

Twelve focused Windows checks passed. The Studio tests rendered a synthetic
model, captured it through the
composer and checked the actual PNG payload, revision and accompanying text
using an offline provider transport. The steering test queued a new direction
while work was in flight and checked rejection of the superseded write. A
failed GPU capture preserved the pending references. Team tests checked the
snapshot bytes and revision alongside imported references. Visual inspection
covered the context menu and two Studio window sizes. Provider interpretation
of a particular design was outside this verification.
5 changes: 5 additions & 0 deletions include/ark/assistant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <string>
#include <stdexcept>
#include <optional>
#include <span>
#include <vector>
#include <array>
#include <memory>
Expand All @@ -22,12 +23,16 @@ struct AssistantImageAttachment {
std::string name,mimeType,base64;
unsigned width=0,height=0,thumbnailWidth=0,thumbnailHeight=0;
std::vector<unsigned char> thumbnailRGBA;
std::optional<std::uint64_t> viewportRevision;
};
struct AssistantImageDimensions {std::optional<double> width,height,depth;};
AssistantImageDimensions parseAssistantImageDimensions(const std::array<std::string,3>& fields);
AssistantImageAttachment assistantImageAttachment(const std::vector<unsigned char>& bytes,const std::string& name,
AssistantImageDecoder decoder=AssistantImageDecoder::Platform);
AssistantImageAttachment loadAssistantImageAttachment(const std::string& path);
inline constexpr std::size_t assistantReferenceLimit=32;
arkjson::Value assistantUserMessageWithImages(const std::string& text,std::span<const AssistantImageAttachment> images,
AssistantImageMode mode=AssistantImageMode::InspireDesign,const AssistantImageDimensions& dimensions={});
arkjson::Value assistantUserMessage(const std::string& text,
const std::optional<AssistantImageAttachment>& image={},AssistantImageMode mode=AssistantImageMode::InspireDesign,
const AssistantImageDimensions& dimensions={});
Expand Down
5 changes: 5 additions & 0 deletions include/ark/motion_cables.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once
#include "ark/motion_graph.hpp"
#include <atomic>
#include <map>
#include <memory>
#include <set>
namespace ark {
// Derived display meshes from native cable sweeps at the recorded rigid frame
// poses. These are not authored geometry, continuous collision or fatigue evidence.
Expand All @@ -18,6 +20,9 @@ struct MotionCableDisplay {
size_t frameCount=0,bytes=0,nativeRequests=0;
};
std::vector<u64> motionCableFeatures(const Document&,const BakedMotionFrames&);
// Evaluate only routes bound to changed occurrences, using the solved drag pose.
std::map<u64,Mesh> previewMovedCables(const Document&,const std::vector<AssemblyPlacement>&,
const std::set<u64>& movedNodes);
MotionCableDisplay prepareMotionCableDisplay(Document&,const BakedMotionFrames&,
const std::atomic_bool& cancelled,const std::function<void(size_t,size_t)>& progress={});
}
17 changes: 5 additions & 12 deletions release.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"sequence": 78,
"phase": "B",
"code": "078B",
"version": "0.9.79",
"sequence": 82,
"phase": "D",
"code": "082D",
"version": "0.9.83",
"milestones": [
"A.02",
"A.03",
"A.04",
"B.01",
"B.02",
"B.03",
"D.02",
"D.05",
"F.05"
"D.02"
]
}
14 changes: 11 additions & 3 deletions src/agent_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void projectBatchPaths(V& row,const V& query,size_t index){
batchContent(row,compact);
}
// max_bytes bounds what the row may return; above it the row reports its shape instead of its data.
void capBatchRow(V& row,const V& query,size_t index){
void capBatchRow(V& row,const V& query,const V& executed,size_t index){
const auto* cap=query.find("max_bytes");if(!cap||required(row,"isError").b)return;
const V& data=required(row,"structuredContent");const auto bytes=data.dump().size();if(bytes<=(size_t)cap->num)return;
V keys=V::makeObj();for(const auto& field:data.obj){V shape=V::makeObj();const auto& value=field.second;shape.set("type",V::makeStr(value.t==V::Obj?"object":value.t==V::Arr?"array":value.t==V::Str?"string":value.t==V::Num?"number":value.t==V::Bool?"boolean":"null"));if(value.t==V::Arr)shape.set("count",V::makeNum((double)value.arr.size()));shape.set("bytes",V::makeNum((double)value.dump().size()));
Expand All @@ -172,7 +172,15 @@ void capBatchRow(V& row,const V& query,size_t index){
keys.set(field.first,shape);}
V error=V::makeObj();error.set("error_code",V::makeStr("QUERY_BATCH_ROW_TOO_LARGE"));error.set("error",V::makeStr("Result is "+std::to_string(bytes)+" bytes, above max_bytes "+std::to_string((size_t)cap->num)+"; select the needed values with paths."));error.set("query_index",V::makeNum((double)index));error.set("tool",required(query,"tool"));error.set("tool_succeeded",V::makeBool(true));error.set("bytes",V::makeNum((double)bytes));error.set("max_bytes",*cap);error.set("result_keys",keys);
if(const auto* revision=data.find("revision"))error.set("revision",*revision);
error.set("recovery",batchRecovery(query,"The tool already ran. Request only the values you need with paths, or raise max_bytes."));
V recovery=batchRecovery(query,"Other successful rows remain usable. Retry only this row if its values are needed. Narrow the selected paths or use the observed size.");
recovery.set("args",executed);
if(bytes<=262144){
V retry=V::makeObj();retry.set("tool",required(query,"tool"));retry.set("args",executed);
for(const char* field:{"paths","fields"})if(const auto* selected=query.find(field))retry.set(field,*selected);
retry.set("max_bytes",V::makeNum((double)bytes));
recovery.set("retry_query",std::move(retry));
}
error.set("recovery",std::move(recovery));
row.set("isError",V::makeBool(true));batchContent(row,error);
}
V queryValue(AgentSession& s,const V& spec){
Expand Down Expand Up @@ -339,7 +347,7 @@ bool callAgentFeature(AgentSession& s,const std::string& tool,const V& args,V& o
else row=s.call(text(query,"tool"),executed);
// References read the full result, before this row's own projection.
if(const auto* id=query.find("id")){if(required(row,"isError").b)unavailable.insert(id->str);else outputs[id->str]=required(row,"structuredContent");}
projectBatchRow(row,query,i);projectBatchPaths(row,query,i);capBatchRow(row,query,i);
projectBatchRow(row,query,i);projectBatchPaths(row,query,i);capBatchRow(row,query,executed,i);
row.set("query_index",V::makeNum((double)i));row.set("tool",required(query,"tool"));row.set("args",submitted);if(!references.empty()&&blocked.empty()&&failure.empty())row.set("resolved_args",executed);
row.set("elapsed_ms",V::makeNum(std::chrono::duration<double,std::milli>(std::chrono::steady_clock::now()-start).count()));if(required(row,"isError").b)++errors;rows.arr.push_back(row);}
out=V::makeObj();out.set("results",rows);out.set("revision",V::makeNum((double)s.revision));out.set("error_count",V::makeNum((double)errors));
Expand Down
Loading
Loading