Comment by karanraina
3 hours ago
thanks! the read-only guarantee is structurally enforced by sdk itself
a probe is basically just a definition it contains the file and line number of the code you want to inspect
that is safe by default. there's no custom userland function that you can call
if you want conditional probes, then it get's tricky
here's how it works
NodeJS: v8 natively blocks if the code even tries to produce side effects using `throwOnSideEffect: true`
in python and java: conditions can be set on local variables only without accessors as of now. you can call functions, can only a subset of comparison operators.
so, you can set `total > 50` as a condition but not `order.total > 50` as it could in theory trigger a getter (which ideally should be fine, but devs/agents can make getters with side affects so we wont allow it for now)
We will support these use cases with a custom DSL for agents + AST parsing in the future which will let us safely evaluate these expressions.
No comments yet
Contribute on Hacker News ↗