Skip to content

Conversation

@daesunp
Copy link
Contributor

@daesunp daesunp commented Nov 13, 2025

Description

This PR allows tree-agent to expose properties to the llm.

@github-actions github-actions bot added area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch labels Nov 13, 2025
@github-actions github-actions bot added the public api change Changes to a public API label Nov 13, 2025
@daesunp daesunp marked this pull request as ready for review November 13, 2025 21:17
@github-actions
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> [email protected] ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> [email protected] serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> [email protected] check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  250224 links
    1778 destination URLs
    2015 URLs ignored
       0 warnings
       0 errors


}
\`\`\``;

const helperPropertyExplanation = details.hasHelperProperties
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just drop this. We already expose fields on our nodes as simple properties to the LLM. It actually can't even tell the difference between fields and "additional" properties - they both just look like properties. I also expect that if it sees readonly, it will just respect it without any additional attention being called to it.

The reason we want to have special instructions for the methods is because we want to guide the LLM to prefer methods over properties.

}

// Add exposed properties directly on object nodes
for (const [name, zodTypeAny] of getBoundProperties(definition, bindableSchemas)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You updated this file by essentially duplicating the "method"-related code and creating the "property"-version of it. Most of the code seems like it's essentially exactly the same. For example, this loop here is more or less identical to the loop above. There's code above where the same thing is happening - the code is pretty much identical, most of the logic doesn't do anything different for the method case vs. the property case.

Do you think things would fall out more simply if we processed methods and properties together? Instead of doing everything once for getBoundMethods and once again for getBoundProperties, we could have one pass that iterates over both. Or maybe getBoundProperties should just include methods, since methods are technically properties. For the small places where the difference matters, I think we can tell if we're dealing with a property vs a method by checking the type of the class holding the metadata.

I'm not sure how far it can go, but I do get the sense that a lot of the new code in here can be collapsed in this way.

// TODO: yuck, this entire file has too many statics. we should rewrite it as a generic zod schema walk.
let detailsI: SchemaDetails = {
hasHelperMethods: false,
hasHelperProperties: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these used for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants