From 139ae7dcb301f3604e40f015304167ffb7f5ae91 Mon Sep 17 00:00:00 2001 From: tmsdkeys <98807841+tmsdkeys@users.noreply.github.com> Date: Tue, 27 May 2025 14:35:38 +0000 Subject: [PATCH 1/3] Update docs from nexus-next (commit: 7f5bcf5373494cf3dc7bc9f1c05e8163ba7e9531) --- nexus-next/index.md | 69 ++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/nexus-next/index.md b/nexus-next/index.md index f613915..3bb8bf6 100644 --- a/nexus-next/index.md +++ b/nexus-next/index.md @@ -6,32 +6,32 @@ This section aims to document the technical side of all core Nexus components. W For the purposes of this documentation we make distinction between different user roles within the ecosystem: -* **Nexus maintainer.** Core team member that maintains the Nexus codebase. -* **Tool developer.** Outside contributor that develops Tools to be used by Agents. -* **Agent developer.** Outside contributor that creates DAGs and subsequently deploys the Agent smart contract. -* **Agent user.** End-user that interacts with the ecosystem through clients built by us or outside contributors. +- **Nexus maintainer.** Core team member that maintains the Nexus codebase. +- **Tool developer.** Outside contributor that develops Tools to be used by Agents. +- **Agent developer.** Outside contributor that creates DAGs and subsequently deploys the Agent smart contract. +- **Agent user.** End-user that interacts with the ecosystem through clients built by us or outside contributors. -## [Glossary](glossary.md) +## [Glossary][glossary] Ubiqutously used terms. Often these terms reference specific parts of the project so it is crucial that they be clearly defined. ## Onchain Nexus -The onchain part of Nexus. Holds the workflow state and requests [Tool](#tools) execution from the [Leader](#offchain-nexus). +The onchain part of Nexus. Holds the workflow state and requests [Tool][tool] execution from the [Leader][leader]. Docs: -* [Workflow package](packages/workflow.md) -* [Primitives package](packages/wrimitives.md) -* [Nexus interface package](packages/nexus-interface.md) +- [Workflow package][workflow] +- [Primitives package][primitives] +- [Nexus interface package][nexus-interface] {% hint style="info" %} -The Nexus core onchain packages are currently not open sourced. To find all of the function signatures and data structs, please refer to [the reference API documentation](../developer-docs/index/nexus-core-api-docs/README.md) +The Nexus core onchain packages are currently not open sourced. To find all of the function signatures and data structs, please refer to [the reference API documentation][ref-api] {% endhint %} -### [Sui Move Conventions](conventions/sui-move.md) +### [Sui Move Conventions][sui-move-conventions] -We established a [set of conventions for writing Move code](conventions/sui-move.md), which may not be universally known and adopted among Sui Move developers. Skim through them before diving into the Move codebase. +We established a [set of conventions for writing Move code][sui-move-conventions], which may not be universally known and adopted among Sui Move developers. Skim through them before diving into the Move codebase. ## Offchain Nexus @@ -39,37 +39,54 @@ The main offchain service. Consumes events produced by the onchain Workflow, inv Docs: -* [Leader](crates/leader.md) +- [Leader][leader] -## [Tools](tool.md) +## [Tools][tool] -Tools are Vertices in the Nexus workflow DAG. They are services with [Nexus-defined interface](tool.md) schema that perform specific tasks. These Tools are what Agent Developers orchestrate in a workflow DAG to create an Agent. +Tools are Vertices in the Nexus workflow DAG. They are services with [Nexus-defined interface][tool] schema that perform specific tasks. These Tools are what Agent Developers orchestrate in a workflow DAG to create an Agent. -There are a few standard Nexus tools, they can be found it the [Nexus SDK repository's tools](https://github.com/Talus-Network/nexus-sdk/tree/main/tools) folder. +There are a few standard Nexus tools, they can be found in the [Nexus SDK repository's tools][nexus-sdk-tools] folder. Some examples of what a Tool is: -* getting a chat completion from OpenAI -* posting a Tweet -* storing data on an external storage +- getting a chat completion from OpenAI +- posting a Tweet +- storing data on an external storage Docs: -* [Tool](tool.md) +- [Tool][tool] -## [Agent Development](./TAP/agent-development.md) +## [Agent Development][agent-development] -The components referenced above (onchain Nexus, offchain Nexus and tools) provide the infrastructure and building blocks for [agent developers](index.md#actors) to build Talus agents. +The components referenced above (onchain Nexus, offchain Nexus and tools) provide the infrastructure and building blocks for [agent developers][actors] to build Talus agents. Docs: -* [Agent development](./TAP/agent-development.md) -* [Default TAP template](./TAP/default-tap.md) +- [Agent development][agent-development] +- [Default TAP template][default-tap] ## Nexus SDK -Nexus offers [tool and agent developers](index.md#actors) an easy-to-use SDK consisting of a CLI and Toolkit to streamline their development. The codebase resides in [this repository](https://github.com/Talus-Network/nexus-sdk) and is the main entry point for developers to interact with Nexus. It has a separate section in the developer docs dedicated to it. +Nexus offers [tool and agent developers][actors] an easy-to-use SDK consisting of a CLI and Toolkit to streamline their development. The codebase resides in [this repository][nexus-sdk-repo] and is the main entry point for developers to interact with Nexus. It has a separate section in the developer docs dedicated to it. Docs: -* [Nexus SDK documentation](../nexus-sdk/index.md) +- [Nexus SDK documentation][nexus-sdk-gitbook] + + + +[glossary]: glossary.md +[workflow]: packages/workflow.md +[primitives]: packages/primitives.md +[nexus-interface]: packages/nexus-interface.md +[ref-api]: ../developer-docs/index/nexus-core-api-docs/README.md +[sui-move-conventions]: conventions/sui-move.md +[tool]: tool.md +[leader]: crates/leader.md +[actors]: #actors +[agent-development]: ./TAP/agent-development.md +[default-tap]: ./TAP/default-tap.md +[nexus-sdk-repo]: https://github.com/Talus-Network/nexus-sdk +[nexus-sdk-tools]: https://github.com/Talus-Network/nexus-sdk/tree/main/tools +[nexus-sdk-gitbook]: ../nexus-sdk/index.md From a99567515ee7d64243c2b21c10a0ac61375d8d39 Mon Sep 17 00:00:00 2001 From: devops-talus <184664591+devops-talus@users.noreply.github.com> Date: Tue, 27 May 2025 14:35:55 +0000 Subject: [PATCH 2/3] chore(docs): format markdown links --- nexus-next/TAP/agent-development.md | 3 +- nexus-next/TAP/default-tap.md | 1 + nexus-next/conventions/sui-move.md | 1 + nexus-next/crates/leader.md | 3 +- nexus-next/crates/sui-tx.md | 1 + nexus-next/gas-service.md | 1 + nexus-next/glossary.md | 1 + nexus-next/index.md | 56 +++++++------------ nexus-next/packages/nexus-interface.md | 1 + nexus-next/packages/primitives.md | 9 +-- .../packages/reference/nexus_interface/v1.md | 1 + .../reference/nexus_interface/version.md | 1 + .../reference/nexus_primitives/data.md | 1 + .../reference/nexus_primitives/event.md | 1 + .../reference/nexus_primitives/owner_cap.md | 1 + .../nexus_primitives/proof_of_uid.md | 1 + .../nexus_primitives/proven_value.md | 1 + .../packages/reference/nexus_workflow/dag.md | 3 - .../nexus_workflow/default_gas_extension.md | 3 - .../reference/nexus_workflow/default_sap.md | 1 + .../packages/reference/nexus_workflow/gas.md | 3 - .../reference/nexus_workflow/leader_cap.md | 3 - .../packages/reference/nexus_workflow/main.md | 3 - .../reference/nexus_workflow/tool_registry.md | 3 - nexus-next/packages/workflow.md | 1 + nexus-next/tool.md | 1 + nexus-sdk/cli.md | 5 +- nexus-sdk/guides/dag-construction.md | 15 ++--- nexus-sdk/guides/llm-openai-chat-prep-tool.md | 1 + .../guides/math-branching-dag-builder.md | 1 + nexus-sdk/guides/math-branching-dag-entry.md | 8 +-- nexus-sdk/guides/math-branching-quickstart.md | 1 + nexus-sdk/guides/math-branching-with-chat.md | 8 +-- nexus-sdk/guides/setup.md | 1 + nexus-sdk/guides/tool-firewall.md | 1 + nexus-sdk/tool-development.md | 1 + nexus-sdk/toolkit-rust.md | 16 ++---- 37 files changed, 63 insertions(+), 100 deletions(-) diff --git a/nexus-next/TAP/agent-development.md b/nexus-next/TAP/agent-development.md index f990a51..98f997f 100644 --- a/nexus-next/TAP/agent-development.md +++ b/nexus-next/TAP/agent-development.md @@ -33,4 +33,5 @@ The choice of how to build the agent will be determined by weighing: Continue learning about agent development with the following sections: * the [Nexus interface for TAPs](../packages/nexus-interface.md) section, outlining what interface the TAP must comply with -* the reference [default TAP](default-tap.md) implementation, that serves as an example for a bare-bones TAP \ No newline at end of file +* the reference [default TAP](default-tap.md) implementation, that serves as an example for a bare-bones TAP + diff --git a/nexus-next/TAP/default-tap.md b/nexus-next/TAP/default-tap.md index fab6c3d..c56f154 100644 --- a/nexus-next/TAP/default-tap.md +++ b/nexus-next/TAP/default-tap.md @@ -349,3 +349,4 @@ fun get_witness(self: &DefaultSAP): &DefaultSAPV1Witness { ``` + diff --git a/nexus-next/conventions/sui-move.md b/nexus-next/conventions/sui-move.md index 6717102..bd384cd 100644 --- a/nexus-next/conventions/sui-move.md +++ b/nexus-next/conventions/sui-move.md @@ -6,3 +6,4 @@ In Nexus and related packages we (to the best of our ability) follow these conve Each enumeration variant contains a property `_variant_name: AsciiString`, which will always be a static string representing the variant name. This helps clients to identify the variant because at the moment RPCs do not include the variant name in the response. + diff --git a/nexus-next/crates/leader.md b/nexus-next/crates/leader.md index 28ec200..6def119 100644 --- a/nexus-next/crates/leader.md +++ b/nexus-next/crates/leader.md @@ -165,4 +165,5 @@ stateDiagram-v2 if_stale --> [*]: NotStale MoveBackToQueuedSet --> [*] } -``` \ No newline at end of file +``` + diff --git a/nexus-next/crates/sui-tx.md b/nexus-next/crates/sui-tx.md index 523d14e..824f1c2 100644 --- a/nexus-next/crates/sui-tx.md +++ b/nexus-next/crates/sui-tx.md @@ -7,3 +7,4 @@ The Leader will be assigned a wallet via the `SUI_SECRET_MNEMONIC` environment v Initially, there will only be one transaction type from Leader back to Workflow. This transaction notifies the Workflow of the Tool invocation result. More details are available in the [Leader](leader.md) documentation. Once onchain Tools are defined, the Leader will also have to send transactions to invoke these Tools. These are currently still in the design phase however. + diff --git a/nexus-next/gas-service.md b/nexus-next/gas-service.md index 410edce..8013b2b 100644 --- a/nexus-next/gas-service.md +++ b/nexus-next/gas-service.md @@ -335,3 +335,4 @@ public fun donate_to_tool( ``` + diff --git a/nexus-next/glossary.md b/nexus-next/glossary.md index f8917ef..e25fd21 100644 --- a/nexus-next/glossary.md +++ b/nexus-next/glossary.md @@ -26,3 +26,4 @@ - **`Output Variant`** - A mutually exclusive variant of the tool's output. - **`Output Port`** - A single output (field) of a Tool within an Output Variant. - **`Entry Group`** - A named set of vertices that define an entry configuration for DAG execution. + diff --git a/nexus-next/index.md b/nexus-next/index.md index 3bb8bf6..494d848 100644 --- a/nexus-next/index.md +++ b/nexus-next/index.md @@ -11,27 +11,27 @@ For the purposes of this documentation we make distinction between different use - **Agent developer.** Outside contributor that creates DAGs and subsequently deploys the Agent smart contract. - **Agent user.** End-user that interacts with the ecosystem through clients built by us or outside contributors. -## [Glossary][glossary] +## [Glossary](glossary.md) Ubiqutously used terms. Often these terms reference specific parts of the project so it is crucial that they be clearly defined. ## Onchain Nexus -The onchain part of Nexus. Holds the workflow state and requests [Tool][tool] execution from the [Leader][leader]. +The onchain part of Nexus. Holds the workflow state and requests [Tool](tool.md) execution from the [Leader](crates/leader.md). Docs: -- [Workflow package][workflow] -- [Primitives package][primitives] -- [Nexus interface package][nexus-interface] +- [Workflow package](packages/workflow.md) +- [Primitives package](packages/primitives.md) +- [Nexus interface package](packages/nexus-interface.md) {% hint style="info" %} -The Nexus core onchain packages are currently not open sourced. To find all of the function signatures and data structs, please refer to [the reference API documentation][ref-api] +The Nexus core onchain packages are currently not open sourced. To find all of the function signatures and data structs, please refer to [the reference API documentation](../developer-docs/index/nexus-core-api-docs/README.md) {% endhint %} -### [Sui Move Conventions][sui-move-conventions] +### [Sui Move Conventions](conventions/sui-move.md) -We established a [set of conventions for writing Move code][sui-move-conventions], which may not be universally known and adopted among Sui Move developers. Skim through them before diving into the Move codebase. +We established a [set of conventions for writing Move code](conventions/sui-move.md), which may not be universally known and adopted among Sui Move developers. Skim through them before diving into the Move codebase. ## Offchain Nexus @@ -39,13 +39,13 @@ The main offchain service. Consumes events produced by the onchain Workflow, inv Docs: -- [Leader][leader] +- [Leader](crates/leader.md) -## [Tools][tool] +## [Tools](tool.md) -Tools are Vertices in the Nexus workflow DAG. They are services with [Nexus-defined interface][tool] schema that perform specific tasks. These Tools are what Agent Developers orchestrate in a workflow DAG to create an Agent. +Tools are Vertices in the Nexus workflow DAG. They are services with [Nexus-defined interface](tool.md) schema that perform specific tasks. These Tools are what Agent Developers orchestrate in a workflow DAG to create an Agent. -There are a few standard Nexus tools, they can be found in the [Nexus SDK repository's tools][nexus-sdk-tools] folder. +There are a few standard Nexus tools, they can be found in the [Nexus SDK repository's tools](https://github.com/Talus-Network/nexus-sdk/tree/main/tools) folder. Some examples of what a Tool is: @@ -55,38 +55,22 @@ Some examples of what a Tool is: Docs: -- [Tool][tool] +- [Tool](tool.md) -## [Agent Development][agent-development] +## [Agent Development](./TAP/agent-development.md) -The components referenced above (onchain Nexus, offchain Nexus and tools) provide the infrastructure and building blocks for [agent developers][actors] to build Talus agents. +The components referenced above (onchain Nexus, offchain Nexus and tools) provide the infrastructure and building blocks for [agent developers](#actors) to build Talus agents. Docs: -- [Agent development][agent-development] -- [Default TAP template][default-tap] +- [Agent development](./TAP/agent-development.md) +- [Default TAP template](./TAP/default-tap.md) ## Nexus SDK -Nexus offers [tool and agent developers][actors] an easy-to-use SDK consisting of a CLI and Toolkit to streamline their development. The codebase resides in [this repository][nexus-sdk-repo] and is the main entry point for developers to interact with Nexus. It has a separate section in the developer docs dedicated to it. +Nexus offers [tool and agent developers](#actors) an easy-to-use SDK consisting of a CLI and Toolkit to streamline their development. The codebase resides in [this repository](https://github.com/Talus-Network/nexus-sdk) and is the main entry point for developers to interact with Nexus. It has a separate section in the developer docs dedicated to it. Docs: -- [Nexus SDK documentation][nexus-sdk-gitbook] - - - -[glossary]: glossary.md -[workflow]: packages/workflow.md -[primitives]: packages/primitives.md -[nexus-interface]: packages/nexus-interface.md -[ref-api]: ../developer-docs/index/nexus-core-api-docs/README.md -[sui-move-conventions]: conventions/sui-move.md -[tool]: tool.md -[leader]: crates/leader.md -[actors]: #actors -[agent-development]: ./TAP/agent-development.md -[default-tap]: ./TAP/default-tap.md -[nexus-sdk-repo]: https://github.com/Talus-Network/nexus-sdk -[nexus-sdk-tools]: https://github.com/Talus-Network/nexus-sdk/tree/main/tools -[nexus-sdk-gitbook]: ../nexus-sdk/index.md +- [Nexus SDK documentation](../nexus-sdk/index.md) + diff --git a/nexus-next/packages/nexus-interface.md b/nexus-next/packages/nexus-interface.md index a6ed362..b732ede 100644 --- a/nexus-next/packages/nexus-interface.md +++ b/nexus-next/packages/nexus-interface.md @@ -51,3 +51,4 @@ Unfortunately, Sui does not give us a way to get current package ID. When upgrading a package you must create a new type that serves as a witness. This new type needs to be used when emitting `AnnounceInterfacePackageEvent` as its generic. This event _also_ needs to be emitted with every package upgrade. + diff --git a/nexus-next/packages/primitives.md b/nexus-next/packages/primitives.md index 12e9395..2d005a8 100644 --- a/nexus-next/packages/primitives.md +++ b/nexus-next/packages/primitives.md @@ -18,11 +18,11 @@ Therefore, upgrading components is less likely to require changes to other compo `UID` (Unique Identifier) proves that an object exist on-chain and its unique. By requiring passing a UID reference as the input and keeping a record of the ID of the UID that was passed as argument we can prove that only the module that defined that object did that operation. As only that module can access the UID. -This is achieved with the [hot potato pattern][move-hot-potato]. +This is achieved with the [hot potato pattern](https://move-book.com/programmability/hot-potato-pattern.html). {% hint style="info" %} This is a step away from explicitness and towards conventions. -Prior similar work includes [Originbyte's `request` module][ob-request-module] and [Mysten's `transfer_policy` module][sui-transfer-policy]. +Prior similar work includes [Originbyte's `request` module](https://github.com/Origin-Byte/nft-protocol/tree/main/contracts/request/sources/request) and [Mysten's `transfer_policy` module](https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/packages/sui-framework/sources/kiosk/transfer_policy.move). {% endhint %} A hot potato struct that enables authenticated communication between different packages without explicit dependencies. The `ProofOfUID` is created by one package and subsequently utilized across (potentially) multiple calls inside a PTB, allowing different participating packages to add their unique stamps. @@ -185,8 +185,3 @@ These primitives are designed to work synergistically, enabling the construction - Optional recipient restriction adds targeted security - Clear verification of data provenance - - -[move-hot-potato]: https://move-book.com/programmability/hot-potato-pattern.html -[ob-request-module]: https://github.com/Origin-Byte/nft-protocol/tree/main/contracts/request/sources/request -[sui-transfer-policy]: https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/packages/sui-framework/sources/kiosk/transfer_policy.move \ No newline at end of file diff --git a/nexus-next/packages/reference/nexus_interface/v1.md b/nexus-next/packages/reference/nexus_interface/v1.md index 3d3c206..682c4a6 100644 --- a/nexus-next/packages/reference/nexus_interface/v1.md +++ b/nexus-next/packages/reference/nexus_interface/v1.md @@ -85,3 +85,4 @@ package upgrade. + diff --git a/nexus-next/packages/reference/nexus_interface/version.md b/nexus-next/packages/reference/nexus_interface/version.md index ecaab5b..9eee110 100644 --- a/nexus-next/packages/reference/nexus_interface/version.md +++ b/nexus-next/packages/reference/nexus_interface/version.md @@ -128,3 +128,4 @@ + diff --git a/nexus-next/packages/reference/nexus_primitives/data.md b/nexus-next/packages/reference/nexus_primitives/data.md index 25f72a4..646e83f 100644 --- a/nexus-next/packages/reference/nexus_primitives/data.md +++ b/nexus-next/packages/reference/nexus_primitives/data.md @@ -167,3 +167,4 @@ Serialization conventions are agreed on by the off-chain realm. + diff --git a/nexus-next/packages/reference/nexus_primitives/event.md b/nexus-next/packages/reference/nexus_primitives/event.md index 7f3ae2d..d1f28f2 100644 --- a/nexus-next/packages/reference/nexus_primitives/event.md +++ b/nexus-next/packages/reference/nexus_primitives/event.md @@ -63,3 +63,4 @@ + diff --git a/nexus-next/packages/reference/nexus_primitives/owner_cap.md b/nexus-next/packages/reference/nexus_primitives/owner_cap.md index e0274bf..1f836cd 100644 --- a/nexus-next/packages/reference/nexus_primitives/owner_cap.md +++ b/nexus-next/packages/reference/nexus_primitives/owner_cap.md @@ -476,3 +476,4 @@ Inner [OwnerCap] will be dropped. + diff --git a/nexus-next/packages/reference/nexus_primitives/proof_of_uid.md b/nexus-next/packages/reference/nexus_primitives/proof_of_uid.md index 98f2532..c23e672 100644 --- a/nexus-next/packages/reference/nexus_primitives/proof_of_uid.md +++ b/nexus-next/packages/reference/nexus_primitives/proof_of_uid.md @@ -345,3 +345,4 @@ Add a stamp to the proof. + diff --git a/nexus-next/packages/reference/nexus_primitives/proven_value.md b/nexus-next/packages/reference/nexus_primitives/proven_value.md index b754bc6..56e2bcc 100644 --- a/nexus-next/packages/reference/nexus_primitives/proven_value.md +++ b/nexus-next/packages/reference/nexus_primitives/proven_value.md @@ -257,3 +257,4 @@ Who is the recipient of the value, if any. + diff --git a/nexus-next/packages/reference/nexus_workflow/dag.md b/nexus-next/packages/reference/nexus_workflow/dag.md index 009b661..fdd0f1b 100644 --- a/nexus-next/packages/reference/nexus_workflow/dag.md +++ b/nexus-next/packages/reference/nexus_workflow/dag.md @@ -2079,6 +2079,3 @@ Will emit an event if the execution is done.
fun if_finished_emit_final_event(self: &(nexus_workflow=0x0)::dag::DAGExecution)
 
- - - diff --git a/nexus-next/packages/reference/nexus_workflow/default_gas_extension.md b/nexus-next/packages/reference/nexus_workflow/default_gas_extension.md index a01d823..3343f30 100644 --- a/nexus-next/packages/reference/nexus_workflow/default_gas_extension.md +++ b/nexus-next/packages/reference/nexus_workflow/default_gas_extension.md @@ -153,6 +153,3 @@ Disables this extension.
public fun disable_expiry(gas_service: &mut (nexus_workflow=0x0)::gas::GasService, tool_registry: &(nexus_workflow=0x0)::tool_registry::ToolRegistry, owner_cap: &(nexus_primitives=0x0)::owner_cap::CloneableOwnerCap<(nexus_workflow=0x0)::gas::OverGas>, fqn: std::ascii::String, ctx: &mut sui::tx_context::TxContext)
 
- - - diff --git a/nexus-next/packages/reference/nexus_workflow/default_sap.md b/nexus-next/packages/reference/nexus_workflow/default_sap.md index b776a28..b924f8e 100644 --- a/nexus-next/packages/reference/nexus_workflow/default_sap.md +++ b/nexus-next/packages/reference/nexus_workflow/default_sap.md @@ -282,3 +282,4 @@ One calls this after workflow contract is done with advancing the DAG. + diff --git a/nexus-next/packages/reference/nexus_workflow/gas.md b/nexus-next/packages/reference/nexus_workflow/gas.md index c7abe37..7914c24 100644 --- a/nexus-next/packages/reference/nexus_workflow/gas.md +++ b/nexus-next/packages/reference/nexus_workflow/gas.md @@ -1092,6 +1092,3 @@ amount requested.
fun get_or_insert_tool_gas_mut(self: &mut (nexus_workflow=0x0)::gas::GasService, fqn: std::ascii::String, ctx: &mut sui::tx_context::TxContext): &mut (nexus_workflow=0x0)::gas::ToolGas
 
