Repository navigation
feat(agent): create jobs from chat, publish to NEAR provenance, approval buttons - #148
Merged
Merged
Conversation
…val buttons - Agent tool calls now run as the chat owner (signed assertion) so jobs appear in their Runs, Finance and Pharma pages. - New tools: submit_portfolio_optimization, prepare_near_anchor, attach_near_anchor, request_approval. The user signs the registry `anchor` call with their own NEAR CLI key; no NEAR key in the backend. - Provenance bundles commit the signed-in primary SIWE wallet. - Chat shows Approve / Decline buttons for agent approval requests. - Chat markdown: code blocks with language label, copy button and token colours; nested and task lists; tables; long-token wrapping. - Fix the circuit tool example (per-qubit measure). Closes #147
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #147. Builds on the NEAR provenance registry from #142.
What changed
dev-local. Each call now carries the same short-lived signed assertion the frontend uses, including the primary SIWE wallet.submit_portfolio_optimizationposts a CSV to/api/v1/finance/submit.prepare_near_anchorwrites anear-<job_id>bundle per completed job (result hash, owner wallet) and returns the exactnear contract call-function … anchor …command.attach_near_anchorverifies the transaction on-chain and attaches inclusion proofs. Existing bundles are reused so retries keep the same root. No NEAR key enters the backend.request_approvalends the turn and the chat shows Approve / Decline buttons; the choice is sent back as the next message. Stored with the session so it survives a reload.submit_quantum_circuitexample usedmeasure q -> c;, which the executor rejects, so model-written circuits failed.Testing (UI only, signed in via SIWE with a test wallet, OpenRouter free model)
/runs./finance/history./pharma.owner_walletconfirmed in the stored bundles. A real but non-matching transaction hash was rejected.Not tested
Notes
platform_mcp.py/ai_agent_service.py; both files have older findings that are untouched.chat/page.tsxalready hadreact-hooks/set-state-in-effectlint errors on main; not addressed here.