@distri/core 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -1
- package/dist/index.d.mts +23 -31
- package/dist/index.d.ts +23 -31
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1639,7 +1639,8 @@ var _DistriClient = class _DistriClient {
|
|
|
1639
1639
|
throw lastError;
|
|
1640
1640
|
}
|
|
1641
1641
|
/**
|
|
1642
|
-
* Enhanced fetch with retry logic
|
|
1642
|
+
* Enhanced fetch with retry logic and auth headers.
|
|
1643
|
+
* Exposed publicly for extensions like DistriHomeClient.
|
|
1643
1644
|
*/
|
|
1644
1645
|
async fetch(input, initialInit) {
|
|
1645
1646
|
const url = `${this.config.baseUrl}${input}`;
|
|
@@ -1783,7 +1784,7 @@ var Agent = class _Agent {
|
|
|
1783
1784
|
return this.agentDefinition.description;
|
|
1784
1785
|
}
|
|
1785
1786
|
get agentType() {
|
|
1786
|
-
return this.agentDefinition.agent_type
|
|
1787
|
+
return this.agentDefinition.agent_type;
|
|
1787
1788
|
}
|
|
1788
1789
|
get iconUrl() {
|
|
1789
1790
|
return this.agentDefinition.icon_url;
|
|
@@ -1933,12 +1934,13 @@ var Agent = class _Agent {
|
|
|
1933
1934
|
*/
|
|
1934
1935
|
static async create(agentIdOrDef, client) {
|
|
1935
1936
|
const agentDefinition = typeof agentIdOrDef === "string" ? await client.getAgent(agentIdOrDef) : agentIdOrDef;
|
|
1937
|
+
const tools = agentDefinition?.resolved_tools || [];
|
|
1936
1938
|
console.log("\u{1F916} Agent definition loaded:", {
|
|
1937
1939
|
id: agentDefinition.id,
|
|
1938
1940
|
name: agentDefinition.name,
|
|
1939
|
-
tools:
|
|
1941
|
+
tools: tools.map((t) => ({
|
|
1940
1942
|
name: t.name,
|
|
1941
|
-
type:
|
|
1943
|
+
type: "function"
|
|
1942
1944
|
})) || [],
|
|
1943
1945
|
toolCount: agentDefinition.tools?.length || 0
|
|
1944
1946
|
});
|