- - - diff --git a/nexus-next/packages/reference/nexus_workflow/leader_cap.md b/nexus-next/packages/reference/nexus_workflow/leader_cap.md index be12a7f..9fc3f7a 100644 --- a/nexus-next/packages/reference/nexus_workflow/leader_cap.md +++ b/nexus-next/packages/reference/nexus_workflow/leader_cap.md @@ -105,6 +105,3 @@ Creates a founding [CloneableOwnerCap] with a random network ID.
public entry fun create_for_self_and_addresses(n_per_address: u64, addresses: vector<address>, ctx: &mut sui::tx_context::TxContext)
 
- - - diff --git a/nexus-next/packages/reference/nexus_workflow/main.md b/nexus-next/packages/reference/nexus_workflow/main.md index 706cd59..7a46a04 100644 --- a/nexus-next/packages/reference/nexus_workflow/main.md +++ b/nexus-next/packages/reference/nexus_workflow/main.md @@ -99,6 +99,3 @@ Amount of leader caps to clone per [DEV_ADDRESSES] address.
fun init(ctx: &mut sui::tx_context::TxContext)
 
- - - diff --git a/nexus-next/packages/reference/nexus_workflow/tool_registry.md b/nexus-next/packages/reference/nexus_workflow/tool_registry.md index 3103e5c..c296928 100644 --- a/nexus-next/packages/reference/nexus_workflow/tool_registry.md +++ b/nexus-next/packages/reference/nexus_workflow/tool_registry.md @@ -740,6 +740,3 @@ Has the tool been unregistered for longer than the lock duration?
fun did_unregister_period_pass_(self: &(nexus_workflow=0x0)::tool_registry::OffChainTool, clock: &sui::clock::Clock): bool
 
