Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: updates agent-store api to unblock integration with w3infra #1479

Merged
merged 4 commits into from
May 30, 2024

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented May 28, 2024

While working on storacha/w3infra#380 I have realized that agent-store API was poorly designed because it imposed:

  1. Store to traverse agent message in order to index each invocations and receipts within it and code that dealt with traversal was trapped in util module here that was not even exported.
  2. Store has to encode message into bytes in order to persist it, which is redundant given that we received message in encoded form.

This PR fixes above limitations by switching store interface from receiving AgentMessage to ParsedAgentMessage which wraps AgentMessage along with message bytes and index freeing store from doing any kind of traversal or encoding.

I also removed legacy code that was left behind by previous PR.

Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM

@vasco-santos vasco-santos merged commit 2998a93 into main May 30, 2024
3 checks passed
@vasco-santos vasco-santos deleted the feat/agent-store-api branch May 30, 2024 10:20
vasco-santos added a commit to storacha/w3infra that referenced this pull request May 30, 2024
Integrates agent-store into the infra and removes custom invocation
execution and storage that was used previously. Requires
storacha/w3up#1479

---------

Co-authored-by: Vasco Santos <[email protected]>
vasco-santos added a commit that referenced this pull request May 30, 2024
🤖 I have created a release *beep* *boop*
---


##
[17.0.0](upload-api-v16.0.0...upload-api-v17.0.0)
(2024-05-30)


### ⚠ BREAKING CHANGES

* updates agent-store api to unblock integration with w3infra
([#1479](#1479))
* **upload-api:** integrate agent store for idempotence &
invocation/receipt persistence
([#1444](#1444))

### Features

* updates agent-store api to unblock integration with w3infra
([#1479](#1479))
([2998a93](2998a93))
* **upload-api:** integrate agent store for idempotence &
invocation/receipt persistence
([#1444](#1444))
([c9bf33e](c9bf33e))
* use digest in `blob/accept` location commitment
([#1480](#1480))
([ade45eb](ade45eb))


### Fixes

* rename blob and index client capabilities
([#1478](#1478))
([17e3a31](17e3a31))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vasco Santos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants