@props-labs/mesh-os 0.1.7 → 0.1.8
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/dist/core/client.d.ts +6 -2
- package/dist/core/client.js +29 -1
- package/dist/core/taxonomy.d.ts +11 -0
- package/dist/core/taxonomy.js +11 -1
- package/package.json +1 -1
package/dist/core/client.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { EdgeType, type EdgeMetadata, type MemoryMetadata } from './taxonomy';
|
1
|
+
import { EdgeType, type AgentStatus, type EdgeMetadata, type MemoryMetadata } from './taxonomy';
|
2
2
|
/**
|
3
3
|
* An agent in the system.
|
4
4
|
*/
|
@@ -7,7 +7,7 @@ export interface Agent {
|
|
7
7
|
name: string;
|
8
8
|
description: string;
|
9
9
|
metadata: Record<string, unknown>;
|
10
|
-
status:
|
10
|
+
status: AgentStatus;
|
11
11
|
slug?: string;
|
12
12
|
}
|
13
13
|
/**
|
@@ -139,4 +139,8 @@ export declare class MeshOS {
|
|
139
139
|
* Internal method to perform recall with a specific threshold.
|
140
140
|
*/
|
141
141
|
private recallWithThreshold;
|
142
|
+
/**
|
143
|
+
* Update an agent's status.
|
144
|
+
*/
|
145
|
+
updateAgentStatus(agentId: string, status: AgentStatus): Promise<Agent>;
|
142
146
|
}
|
package/dist/core/client.js
CHANGED
@@ -117,7 +117,7 @@ class MeshOS {
|
|
117
117
|
name: $name,
|
118
118
|
description: $description,
|
119
119
|
metadata: $metadata,
|
120
|
-
status: "
|
120
|
+
status: "${taxonomy_1.CoreAgentStatus.IDLE}",
|
121
121
|
slug: $slug
|
122
122
|
}) {
|
123
123
|
id
|
@@ -577,5 +577,33 @@ class MeshOS {
|
|
577
577
|
updatedAt: memory.updated_at
|
578
578
|
}));
|
579
579
|
}
|
580
|
+
/**
|
581
|
+
* Update an agent's status.
|
582
|
+
*/
|
583
|
+
async updateAgentStatus(agentId, status) {
|
584
|
+
const query = `
|
585
|
+
mutation UpdateAgentStatus($id: uuid!, $status: String!) {
|
586
|
+
update_agents_by_pk(
|
587
|
+
pk_columns: { id: $id },
|
588
|
+
_set: { status: $status }
|
589
|
+
) {
|
590
|
+
id
|
591
|
+
name
|
592
|
+
description
|
593
|
+
metadata
|
594
|
+
status
|
595
|
+
slug
|
596
|
+
}
|
597
|
+
}
|
598
|
+
`;
|
599
|
+
const result = await this.executeQuery(query, {
|
600
|
+
id: agentId,
|
601
|
+
status
|
602
|
+
});
|
603
|
+
if (!result.update_agents_by_pk) {
|
604
|
+
throw new Error(`Agent with ID ${agentId} not found`);
|
605
|
+
}
|
606
|
+
return result.update_agents_by_pk;
|
607
|
+
}
|
580
608
|
}
|
581
609
|
exports.MeshOS = MeshOS;
|
package/dist/core/taxonomy.d.ts
CHANGED
@@ -75,6 +75,17 @@ export declare enum RelevanceTag {
|
|
75
75
|
VOLATILE = "volatile",
|
76
76
|
EXPERIMENTAL = "experimental"
|
77
77
|
}
|
78
|
+
/**
|
79
|
+
* Core agent status types.
|
80
|
+
* The type allows for both predefined and custom status strings.
|
81
|
+
*/
|
82
|
+
export declare const CoreAgentStatus: {
|
83
|
+
readonly IDLE: "idle";
|
84
|
+
readonly RUNNING: "running";
|
85
|
+
readonly ERROR: "error";
|
86
|
+
readonly PAUSED: "paused";
|
87
|
+
};
|
88
|
+
export type AgentStatus = typeof CoreAgentStatus[keyof typeof CoreAgentStatus] | string;
|
78
89
|
/**
|
79
90
|
* Version history entry.
|
80
91
|
*/
|
package/dist/core/taxonomy.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.edgeMetadataSchema = exports.memoryMetadataSchema = exports.RelevanceTag = exports.EdgeType = exports.MediaSubtype = exports.DecisionSubtype = exports.KnowledgeSubtype = exports.ActivitySubtype = exports.DataType = void 0;
|
3
|
+
exports.edgeMetadataSchema = exports.memoryMetadataSchema = exports.CoreAgentStatus = exports.RelevanceTag = exports.EdgeType = exports.MediaSubtype = exports.DecisionSubtype = exports.KnowledgeSubtype = exports.ActivitySubtype = exports.DataType = void 0;
|
4
4
|
/**
|
5
5
|
* Taxonomy and classification models for MeshOS.
|
6
6
|
*/
|
@@ -85,6 +85,16 @@ var RelevanceTag;
|
|
85
85
|
RelevanceTag["VOLATILE"] = "volatile";
|
86
86
|
RelevanceTag["EXPERIMENTAL"] = "experimental";
|
87
87
|
})(RelevanceTag || (exports.RelevanceTag = RelevanceTag = {}));
|
88
|
+
/**
|
89
|
+
* Core agent status types.
|
90
|
+
* The type allows for both predefined and custom status strings.
|
91
|
+
*/
|
92
|
+
exports.CoreAgentStatus = {
|
93
|
+
IDLE: 'idle',
|
94
|
+
RUNNING: 'running',
|
95
|
+
ERROR: 'error',
|
96
|
+
PAUSED: 'paused'
|
97
|
+
};
|
88
98
|
/**
|
89
99
|
* Standardized metadata structure for memories.
|
90
100
|
*/
|