- - - diff --git a/nexus-next/packages/workflow.md b/nexus-next/packages/workflow.md index 83a0038..d6b6f33 100644 --- a/nexus-next/packages/workflow.md +++ b/nexus-next/packages/workflow.md @@ -228,3 +228,4 @@ The amount of `SUI` locked and the interval after which they can be reclaimed is This trade-off was deemed worthy. - When using the `ProofOfUid` primitive, it must be created with a type that matches the `UID`. The type should be considered an authorization ticket and should be treated just as any other capability type. + diff --git a/nexus-next/tool.md b/nexus-next/tool.md index 4b62811..e07d83c 100644 --- a/nexus-next/tool.md +++ b/nexus-next/tool.md @@ -75,3 +75,4 @@ Coming soon. ## Tool authorization Once there are community Tools, we will need a way to authorize communication between the Leader and a Tool. This has been discussed superficially and it needs to be researched in depth in the future. + diff --git a/nexus-sdk/cli.md b/nexus-sdk/cli.md index cacb3c2..66df595 100644 --- a/nexus-sdk/cli.md +++ b/nexus-sdk/cli.md @@ -1,6 +1,6 @@ # Nexus CLI -> concerns [`nexus-cli` repo][nexus-cli-repo] +> concerns [`nexus-cli` repo](https://github.com/Talus-Network/nexus-sdk/tree/main/cli) The Nexus CLI is a set of tools that is used by almost all Actors in the Nexus ecosystem. @@ -258,6 +258,3 @@ This command requires that a wallet is connected to the CLI... Provides completion for some well-known shells. - - -[nexus-cli-repo]: https://github.com/Talus-Network/nexus-sdk/tree/main/cli diff --git a/nexus-sdk/guides/dag-construction.md b/nexus-sdk/guides/dag-construction.md index 1471ff6..7f2eb67 100644 --- a/nexus-sdk/guides/dag-construction.md +++ b/nexus-sdk/guides/dag-construction.md @@ -2,7 +2,7 @@ This guide explains how to construct DAG (Directed Acyclic Graph) JSON files for the Nexus platform. DAGs define the workflow that an Agent will execute. -For an explanation of the terms and rules used below, refer to [the Nexus workflow documentation][nexus-next-workflow]. +For an explanation of the terms and rules used below, refer to [the Nexus workflow documentation](../../nexus-next/packages/workflow.md). {% hint style="info"%} Note that for all DAG related terms in the configuration JSON file, snake casing is applied. @@ -89,8 +89,8 @@ Default values provide static inputs to vertices: **Important Constraints:** -- An _input port_ can receive data either from an _incoming edge_ or a _default value_, but **never both**. ([workflow rules][nexus-next-workflow] Rule 4) -- Entry ports **cannot** have default values (by definition). Default values are only permitted for input ports that are _not_ entry ports. ([workflow rules][nexus-next-workflow] Rule 11) +- An _input port_ can receive data either from an _incoming edge_ or a _default value_, but **never both**. ([workflow rules](../../nexus-next/packages/workflow.md) Rule 4) +- Entry ports **cannot** have default values (by definition). Default values are only permitted for input ports that are _not_ entry ports. ([workflow rules](../../nexus-next/packages/workflow.md) Rule 11) ## 5. Entry Groups (Optional) @@ -128,7 +128,7 @@ Practically speaking, this means that you'll need to add all vertices to the ent ## 6. Validation Rules -The [Nexus CLI][nexus-cli] (`nexus dag validate`) performs static analysis to enforce the critical rules defined in [workflow rules][nexus-next-workflow]. +The [Nexus CLI](../cli.md) (`nexus dag validate`) performs static analysis to enforce the critical rules defined in [workflow rules](../../nexus-next/packages/workflow.md). ## 7. Best Practices @@ -200,10 +200,5 @@ For working examples, see the following files in the `cli/src/dag/_dags` directo - `ig_story_planner_valid.json`: Example of a complex workflow - `entry_groups_valid.json`: Example of using entry groups. -For examples of invalid DAGs and common mistakes to avoid (especially regarding Rule 5 - Race Conditions), see the diagrams in [workflow documentation][nexus-next-workflow] and the `*_invalid.json` files in the [testing DAG directory][example-dags]. +For examples of invalid DAGs and common mistakes to avoid (especially regarding Rule 5 - Race Conditions), see the diagrams in [workflow documentation](../../nexus-next/packages/workflow.md) and the `*_invalid.json` files in the [testing DAG directory](https://github.com/Talus-Network/nexus-sdk/tree/v0.1.0/cli/src/dag/_dags). - - -[nexus-next-workflow]: ../../nexus-next/packages/workflow.md -[example-dags]: https://github.com/Talus-Network/nexus-sdk/tree/v0.1.0/cli/src/dag/_dags -[nexus-cli]: ../cli.md diff --git a/nexus-sdk/guides/llm-openai-chat-prep-tool.md b/nexus-sdk/guides/llm-openai-chat-prep-tool.md index 998871c..a6adb61 100644 --- a/nexus-sdk/guides/llm-openai-chat-prep-tool.md +++ b/nexus-sdk/guides/llm-openai-chat-prep-tool.md @@ -363,3 +363,4 @@ Consider for what use cases you could use this tool to prepare it to add as an L ## Next Steps This tool provides a simple but essential bridge between mathematical operations and chat completion, enabling the creation of more sophisticated DAGs that combine numerical computation with natural language processing. Follow along with the developer guides to expand the [Math Branching Example DAG with LLM chat completion](math-branching-with-chat.md). + diff --git a/nexus-sdk/guides/math-branching-dag-builder.md b/nexus-sdk/guides/math-branching-dag-builder.md index 0652e41..8c9d81d 100644 --- a/nexus-sdk/guides/math-branching-dag-builder.md +++ b/nexus-sdk/guides/math-branching-dag-builder.md @@ -433,3 +433,4 @@ This example showcases how to combine simple tools and DAG structure definitions ## Up Next Want to extend this example? Follow the next part of the guide to see how we can add another entry point to the DAG and manage this through entry groups. + diff --git a/nexus-sdk/guides/math-branching-dag-entry.md b/nexus-sdk/guides/math-branching-dag-entry.md index 92e77cb..7a0e040 100644 --- a/nexus-sdk/guides/math-branching-dag-entry.md +++ b/nexus-sdk/guides/math-branching-dag-entry.md @@ -1,6 +1,6 @@ # Extending Your DAG with Entry Groups -This guide builds on the [Build the Quickstart guide][math-branching-dag-builder-guide] by extending the example to support multiple entry points using entry groups. You'll take the original [`math_branching.json`](https://github.com/Talus-Network/nexus-sdk/blob/v0.1.0/cli/src/dag/_dags/math_branching.json) DAG and add an alternative entry path that allows users to directly provide two numbers for multiplication instead of adding a constant to the input. +This guide builds on the [Build the Quickstart guide](./math-branching-dag-builder.md) by extending the example to support multiple entry points using entry groups. You'll take the original [`math_branching.json`](https://github.com/Talus-Network/nexus-sdk/blob/v0.1.0/cli/src/dag/_dags/math_branching.json) DAG and add an alternative entry path that allows users to directly provide two numbers for multiplication instead of adding a constant to the input. {% hint style="info" %} Prerequisites Follow the [setup guide](setup.md) to get properly setup in case you haven't. @@ -536,9 +536,5 @@ In this guide, we extended our original branching math DAG to support multiple e Entry groups are a powerful feature of Nexus DAGs that enable more flexible and modular workflows while maintaining the safety guarantees of the DAG execution model. They allow a single DAG to support multiple different starting states and input combinations while preventing potential race conditions. -For more advanced usage of entry groups and other DAG features, refer to the [DAG Construction Guide][dag-construction]. +For more advanced usage of entry groups and other DAG features, refer to the [DAG Construction Guide](./dag-construction.md). - - -[dag-construction]: ./dag-construction.md -[math-branching-dag-builder-guide]: ./math-branching-dag-builder.md diff --git a/nexus-sdk/guides/math-branching-quickstart.md b/nexus-sdk/guides/math-branching-quickstart.md index 14ec92f..a839728 100644 --- a/nexus-sdk/guides/math-branching-quickstart.md +++ b/nexus-sdk/guides/math-branching-quickstart.md @@ -143,3 +143,4 @@ When you execute the DAG via the `nexus dag execute` command, a successful outpu * Read the full [Agent Builder Guide](math-branching-dag-builder.md) to understand how this DAG is constructed * Study the [DAG Construction Guide](dag-construction.md) for more advanced DAG features * Try building your own DAG with different tools and logic flows + diff --git a/nexus-sdk/guides/math-branching-with-chat.md b/nexus-sdk/guides/math-branching-with-chat.md index b4e388a..8d18ff3 100644 --- a/nexus-sdk/guides/math-branching-with-chat.md +++ b/nexus-sdk/guides/math-branching-with-chat.md @@ -1,6 +1,6 @@ # Extending the Math Branching DAG with Chat Completion -This guide builds on the [Math Branching DAG with Entry Groups][math-branching-entry-guide] by adding a chat completion tool that explains the mathematical results. You'll learn how to: +This guide builds on the [Math Branching DAG with Entry Groups](./math_branching-dag-entry.md) by adding a chat completion tool that explains the mathematical results. You'll learn how to: 1. Understand the need for a custom tool to bridge between math operations and chat completion 2. Add the chat completion tool to the DAG @@ -15,7 +15,7 @@ Follow the [setup guide](setup.md) to get properly setup in case you haven't. Before you can connect our math operations to the chat completion tool, you need to understand a key challenge: type safety. The [LLM chat completion tool](../../tools/llm-openai-chat-completion/README.md)expects a `Message` struct as input, but the [math tool](../../tools/math/README.md) outputs numbers. You can't directly connect these without proper type conversion. -This is where you need a custom tool to bridge this gap. You'll use the `xyz.taluslabs.llm.openai.chat-prep@1` tool that you developed in the [Build the Missing Tool guide][llm-openai-chat-prep-tool]. This tool converts numbers into the proper message format that the chat completion tool expects. +This is where you need a custom tool to bridge this gap. You'll use the `xyz.taluslabs.llm.openai.chat-prep@1` tool that you developed in the [Build the Missing Tool guide](./llm-openai-chat-prep-tool.md). This tool converts numbers into the proper message format that the chat completion tool expects. ## Step 1: Adding the Required Tools @@ -619,7 +619,3 @@ This extended DAG demonstrates how to combine mathematical computation with natu This extended DAG demonstrates how to combine mathematical computation with natural language processing, creating a more interactive and engaging experience for users. - - -[math-branching-entry-guide]: ./math_branching-dag-entry.md -[llm-openai-chat-prep-tool]: ./llm-openai-chat-prep-tool.md diff --git a/nexus-sdk/guides/setup.md b/nexus-sdk/guides/setup.md index 3af262b..815a066 100644 --- a/nexus-sdk/guides/setup.md +++ b/nexus-sdk/guides/setup.md @@ -142,3 +142,4 @@ Open the [Talus Sui Explorer](https://explorer.devnet.taluslabs.dev/) and login --- After completing these steps, you are ready to build and execute workflows using the Nexus SDK. To build your first workflow, check the [Dev Quickstart guide](math-branching-quickstart.md). + diff --git a/nexus-sdk/guides/tool-firewall.md b/nexus-sdk/guides/tool-firewall.md index 4bb60b3..c4e017d 100644 --- a/nexus-sdk/guides/tool-firewall.md +++ b/nexus-sdk/guides/tool-firewall.md @@ -73,3 +73,4 @@ You should see entries indicating that connections from the specified IP address --- By following this guide, your Tool will be configured to accept connections only from the specified Leader nodes, enhancing the security of your deployment. + diff --git a/nexus-sdk/tool-development.md b/nexus-sdk/tool-development.md index 925a4af..7290c5a 100644 --- a/nexus-sdk/tool-development.md +++ b/nexus-sdk/tool-development.md @@ -70,3 +70,4 @@ Each Nexus Tool should have a clear and publicly accessible README file that des If using Rust, the `main.rs` file should include this documentation via `#![doc = include_str!("../path/to/README.md")]`. An example README file can be found [here](../tools/llm-openai-chat-completion/README.md). + diff --git a/nexus-sdk/toolkit-rust.md b/nexus-sdk/toolkit-rust.md index 94f23cd..4a0a280 100644 --- a/nexus-sdk/toolkit-rust.md +++ b/nexus-sdk/toolkit-rust.md @@ -1,6 +1,6 @@ # Nexus Toolkit for Rust -> concerns [`nexus-toolkit-rust` repo][nexus-toolkit-rust-repo] +> concerns [`nexus-toolkit-rust` repo](https://github.com/Talus-Network/nexus-sdk/tree/main/toolkit-rust) This library exports useful functionality to streamline the development of Nexus Tools in Rust. It is mainly used by **Tool developers** to bootstrap their efforts to extend the Nexus ecosystem. @@ -8,7 +8,7 @@ This documentation will go over the main features of the library and how to use ## Installation -Using the [CLI][nexus-cli-docs] run the `$ nexus tool new --help` command to see the available options. This command creates a fresh Rust project with the necessary dependencies to get started. +Using the [CLI](./cli.md) run the `$ nexus tool new --help` command to see the available options. This command creates a fresh Rust project with the necessary dependencies to get started. Alternatively, you can add the following to your `Cargo.toml` file: @@ -83,7 +83,7 @@ This associated type defines the output that the Tool produces. This type must d The Tool's output schema is then derived from this type via the `schemars::schema_for!` macro. -To comply with [Nexus Workflow output variants][nexus-next-workflow-docs], the output schema **must include a top-level `oneOf`**. This is also enforced by the Tool's runtime and achievable in Rust simply by using an `enum`. +To comply with [Nexus Workflow output variants](../nexus-next/packages/workflow.md), the output schema **must include a top-level `oneOf`**. This is also enforced by the Tool's runtime and achievable in Rust simply by using an `enum`. ```rs use nexus_toolkit::*; @@ -106,7 +106,7 @@ impl NexusTool for HttpStatus { #### `NexusTool::fqn` -Defines the Tool's fully qualified name. This is used to uniquely identify the Tool in the Nexus ecosystem. Read more about FQNs in the [Nexus Tool documentation][nexus-next-tool-docs]. +Defines the Tool's fully qualified name. This is used to uniquely identify the Tool in the Nexus ecosystem. Read more about FQNs in the [Nexus Tool documentation](../nexus-next/tool.md). ```rs use nexus_toolkit::*; @@ -183,7 +183,7 @@ Notice that the `invoke` function does not return a `Result`. This is because er ### `nexus_toolkit::bootstrap!` The `bootstrap!` macro hides away the boilerplate code needed to create the -underlying HTTP server that adheres to the [Nexus Tool interface][nexus-next-tool-docs]. +underlying HTTP server that adheres to the [Nexus Tool interface](../nexus-next/tool.md). It has a flexible interface that accepts an `Into` value and a struct that `impl NexusTool`. @@ -223,9 +223,3 @@ async fn main() { } ``` - - -[nexus-toolkit-rust-repo]: https://github.com/Talus-Network/nexus-sdk/tree/main/toolkit-rust -[nexus-next-tool-docs]: ../nexus-next/tool.md -[nexus-next-workflow-docs]: ../nexus-next/packages/workflow.md -[nexus-cli-docs]: ./cli.md From 20984c4582b0da7d0a9f1ea22c14fa6afb0948d8 Mon Sep 17 00:00:00 2001 From: tmsdkeys <98807841+tmsdkeys@users.noreply.github.com> Date: Tue, 27 May 2025 14:50:16 +0000 Subject: [PATCH 3/3] chore(docs): format markdown links --- nexus-next/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/nexus-next/index.md b/nexus-next/index.md index 656d750..494d848 100644 --- a/nexus-next/index.md +++ b/nexus-next/index.md @@ -73,3 +73,4 @@ Nexus offers [tool and agent developers](#actors) an easy-to-use SDK consisting Docs: - [Nexus SDK documentation](../nexus-sdk/index.md) +