Skip to content

Commit c971fa6

Browse files
author
mike dupont
committed
updated client-twitter wip
1 parent 6c16757 commit c971fa6

File tree

7 files changed

+1660
-92
lines changed

7 files changed

+1660
-92
lines changed

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
[submodule "vendor/elizaos/plugin-twitter"]
22
path = vendor/elizaos/plugin-twitter
33
url = https://github.com/meta-introspector/plugin-twitter
4+
[submodule "vendor/elizaos/agent-twitter-client"]
5+
path = vendor/elizaos/agent-twitter-client
6+
url = https://github.com/meta-introspector/agent-twitter-client.git
7+
[submodule "vendor/elizaos/client-twitter"]
8+
path = vendor/elizaos/client-twitter
9+
url = https://github.com/meta-introspector/client-twitter-eliza-zos

agent/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@elizaos/core": "workspace:*",
2424
"@elizaos/plugin-bootstrap": "workspace:*",
2525
"@elizaos-plugins/plugin-twitter": "workspace:*",
26+
"agent-twitter-client": "workspace:*",
2627
"@hapi/shot": "^6.0.1",
2728
"@opentelemetry/api": "^1.6.0",
2829
"@opentelemetry/auto-instrumentations-node": "^0.39.4",

agent/src/index.ts

+7-36
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,12 @@
1-
console.log("hello sfm");
1+
//console.log("hello sfm");
22
//import { debug_tracing } from "./mytracing";
33
//debug_tracing()
44
// tracing.js
55
console.log("DEBUG SOLFUNMEME")
66

7-
8-
// // do not set headers in exporterOptions, the OTel spec recommends setting headers through ENV variables
9-
// // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#specifying-headers-via-environment-variables
10-
11-
// const exporterOptions = {
12-
// url: 'https://ingest.us.signoz.cloud:443/v1/traces'
13-
// }
14-
15-
// const traceExporter = new OTLPTraceExporter(exporterOptions);
16-
// const sdk = new opentelemetry.NodeSDK({
17-
// traceExporter,
18-
// instrumentations: [getNodeAutoInstrumentations()],
19-
// resource: new Resource({
20-
// [SemanticResourceAttributes.SERVICE_NAME]: 'eliza'
21-
// })
22-
// });
23-
24-
// // initialize the SDK and register with the OpenTelemetry API
25-
// // this enables the API to record telemetry
26-
// sdk.start()
27-
28-
// // gracefully shut down the SDK on process exit
29-
// process.on('SIGTERM', () => {
30-
// sdk.shutdown()
31-
// .then(() => console.log('Tracing terminated'))
32-
// .catch((error) => console.log('Error terminating tracing', error))
33-
// .finally(() => process.exit(0));
34-
// });
35-
36-
// export function debug_tracing():string {
37-
// console.log("tracing on")
38-
// return "hello"
39-
// }
40-
41-
console.log("hello tracing");
427
import { DirectClient } from "@elizaos/client-direct";
8+
import { TwitterClient } from "@elizaos-plugins/client-twitter";
9+
console.log("TwitterClient",TwitterClient)
4310
import {
4411
AgentRuntime,
4512
CacheManager,
@@ -557,6 +524,9 @@ export async function initializeClients(
557524
elizaLogger.debug(
558525
`Initializing client: ${client.name}`
559526
);
527+
528+
console.log("DEBUG",client);
529+
560530
clients.push(startedClient);
561531
}
562532
}
@@ -716,6 +686,7 @@ async function startAgent(
716686
// start assigned clients
717687
runtime.clients = await initializeClients(character, runtime);
718688

689+
TwitterClient.registerAgent(runtime);
719690
// add to container
720691
directClient.registerAgent(runtime);
721692

characters/tine-test.character.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"name": "TINE-CloudAssistent",
3-
"plugins": [
4-
"@elizaos/plugin-twitter"
5-
],
3+
"plugins": [ "@elizaos-plugins/plugin-twitter" ],
64
"clients": ["twitter"],
75
"modelProvider": "groq",
86

0 commit comments

Comments
 (0)