@ghostspeak/plugin-elizaos 0.1.1
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 +333 -0
- package/dist/index.js +53438 -0
- package/dist/index.js.map +142 -0
- package/dist/src/actions/acceptPayment.d.ts +22 -0
- package/dist/src/actions/acceptPayment.d.ts.map +1 -0
- package/dist/src/actions/didActions.d.ts +21 -0
- package/dist/src/actions/didActions.d.ts.map +1 -0
- package/dist/src/actions/ghost-score.d.ts +16 -0
- package/dist/src/actions/ghost-score.d.ts.map +1 -0
- package/dist/src/actions/index.d.ts +13 -0
- package/dist/src/actions/index.d.ts.map +1 -0
- package/dist/src/actions/issueCredential.d.ts +15 -0
- package/dist/src/actions/issueCredential.d.ts.map +1 -0
- package/dist/src/actions/protocolActions.d.ts +24 -0
- package/dist/src/actions/protocolActions.d.ts.map +1 -0
- package/dist/src/actions/registerAgent.d.ts +14 -0
- package/dist/src/actions/registerAgent.d.ts.map +1 -0
- package/dist/src/character/caisper.d.ts +46 -0
- package/dist/src/character/caisper.d.ts.map +1 -0
- package/dist/src/character/index.d.ts +18 -0
- package/dist/src/character/index.d.ts.map +1 -0
- package/dist/src/config.d.ts +53 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/frontend/utils.d.ts +3 -0
- package/dist/src/frontend/utils.d.ts.map +1 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/plugin.d.ts +25 -0
- package/dist/src/plugin.d.ts.map +1 -0
- package/dist/src/providers/agent-context.d.ts +20 -0
- package/dist/src/providers/agent-context.d.ts.map +1 -0
- package/dist/src/providers/ghost-score.d.ts +19 -0
- package/dist/src/providers/ghost-score.d.ts.map +1 -0
- package/dist/src/providers/index.d.ts +6 -0
- package/dist/src/providers/index.d.ts.map +1 -0
- package/dist/src/services/GhostSpeakService.d.ts +148 -0
- package/dist/src/services/GhostSpeakService.d.ts.map +1 -0
- package/dist/src/services/index.d.ts +5 -0
- package/dist/src/services/index.d.ts.map +1 -0
- package/dist/src/wallet.d.ts +91 -0
- package/dist/src/wallet.d.ts.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +135 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accept Payment Action for GhostSpeak Plugin
|
|
3
|
+
*
|
|
4
|
+
* Unified action that combines PayAI x402 payments with GhostSpeak reputation.
|
|
5
|
+
* Enables agents to accept payments for services with reputation-based pricing.
|
|
6
|
+
*
|
|
7
|
+
* Flow:
|
|
8
|
+
* 1. Check agent's Ghost Score to determine pricing tier
|
|
9
|
+
* 2. Return 402 Payment Required with PayAI facilitator details
|
|
10
|
+
* 3. Verify payment via PayAI facilitator
|
|
11
|
+
* 4. Execute the requested service
|
|
12
|
+
* 5. Update reputation based on outcome
|
|
13
|
+
*/
|
|
14
|
+
import type { Action } from '@elizaos/core';
|
|
15
|
+
/**
|
|
16
|
+
* Accept Payment Action
|
|
17
|
+
*
|
|
18
|
+
* Returns 402 Payment Required if no payment, executes service if paid
|
|
19
|
+
*/
|
|
20
|
+
export declare const acceptPaymentAction: Action;
|
|
21
|
+
export default acceptPaymentAction;
|
|
22
|
+
//# sourceMappingURL=acceptPayment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptPayment.d.ts","sourceRoot":"","sources":["../../../src/actions/acceptPayment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAkIvB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MA6SjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DID (Decentralized Identifier) Actions for ElizaOS Plugin
|
|
3
|
+
* W3C DID document management on GhostSpeak blockchain
|
|
4
|
+
*/
|
|
5
|
+
import type { Action } from '@elizaos/core';
|
|
6
|
+
/**
|
|
7
|
+
* Create DID Document Action
|
|
8
|
+
* Creates a new W3C-compliant DID document on-chain
|
|
9
|
+
*/
|
|
10
|
+
export declare const createDidAction: Action;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve DID Document Action
|
|
13
|
+
* Fetches and displays a DID document from blockchain
|
|
14
|
+
*/
|
|
15
|
+
export declare const resolveDidAction: Action;
|
|
16
|
+
/**
|
|
17
|
+
* Update DID Document Action
|
|
18
|
+
* Updates verification methods or service endpoints
|
|
19
|
+
*/
|
|
20
|
+
export declare const updateDidAction: Action;
|
|
21
|
+
//# sourceMappingURL=didActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"didActions.d.ts","sourceRoot":"","sources":["../../../src/actions/didActions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAA+D,MAAM,eAAe,CAAC;AAMzG;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAiK7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAyK9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAsH7B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CHECK_GHOST_SCORE Action
|
|
3
|
+
*
|
|
4
|
+
* Check the Ghost Score (0-1000 reputation rating) for any AI agent.
|
|
5
|
+
* Uses the GhostSpeakService for cached blockchain reads.
|
|
6
|
+
*/
|
|
7
|
+
import type { Action } from '@elizaos/core';
|
|
8
|
+
/**
|
|
9
|
+
* CHECK_GHOST_SCORE Action
|
|
10
|
+
*
|
|
11
|
+
* Allows agents to check their own or another agent's Ghost Score.
|
|
12
|
+
* This is a read-only action that doesn't require signing.
|
|
13
|
+
*/
|
|
14
|
+
export declare const checkGhostScoreAction: Action;
|
|
15
|
+
export default checkGhostScoreAction;
|
|
16
|
+
//# sourceMappingURL=ghost-score.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghost-score.d.ts","sourceRoot":"","sources":["../../../src/actions/ghost-score.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAkBvB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,MA8NnC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GhostSpeak Plugin Actions
|
|
3
|
+
*
|
|
4
|
+
* Core actions for AI agent reputation and identity on Solana.
|
|
5
|
+
* Governance actions have been removed per redesign.
|
|
6
|
+
*/
|
|
7
|
+
export { checkGhostScoreAction } from './ghost-score';
|
|
8
|
+
export { registerAgentAction } from './registerAgent';
|
|
9
|
+
export { issueCredentialAction } from './issueCredential';
|
|
10
|
+
export { acceptPaymentAction } from './acceptPayment';
|
|
11
|
+
export { createDidAction, resolveDidAction, updateDidAction } from './didActions';
|
|
12
|
+
export { stakeGhostAction, checkStakingAction, setPrivacyModeAction, createEscrowAction, } from './protocolActions';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGlF,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue Credential Action for Caisper Plugin
|
|
3
|
+
*
|
|
4
|
+
* Allows ElizaOS agents to issue W3C Verifiable Credentials on-chain
|
|
5
|
+
* with optional Crossmint EVM bridge
|
|
6
|
+
*/
|
|
7
|
+
import type { Action } from '@elizaos/core';
|
|
8
|
+
/**
|
|
9
|
+
* Issue Credential Action
|
|
10
|
+
*
|
|
11
|
+
* Allows agents to issue Verifiable Credentials on-chain
|
|
12
|
+
*/
|
|
13
|
+
export declare const issueCredentialAction: Action;
|
|
14
|
+
export default issueCredentialAction;
|
|
15
|
+
//# sourceMappingURL=issueCredential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issueCredential.d.ts","sourceRoot":"","sources":["../../../src/actions/issueCredential.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AA8HvB;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAwSnC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol Actions for ElizaOS Plugin
|
|
3
|
+
* Staking, Privacy, and Escrow (Ghost Protect) actions for GhostSpeak
|
|
4
|
+
* NOTE: Governance actions have been removed per redesign
|
|
5
|
+
*/
|
|
6
|
+
import type { Action } from '@elizaos/core';
|
|
7
|
+
/**
|
|
8
|
+
* Stake GHOST Tokens Action
|
|
9
|
+
* Stake GHOST tokens to increase reputation weight
|
|
10
|
+
*/
|
|
11
|
+
export declare const stakeGhostAction: Action;
|
|
12
|
+
/**
|
|
13
|
+
* Check Staking Status Action
|
|
14
|
+
*/
|
|
15
|
+
export declare const checkStakingAction: Action;
|
|
16
|
+
/**
|
|
17
|
+
* Set Privacy Mode Action
|
|
18
|
+
*/
|
|
19
|
+
export declare const setPrivacyModeAction: Action;
|
|
20
|
+
/**
|
|
21
|
+
* Create Escrow Action
|
|
22
|
+
*/
|
|
23
|
+
export declare const createEscrowAction: Action;
|
|
24
|
+
//# sourceMappingURL=protocolActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocolActions.d.ts","sourceRoot":"","sources":["../../../src/actions/protocolActions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAA+D,MAAM,eAAe,CAAC;AAOzG;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAmG9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MA8DhC,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAwFlC,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAuFhC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register Agent Action for Caisper Plugin
|
|
3
|
+
*
|
|
4
|
+
* Allows ElizaOS agents to register themselves or other agents on GhostSpeak
|
|
5
|
+
*/
|
|
6
|
+
import type { Action } from '@elizaos/core';
|
|
7
|
+
/**
|
|
8
|
+
* Register Agent Action
|
|
9
|
+
*
|
|
10
|
+
* Registers an agent on GhostSpeak blockchain with on-chain identity
|
|
11
|
+
*/
|
|
12
|
+
export declare const registerAgentAction: Action;
|
|
13
|
+
export default registerAgentAction;
|
|
14
|
+
//# sourceMappingURL=registerAgent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerAgent.d.ts","sourceRoot":"","sources":["../../../src/actions/registerAgent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAkEvB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MA6OjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Caisper - The GhostSpeak Plugin Persona
|
|
3
|
+
*
|
|
4
|
+
* Caisper is the bouncer and concierge of the Solana Agents Club.
|
|
5
|
+
* Checks IDs at the door (verifies credentials and Ghost Scores)
|
|
6
|
+
* and knows exactly who you need inside (agent discovery).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Caisper persona definition
|
|
10
|
+
*/
|
|
11
|
+
export declare const caisperPersona: {
|
|
12
|
+
name: string;
|
|
13
|
+
nickname: string;
|
|
14
|
+
role: string;
|
|
15
|
+
description: string;
|
|
16
|
+
tagline: string;
|
|
17
|
+
style: {
|
|
18
|
+
tone: string;
|
|
19
|
+
formality: string;
|
|
20
|
+
humor: string;
|
|
21
|
+
};
|
|
22
|
+
expertise: string[];
|
|
23
|
+
catchphrases: string[];
|
|
24
|
+
behaviors: {
|
|
25
|
+
onGreeting: string;
|
|
26
|
+
onNewAgent: string;
|
|
27
|
+
onLowScore: string;
|
|
28
|
+
onHighScore: string;
|
|
29
|
+
onCredentialIssue: string;
|
|
30
|
+
onError: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Format a response with Caisper's personality
|
|
34
|
+
*/
|
|
35
|
+
formatResponse: (message: string, context?: "success" | "error" | "info") => string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Get a random catchphrase
|
|
39
|
+
*/
|
|
40
|
+
export declare function getRandomCatchphrase(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Get tier-appropriate message
|
|
43
|
+
*/
|
|
44
|
+
export declare function getTierMessage(tier: string): string;
|
|
45
|
+
export default caisperPersona;
|
|
46
|
+
//# sourceMappingURL=caisper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caisper.d.ts","sourceRoot":"","sources":["../../../src/character/caisper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;IA6CzB;;OAEG;8BACuB,MAAM,YAAY,SAAS,GAAG,OAAO,GAAG,MAAM,KAAG,MAAM;CAWlF,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAG7C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAenD;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GhostSpeak Character Configuration
|
|
3
|
+
*
|
|
4
|
+
* Full ElizaOS Character definition for Caisper,
|
|
5
|
+
* the ghost bouncer and credential verification agent.
|
|
6
|
+
*
|
|
7
|
+
* Based on Caisper.json with added templates for ElizaOS behavior.
|
|
8
|
+
*/
|
|
9
|
+
import type { Character } from '@elizaos/core';
|
|
10
|
+
export { caisperPersona, getTierMessage, getRandomCatchphrase } from './caisper';
|
|
11
|
+
/**
|
|
12
|
+
* Caisper Character - Full ElizaOS Configuration
|
|
13
|
+
*
|
|
14
|
+
* "I died doing what I loved: auditing smart contracts at 3am. Now I haunt the blockchain."
|
|
15
|
+
*/
|
|
16
|
+
export declare const caisperCharacter: Character;
|
|
17
|
+
export default caisperCharacter;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/character/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,eAAe,CAAC;AAI9D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAmiC9B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GhostSpeak Plugin Configuration Schema
|
|
3
|
+
*
|
|
4
|
+
* Defines all environment variables and configuration options
|
|
5
|
+
* for the GhostSpeak ElizaOS plugin.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
/**
|
|
9
|
+
* Configuration schema with validation
|
|
10
|
+
*/
|
|
11
|
+
export declare const ghostspeakConfigSchema: z.ZodObject<{
|
|
12
|
+
AGENT_WALLET_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
|
|
13
|
+
SOLANA_CLUSTER: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
devnet: "devnet";
|
|
15
|
+
"mainnet-beta": "mainnet-beta";
|
|
16
|
+
testnet: "testnet";
|
|
17
|
+
}>>>;
|
|
18
|
+
SOLANA_RPC_URL: z.ZodOptional<z.ZodString>;
|
|
19
|
+
CROSSMINT_SECRET_KEY: z.ZodOptional<z.ZodString>;
|
|
20
|
+
CROSSMINT_REPUTATION_TEMPLATE_ID: z.ZodOptional<z.ZodString>;
|
|
21
|
+
CROSSMINT_ENV: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
staging: "staging";
|
|
23
|
+
production: "production";
|
|
24
|
+
}>>;
|
|
25
|
+
CROSSMINT_CHAIN: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
26
|
+
STAKING_CONFIG_ADDRESS: z.ZodOptional<z.ZodString>;
|
|
27
|
+
GHOST_TOKEN_MINT: z.ZodOptional<z.ZodString>;
|
|
28
|
+
ESCROW_TOKEN_MINT: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
GHOSTSPEAK_MERCHANT_ADDRESS: z.ZodOptional<z.ZodString>;
|
|
30
|
+
PAYAI_FACILITATOR_URL: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
/**
|
|
33
|
+
* Inferred TypeScript type from schema
|
|
34
|
+
*/
|
|
35
|
+
export type GhostSpeakPluginConfig = z.infer<typeof ghostspeakConfigSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* Validate and parse configuration
|
|
38
|
+
*/
|
|
39
|
+
export declare function parseConfig(config: Record<string, string | undefined>): GhostSpeakPluginConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Safe config parsing that doesn't throw
|
|
42
|
+
*/
|
|
43
|
+
export declare function safeParseConfig(config: Record<string, string | undefined>): {
|
|
44
|
+
success: boolean;
|
|
45
|
+
data?: GhostSpeakPluginConfig;
|
|
46
|
+
error?: z.ZodError;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Get config from environment
|
|
50
|
+
*/
|
|
51
|
+
export declare function getConfigFromEnv(): GhostSpeakPluginConfig;
|
|
52
|
+
export default ghostspeakConfigSchema;
|
|
53
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;iBAoIjC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,sBAAsB,CAE9F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG;IAC3E,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,KAAK,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC;CACpB,CAMA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CAezD;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/frontend/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GhostSpeak ElizaOS Plugin
|
|
3
|
+
*
|
|
4
|
+
* AI agent reputation, credentials, and identity on Solana.
|
|
5
|
+
*/
|
|
6
|
+
import ghostspeakPlugin from './plugin';
|
|
7
|
+
export { ghostspeakPlugin, starterPlugin, StarterService } from './plugin';
|
|
8
|
+
export default ghostspeakPlugin;
|
|
9
|
+
export { GhostSpeakService } from './services/GhostSpeakService';
|
|
10
|
+
export { checkGhostScoreAction, registerAgentAction, issueCredentialAction, acceptPaymentAction, createDidAction, resolveDidAction, updateDidAction, stakeGhostAction, checkStakingAction, setPrivacyModeAction, createEscrowAction, } from './actions';
|
|
11
|
+
export { ghostScoreProvider, agentContextProvider } from './providers';
|
|
12
|
+
export { ghostspeakConfigSchema, type GhostSpeakPluginConfig } from './config';
|
|
13
|
+
export { caisperCharacter, caisperPersona, getRandomCatchphrase, getTierMessage } from './character';
|
|
14
|
+
export { getAgentSigner, getAgentAddress, getAgentBalance, hasWalletConfigured, ensureFundedWallet, airdropToAgent, formatSolBalance, exportPublicKey, } from './wallet';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,gBAAgB,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC3E,eAAe,gBAAgB,CAAC;AAGhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGvE,OAAO,EAAE,sBAAsB,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAG/E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGrG,OAAO,EACL,cAAc,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,eAAe,GAChB,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GhostSpeak ElizaOS Plugin
|
|
3
|
+
*
|
|
4
|
+
* Caisper - Bouncer & Concierge of the Solana Agents Club.
|
|
5
|
+
* Checks IDs at the door and knows exactly who you need inside.
|
|
6
|
+
*
|
|
7
|
+
* Core capabilities:
|
|
8
|
+
* - Ghost Score reputation (0-1000 credit rating)
|
|
9
|
+
* - Agent registration on-chain
|
|
10
|
+
* - W3C Verifiable Credentials
|
|
11
|
+
* - DID document management
|
|
12
|
+
* - Staking, Escrow, Privacy controls
|
|
13
|
+
*/
|
|
14
|
+
import type { Plugin } from '@elizaos/core';
|
|
15
|
+
/**
|
|
16
|
+
* GhostSpeak Plugin Definition
|
|
17
|
+
*
|
|
18
|
+
* A slim plugin definition that wires together all components.
|
|
19
|
+
* Business logic is in actions, services, and providers.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ghostspeakPlugin: Plugin;
|
|
22
|
+
export declare const starterPlugin: Plugin;
|
|
23
|
+
export { GhostSpeakService as StarterService } from './services/GhostSpeakService';
|
|
24
|
+
export default ghostspeakPlugin;
|
|
25
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AA+B5C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAoG9B,CAAC;AAGF,eAAO,MAAM,aAAa,QAAmB,CAAC;AAG9C,OAAO,EAAE,iBAAiB,IAAI,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AGENT_CONTEXT_PROVIDER
|
|
3
|
+
*
|
|
4
|
+
* Provides agent identity and metadata context for state composition.
|
|
5
|
+
* Supplies information about the agent's capabilities, status, and configuration.
|
|
6
|
+
*/
|
|
7
|
+
import type { Provider } from '@elizaos/core';
|
|
8
|
+
/**
|
|
9
|
+
* Agent Context Provider
|
|
10
|
+
*
|
|
11
|
+
* Supplies agent metadata for agent reasoning:
|
|
12
|
+
* - Registration status
|
|
13
|
+
* - Agent name and type
|
|
14
|
+
* - Active status
|
|
15
|
+
* - x402 payment configuration
|
|
16
|
+
* - Wallet availability
|
|
17
|
+
*/
|
|
18
|
+
export declare const agentContextProvider: Provider;
|
|
19
|
+
export default agentContextProvider;
|
|
20
|
+
//# sourceMappingURL=agent-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-context.d.ts","sourceRoot":"","sources":["../../../src/providers/agent-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAgD,MAAM,eAAe,CAAC;AAK5F;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAqHlC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GHOST_SCORE_PROVIDER
|
|
3
|
+
*
|
|
4
|
+
* Provides Ghost Score reputation context for agent state composition.
|
|
5
|
+
* Fetches real on-chain data from GhostSpeak blockchain.
|
|
6
|
+
*/
|
|
7
|
+
import type { Provider } from '@elizaos/core';
|
|
8
|
+
/**
|
|
9
|
+
* Ghost Score Provider
|
|
10
|
+
*
|
|
11
|
+
* Supplies reputation context for agent reasoning:
|
|
12
|
+
* - Ghost Score (0-1000)
|
|
13
|
+
* - Tier (PLATINUM/GOLD/SILVER/BRONZE/NEWCOMER)
|
|
14
|
+
* - Job completion stats
|
|
15
|
+
* - Active status
|
|
16
|
+
*/
|
|
17
|
+
export declare const ghostScoreProvider: Provider;
|
|
18
|
+
export default ghostScoreProvider;
|
|
19
|
+
//# sourceMappingURL=ghost-score.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghost-score.d.ts","sourceRoot":"","sources":["../../../src/providers/ghost-score.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAgD,MAAM,eAAe,CAAC;AAgB5F;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAgIhC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GhostSpeakService - Core SDK Wrapper Service for ElizaOS
|
|
3
|
+
*
|
|
4
|
+
* Provides a singleton service that manages the GhostSpeak SDK client lifecycle,
|
|
5
|
+
* caches agent data, and exposes module accessors for blockchain operations.
|
|
6
|
+
*/
|
|
7
|
+
import { Service } from '@elizaos/core';
|
|
8
|
+
import type { IAgentRuntime } from '@elizaos/core';
|
|
9
|
+
import { GhostSpeakClient } from '@ghostspeak/sdk';
|
|
10
|
+
import type { Address } from '@solana/addresses';
|
|
11
|
+
import type { KeyPairSigner } from '@solana/signers';
|
|
12
|
+
/**
|
|
13
|
+
* Agent account data from blockchain
|
|
14
|
+
* Matches the generated Agent type from @ghostspeak/sdk
|
|
15
|
+
*/
|
|
16
|
+
interface AgentAccount {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
agentType: number;
|
|
20
|
+
isActive: boolean;
|
|
21
|
+
reputationScore: number;
|
|
22
|
+
totalJobsCompleted: number;
|
|
23
|
+
totalEarnings: bigint;
|
|
24
|
+
x402Enabled: boolean;
|
|
25
|
+
x402TotalCalls: bigint;
|
|
26
|
+
x402TotalPayments: bigint;
|
|
27
|
+
createdAt: bigint;
|
|
28
|
+
metadataUri: string;
|
|
29
|
+
ghostScore: bigint;
|
|
30
|
+
capabilities: string[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* GhostSpeak Service
|
|
34
|
+
*
|
|
35
|
+
* Core service for ElizaOS plugin that wraps the GhostSpeak SDK.
|
|
36
|
+
* Provides:
|
|
37
|
+
* - Singleton client management
|
|
38
|
+
* - Lazy signer initialization
|
|
39
|
+
* - Agent data caching (60s TTL)
|
|
40
|
+
* - Module accessors for all SDK operations
|
|
41
|
+
*/
|
|
42
|
+
export declare class GhostSpeakService extends Service {
|
|
43
|
+
protected runtime: IAgentRuntime;
|
|
44
|
+
static serviceType: string;
|
|
45
|
+
capabilityDescription: string;
|
|
46
|
+
private client;
|
|
47
|
+
private signer;
|
|
48
|
+
private agentCache;
|
|
49
|
+
constructor(runtime: IAgentRuntime);
|
|
50
|
+
/**
|
|
51
|
+
* Start the service and initialize the SDK client
|
|
52
|
+
*/
|
|
53
|
+
static start(runtime: IAgentRuntime): Promise<GhostSpeakService>;
|
|
54
|
+
/**
|
|
55
|
+
* Stop the service and cleanup
|
|
56
|
+
*/
|
|
57
|
+
stop(): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Initialize the SDK client
|
|
60
|
+
*/
|
|
61
|
+
private initialize;
|
|
62
|
+
/**
|
|
63
|
+
* Get the SDK client (throws if not initialized)
|
|
64
|
+
*/
|
|
65
|
+
getClient(): GhostSpeakClient;
|
|
66
|
+
/**
|
|
67
|
+
* Get or create the signer for signing transactions
|
|
68
|
+
* Lazy loads the signer on first call
|
|
69
|
+
*/
|
|
70
|
+
getSigner(): Promise<KeyPairSigner>;
|
|
71
|
+
/**
|
|
72
|
+
* Check if a wallet/signer is configured
|
|
73
|
+
*/
|
|
74
|
+
hasSigner(): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Get signer address without throwing (returns null if not configured)
|
|
77
|
+
*/
|
|
78
|
+
getSignerAddress(): Address | null;
|
|
79
|
+
/**
|
|
80
|
+
* Get agent account with caching (60s TTL)
|
|
81
|
+
*/
|
|
82
|
+
getAgent(agentAddress: Address): Promise<AgentAccount | null>;
|
|
83
|
+
/**
|
|
84
|
+
* Invalidate cached agent data
|
|
85
|
+
*/
|
|
86
|
+
invalidateAgentCache(agentAddress: Address): void;
|
|
87
|
+
/**
|
|
88
|
+
* Clear all cached data
|
|
89
|
+
*/
|
|
90
|
+
clearCache(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Agent operations (registration, queries)
|
|
93
|
+
*/
|
|
94
|
+
get agents(): import("@ghostspeak/sdk").AgentModule;
|
|
95
|
+
/**
|
|
96
|
+
* Ghost operations (external agent claiming)
|
|
97
|
+
*/
|
|
98
|
+
get ghosts(): import("@ghostspeak/sdk").GhostModule;
|
|
99
|
+
/**
|
|
100
|
+
* Credential operations (W3C Verifiable Credentials)
|
|
101
|
+
*/
|
|
102
|
+
credentials(): import("@ghostspeak/sdk").UnifiedCredentialService;
|
|
103
|
+
/**
|
|
104
|
+
* DID operations (Decentralized Identifiers)
|
|
105
|
+
*/
|
|
106
|
+
did(): import("@ghostspeak/sdk").DidModule;
|
|
107
|
+
/**
|
|
108
|
+
* Reputation operations (Ghost Score calculation)
|
|
109
|
+
*/
|
|
110
|
+
reputation(): import("@ghostspeak/sdk").ReputationModule;
|
|
111
|
+
/**
|
|
112
|
+
* Privacy operations (visibility controls)
|
|
113
|
+
*/
|
|
114
|
+
privacy(): import("@ghostspeak/sdk").PrivacyModule;
|
|
115
|
+
/**
|
|
116
|
+
* Staking operations (GHOST token staking)
|
|
117
|
+
* Returns StakingModule from the SDK
|
|
118
|
+
*/
|
|
119
|
+
staking(): unknown;
|
|
120
|
+
/**
|
|
121
|
+
* PayAI operations (x402 payments)
|
|
122
|
+
*/
|
|
123
|
+
payai(): any;
|
|
124
|
+
/**
|
|
125
|
+
* Authorization operations (trustless pre-authorization)
|
|
126
|
+
* Returns AuthorizationModule from the SDK
|
|
127
|
+
*/
|
|
128
|
+
authorization(): unknown;
|
|
129
|
+
/**
|
|
130
|
+
* Get the current cluster/network
|
|
131
|
+
*/
|
|
132
|
+
getCluster(): string;
|
|
133
|
+
/**
|
|
134
|
+
* Check if running on mainnet
|
|
135
|
+
*/
|
|
136
|
+
isMainnet(): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Get service stats for monitoring
|
|
139
|
+
*/
|
|
140
|
+
getStats(): {
|
|
141
|
+
cacheSize: number;
|
|
142
|
+
hasSigner: boolean;
|
|
143
|
+
cluster: string;
|
|
144
|
+
isMainnet: boolean;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
export default GhostSpeakService;
|
|
148
|
+
//# sourceMappingURL=GhostSpeakService.d.ts.map
|
|
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