duskware 0.1.0

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.
Files changed (70) hide show
  1. package/README.md +150 -0
  2. package/dist/commands/credits.d.ts +7 -0
  3. package/dist/commands/credits.d.ts.map +1 -0
  4. package/dist/commands/credits.js +220 -0
  5. package/dist/commands/credits.js.map +1 -0
  6. package/dist/commands/inference.d.ts +7 -0
  7. package/dist/commands/inference.d.ts.map +1 -0
  8. package/dist/commands/inference.js +148 -0
  9. package/dist/commands/inference.js.map +1 -0
  10. package/dist/commands/init.d.ts +7 -0
  11. package/dist/commands/init.d.ts.map +1 -0
  12. package/dist/commands/init.js +158 -0
  13. package/dist/commands/init.js.map +1 -0
  14. package/dist/commands/memory.d.ts +7 -0
  15. package/dist/commands/memory.d.ts.map +1 -0
  16. package/dist/commands/memory.js +170 -0
  17. package/dist/commands/memory.js.map +1 -0
  18. package/dist/commands/sandbox.d.ts +7 -0
  19. package/dist/commands/sandbox.d.ts.map +1 -0
  20. package/dist/commands/sandbox.js +220 -0
  21. package/dist/commands/sandbox.js.map +1 -0
  22. package/dist/commands/skill.d.ts +7 -0
  23. package/dist/commands/skill.d.ts.map +1 -0
  24. package/dist/commands/skill.js +255 -0
  25. package/dist/commands/skill.js.map +1 -0
  26. package/dist/commands/spawn.d.ts +7 -0
  27. package/dist/commands/spawn.d.ts.map +1 -0
  28. package/dist/commands/spawn.js +225 -0
  29. package/dist/commands/spawn.js.map +1 -0
  30. package/dist/commands/specter.d.ts +7 -0
  31. package/dist/commands/specter.d.ts.map +1 -0
  32. package/dist/commands/specter.js +287 -0
  33. package/dist/commands/specter.js.map +1 -0
  34. package/dist/commands/status.d.ts +7 -0
  35. package/dist/commands/status.d.ts.map +1 -0
  36. package/dist/commands/status.js +106 -0
  37. package/dist/commands/status.js.map +1 -0
  38. package/dist/commands/trust.d.ts +7 -0
  39. package/dist/commands/trust.d.ts.map +1 -0
  40. package/dist/commands/trust.js +230 -0
  41. package/dist/commands/trust.js.map +1 -0
  42. package/dist/index.d.ts +9 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +61 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/services/contracts.d.ts +40 -0
  47. package/dist/services/contracts.d.ts.map +1 -0
  48. package/dist/services/contracts.js +141 -0
  49. package/dist/services/contracts.js.map +1 -0
  50. package/dist/services/inference.d.ts +63 -0
  51. package/dist/services/inference.d.ts.map +1 -0
  52. package/dist/services/inference.js +118 -0
  53. package/dist/services/inference.js.map +1 -0
  54. package/dist/services/wallet.d.ts +35 -0
  55. package/dist/services/wallet.d.ts.map +1 -0
  56. package/dist/services/wallet.js +60 -0
  57. package/dist/services/wallet.js.map +1 -0
  58. package/dist/services/x402.d.ts +30 -0
  59. package/dist/services/x402.d.ts.map +1 -0
  60. package/dist/services/x402.js +92 -0
  61. package/dist/services/x402.js.map +1 -0
  62. package/dist/utils/config.d.ts +64 -0
  63. package/dist/utils/config.d.ts.map +1 -0
  64. package/dist/utils/config.js +93 -0
  65. package/dist/utils/config.js.map +1 -0
  66. package/dist/utils/output.d.ts +29 -0
  67. package/dist/utils/output.d.ts.map +1 -0
  68. package/dist/utils/output.js +100 -0
  69. package/dist/utils/output.js.map +1 -0
  70. package/package.json +48 -0
@@ -0,0 +1,158 @@
1
+ /**
2
+ * duskware init
3
+ * Deploys new AgentIdentity contract on Base for this agent
4
+ */
5
+ import { Command } from 'commander';
6
+ import inquirer from 'inquirer';
7
+ import ora from 'ora';
8
+ import { Wallet, JsonRpcProvider, Interface, AbiCoder } from 'ethers';
9
+ import * as output from '../utils/output.js';
10
+ import { configExists, saveConfig, getContractAddresses, getRpcUrl, } from '../utils/config.js';
11
+ import { createWallet, persistWallet } from '../services/wallet.js';
12
+ // Minimal ERC1967 Proxy ABI
13
+ const ERC1967_PROXY_ABI = [
14
+ 'constructor(address implementation, bytes memory _data)',
15
+ ];
16
+ // Minimal ERC1967Proxy bytecode (compiled with solc 0.8.20, optimized)
17
+ // Stores implementation at ERC1967 slot and delegatecalls initialize
18
+ const ERC1967_PROXY_BYTECODE = '0x608060405234801561000f575f80fd5b5060405161026638038061026683398101604081905261002e916100fb565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8290558051156100be575f826001600160a01b03168260405161007291906101c3565b5f60405180830381855af49150503d805f81146100aa576040519150601f19603f3d011682016040523d82523d5f602084013e6100af565b606091505b50509050806100bc575f80fd5b505b50506101de565b634e487b7160e01b5f52604160045260245ffd5b5f5b838110156100f35781810151838201526020016100db565b50505f910152565b5f806040838503121561010c575f80fd5b82516001600160a01b0381168114610122575f80fd5b60208401519092506001600160401b038082111561013e575f80fd5b818501915085601f830112610151575f80fd5b815181811115610163576101636100c5565b604051601f8201601f19908116603f0116810190838211818310171561018b5761018b6100c5565b816040528281528860208487010111156101a3575f80fd5b6101b48360208301602088016100d9565b80955050505050509250929050565b5f82516101d48184602087016100d9565b9190910192915050565b607c806101ea5f395ff3fe60806040527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545f3681823780813683855af491503d81823e8180156042573d82f35b3d82fdfea2646970667358221220d86db7f9a1e5c872b564a52fc1430a9b3b3c90eb0c6a3e1e39de01b0939feb5a64736f6c63430008140033';
19
+ // AgentIdentity ABI for initialization
20
+ const AGENT_IDENTITY_ABI = [
21
+ 'function initialize(string memory _agentName, address _owner, address _feeController, address _parentAgent) external',
22
+ 'function agentName() view returns (string)',
23
+ 'function reputationScore() view returns (uint256)',
24
+ 'function owner() view returns (address)',
25
+ ];
26
+ export const initCommand = new Command('init')
27
+ .description('Deploy a new AgentIdentity contract on Base')
28
+ .option('-n, --network <network>', 'Network to deploy on', 'sepolia')
29
+ .option('--name <name>', 'Agent name')
30
+ .option('--import-key <key>', 'Import existing private key instead of generating new')
31
+ .action(async (options) => {
32
+ output.banner();
33
+ // Check if already initialized
34
+ if (configExists()) {
35
+ output.warning('Agent already initialized!');
36
+ output.info('Run `duskware status` to see your agent.');
37
+ output.info('Delete ~/.duskware to reinitialize.');
38
+ return;
39
+ }
40
+ const network = options.network;
41
+ const rpcUrl = getRpcUrl(network);
42
+ const addresses = getContractAddresses(network);
43
+ // Interactive prompts if not provided
44
+ const answers = await inquirer.prompt([
45
+ {
46
+ type: 'input',
47
+ name: 'name',
48
+ message: 'Agent name:',
49
+ default: 'MyAgent',
50
+ when: !options.name,
51
+ },
52
+ ]);
53
+ const agentName = options.name || answers.name;
54
+ output.header('Creating Agent Wallet');
55
+ // Create or import wallet
56
+ let wallet;
57
+ let address;
58
+ let privateKey;
59
+ if (options.importKey) {
60
+ privateKey = options.importKey.startsWith('0x') ? options.importKey : `0x${options.importKey}`;
61
+ wallet = new Wallet(privateKey);
62
+ address = wallet.address;
63
+ output.success('Wallet imported');
64
+ }
65
+ else {
66
+ const created = createWallet();
67
+ wallet = created.wallet;
68
+ address = created.address;
69
+ privateKey = created.privateKey;
70
+ output.success('Wallet created');
71
+ }
72
+ output.keyValue('Address', output.address(address));
73
+ // Connect to network
74
+ const provider = new JsonRpcProvider(rpcUrl);
75
+ const connectedWallet = wallet.connect(provider);
76
+ // Check ETH balance for gas
77
+ const ethBalance = await provider.getBalance(address);
78
+ output.keyValue('ETH Balance', `${Number(ethBalance) / 1e18} ETH`);
79
+ if (ethBalance === 0n) {
80
+ output.warning('Wallet has no ETH for gas!');
81
+ output.info(`Send ETH to ${address} before deploying.`);
82
+ output.info(`For Sepolia, use a faucet: https://www.alchemy.com/faucets/base-sepolia`);
83
+ // Save wallet so user can fund it
84
+ persistWallet(address, privateKey);
85
+ output.info('Wallet saved to ~/.duskware/wallet.json');
86
+ output.info('Run `duskware init` again after funding.');
87
+ return;
88
+ }
89
+ output.header('Deploying AgentIdentity Contract');
90
+ const spinner = ora('Deploying proxy contract...').start();
91
+ try {
92
+ // Get the implementation address from deployed contracts
93
+ const implementationAddress = addresses.agentIdentity;
94
+ // Encode the initialize function call for the proxy
95
+ const agentIdentityInterface = new Interface(AGENT_IDENTITY_ABI);
96
+ const initData = agentIdentityInterface.encodeFunctionData('initialize', [
97
+ agentName,
98
+ address, // owner = agent wallet
99
+ addresses.feeController,
100
+ '0x0000000000000000000000000000000000000000', // no parent for genesis
101
+ ]);
102
+ spinner.text = 'Deploying ERC1967 proxy...';
103
+ // Encode constructor arguments: (address implementation, bytes data)
104
+ const abiCoder = new AbiCoder();
105
+ const constructorArgs = abiCoder.encode(['address', 'bytes'], [implementationAddress, initData]);
106
+ // Full deployment bytecode = proxy bytecode + constructor args
107
+ const deployBytecode = ERC1967_PROXY_BYTECODE + constructorArgs.slice(2);
108
+ // Deploy proxy contract
109
+ const deployTx = await connectedWallet.sendTransaction({
110
+ data: deployBytecode,
111
+ });
112
+ spinner.text = `Waiting for confirmation (tx: ${deployTx.hash.slice(0, 10)}...)`;
113
+ const receipt = await deployTx.wait();
114
+ if (!receipt || !receipt.contractAddress) {
115
+ throw new Error('Deployment failed - no contract address returned');
116
+ }
117
+ const agentAddress = receipt.contractAddress;
118
+ spinner.succeed('Agent identity deployed');
119
+ output.keyValue('Agent Address', output.address(agentAddress));
120
+ output.keyValue('Transaction', deployTx.hash);
121
+ output.keyValue('Network', network === 'sepolia' ? 'Base Sepolia' : 'Base Mainnet');
122
+ const basescanUrl = network === 'sepolia'
123
+ ? `https://sepolia.basescan.org/address/${agentAddress}`
124
+ : `https://basescan.org/address/${agentAddress}`;
125
+ output.keyValue('Basescan', basescanUrl);
126
+ // Save configuration
127
+ const config = {
128
+ network,
129
+ agentAddress,
130
+ agentName,
131
+ rpcUrl,
132
+ memoryPointer: '',
133
+ createdAt: Date.now(),
134
+ };
135
+ saveConfig(config);
136
+ persistWallet(address, privateKey);
137
+ output.header('Agent Initialized');
138
+ output.keyValue('Name', agentName);
139
+ output.keyValue('Wallet', address);
140
+ output.keyValue('Config', '~/.duskware/config.json');
141
+ output.keyValue('Private Key', '~/.duskware/wallet.json (chmod 600)');
142
+ console.log();
143
+ output.success('Your agent is ready!');
144
+ console.log();
145
+ output.info('Next steps:');
146
+ output.info(' duskware status - View agent status');
147
+ output.info(' duskware skill list - Browse skills');
148
+ output.info(' duskware memory sync - Initialize memory');
149
+ }
150
+ catch (err) {
151
+ spinner.fail('Deployment failed');
152
+ if (err instanceof Error) {
153
+ output.error(err.message);
154
+ }
155
+ process.exit(1);
156
+ }
157
+ });
158
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,eAAe,EAAmB,SAAS,EAAgB,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACrG,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,SAAS,GAEV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEpE,4BAA4B;AAC5B,MAAM,iBAAiB,GAAG;IACxB,yDAAyD;CAC1D,CAAC;AAEF,uEAAuE;AACvE,qEAAqE;AACrE,MAAM,sBAAsB,GAAG,gtCAAgtC,CAAC;AAEhvC,uCAAuC;AACvC,MAAM,kBAAkB,GAAG;IACzB,sHAAsH;IACtH,4CAA4C;IAC5C,mDAAmD;IACnD,yCAAyC;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KAC3C,WAAW,CAAC,6CAA6C,CAAC;KAC1D,MAAM,CAAC,yBAAyB,EAAE,sBAAsB,EAAE,SAAS,CAAC;KACpE,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC;KACrC,MAAM,CAAC,oBAAoB,EAAE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,CAAC;QACzD,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QACrD,MAAM,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;IAE5D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAClC,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * duskware memory
3
+ * Memory operations: sync, read
4
+ */
5
+ import { Command } from 'commander';
6
+ export declare const memoryCommand: Command;
7
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/commands/memory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,aAAa,SACS,CAAC"}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * duskware memory
3
+ * Memory operations: sync, read
4
+ */
5
+ import { Command } from 'commander';
6
+ import ora from 'ora';
7
+ import { JsonRpcProvider, Contract, Wallet } from 'ethers';
8
+ import * as output from '../utils/output.js';
9
+ import { loadConfig, loadWallet, getRpcUrl, saveConfig } from '../utils/config.js';
10
+ import { AGENT_IDENTITY_ABI, waitForTx } from '../services/contracts.js';
11
+ // Note: In production, we'd import from @duskware/memory
12
+ // For now, we implement basic memory operations inline
13
+ export const memoryCommand = new Command('memory')
14
+ .description('Memory operations');
15
+ // Sync memory to IPFS and onchain
16
+ memoryCommand
17
+ .command('sync')
18
+ .description('Sync local memory to IPFS and update onchain pointer')
19
+ .action(async () => {
20
+ const config = loadConfig();
21
+ const walletConfig = loadWallet();
22
+ if (!config || !walletConfig) {
23
+ output.error('Agent not initialized. Run `duskware init` first.');
24
+ process.exit(1);
25
+ }
26
+ output.header('Sync Memory');
27
+ try {
28
+ // In production, this would:
29
+ // 1. Read local memory state from ~/.duskware/memory/
30
+ // 2. Encrypt with agent's key
31
+ // 3. Pin to IPFS via Pinata
32
+ // 4. Update onchain pointer
33
+ const spinner = ora('Preparing memory...').start();
34
+ // Create initial memory structure
35
+ const memory = {
36
+ version: 1,
37
+ createdAt: Date.now(),
38
+ updatedAt: Date.now(),
39
+ identity: {
40
+ agentAddress: config.agentAddress,
41
+ name: config.agentName,
42
+ capabilities: [],
43
+ },
44
+ workingMemory: [],
45
+ longTermKnowledge: {
46
+ domainFacts: {},
47
+ learnedPatterns: {},
48
+ lastUpdated: Date.now(),
49
+ },
50
+ episodicHistory: [],
51
+ skillExecutionLog: [],
52
+ trustRelationships: {
53
+ attestedAgents: [],
54
+ receivedAttestations: [],
55
+ },
56
+ };
57
+ spinner.text = 'Encrypting memory...';
58
+ // In production: const encrypted = await encryptMemory(memory, wallet);
59
+ spinner.text = 'Pinning to IPFS...';
60
+ // In production: const cid = await pinata.pinMemory(encrypted, walletConfig.address);
61
+ // Placeholder CID for demo
62
+ const cid = `Qm${Date.now().toString(16)}...placeholder`;
63
+ spinner.text = 'Updating onchain pointer...';
64
+ const provider = new JsonRpcProvider(getRpcUrl(config.network));
65
+ const wallet = new Wallet(walletConfig.privateKey, provider);
66
+ // Update memory root onchain (if contract is deployed)
67
+ try {
68
+ const agent = new Contract(config.agentAddress, AGENT_IDENTITY_ABI, wallet);
69
+ const tx = await agent.updateMemoryRoot(cid);
70
+ const receipt = await waitForTx(tx);
71
+ spinner.succeed('Memory synced');
72
+ output.keyValue('CID', cid);
73
+ output.keyValue('Version', '1');
74
+ output.keyValue('Transaction', output.txHash(receipt.hash));
75
+ output.keyValue('Basescan', output.basescanLink(receipt.hash, config.network));
76
+ // Update local config
77
+ config.memoryPointer = cid;
78
+ saveConfig(config);
79
+ }
80
+ catch (contractErr) {
81
+ // Contract might not be deployed yet
82
+ spinner.succeed('Memory prepared (contract not yet deployed)');
83
+ output.keyValue('CID', cid);
84
+ output.warning('Could not update onchain pointer. Contract may not be deployed.');
85
+ // Still save locally
86
+ config.memoryPointer = cid;
87
+ saveConfig(config);
88
+ }
89
+ }
90
+ catch (err) {
91
+ if (err instanceof Error) {
92
+ output.error(`Failed to sync memory: ${err.message}`);
93
+ }
94
+ process.exit(1);
95
+ }
96
+ });
97
+ // Read memory
98
+ memoryCommand
99
+ .command('read')
100
+ .description('Read and display agent memory')
101
+ .action(async () => {
102
+ const config = loadConfig();
103
+ const walletConfig = loadWallet();
104
+ if (!config || !walletConfig) {
105
+ output.error('Agent not initialized. Run `duskware init` first.');
106
+ process.exit(1);
107
+ }
108
+ output.header('Agent Memory');
109
+ try {
110
+ const provider = new JsonRpcProvider(getRpcUrl(config.network));
111
+ // Get memory pointer from chain
112
+ let memoryRoot = config.memoryPointer;
113
+ let memoryVersion = 0n;
114
+ try {
115
+ const agent = new Contract(config.agentAddress, AGENT_IDENTITY_ABI, provider);
116
+ memoryRoot = await agent.memoryRoot();
117
+ memoryVersion = await agent.memoryVersion();
118
+ }
119
+ catch {
120
+ // Contract might not be deployed
121
+ }
122
+ if (!memoryRoot) {
123
+ output.info('No memory found.');
124
+ output.info('Run `duskware memory sync` to initialize memory.');
125
+ return;
126
+ }
127
+ output.keyValue('CID', memoryRoot);
128
+ output.keyValue('Version', memoryVersion.toString());
129
+ // In production, we'd fetch from IPFS and decrypt:
130
+ // const encrypted = await pinata.getMemory(memoryRoot);
131
+ // const memory = await decryptMemory(encrypted, wallet);
132
+ output.info('Memory decryption not implemented in CLI demo.');
133
+ output.info('Use the SDK for full memory access.');
134
+ }
135
+ catch (err) {
136
+ if (err instanceof Error) {
137
+ output.error(`Failed to read memory: ${err.message}`);
138
+ }
139
+ process.exit(1);
140
+ }
141
+ });
142
+ // Get memory version
143
+ memoryCommand
144
+ .command('version')
145
+ .description('Get current memory version')
146
+ .action(async () => {
147
+ const config = loadConfig();
148
+ if (!config) {
149
+ output.error('Agent not initialized. Run `duskware init` first.');
150
+ process.exit(1);
151
+ }
152
+ try {
153
+ const provider = new JsonRpcProvider(getRpcUrl(config.network));
154
+ const agent = new Contract(config.agentAddress, AGENT_IDENTITY_ABI, provider);
155
+ const version = await agent.memoryVersion();
156
+ const updatedAt = await agent.memoryUpdatedAt();
157
+ const root = await agent.memoryRoot();
158
+ output.header('Memory Version');
159
+ output.keyValue('Version', version.toString());
160
+ output.keyValue('Updated', new Date(Number(updatedAt) * 1000).toISOString());
161
+ output.keyValue('CID', root || '(not set)');
162
+ }
163
+ catch (err) {
164
+ if (err instanceof Error) {
165
+ output.error(`Failed to get version: ${err.message}`);
166
+ }
167
+ process.exit(1);
168
+ }
169
+ });
170
+ //# sourceMappingURL=memory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/commands/memory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAwB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEzE,yDAAyD;AACzD,uDAAuD;AAEvD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,mBAAmB,CAAC,CAAC;AAEpC,kCAAkC;AAClC,aAAa;KACV,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,sDAAsD,CAAC;KACnE,MAAM,CAA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,CAAC,YAAY,EAAE,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAE9E,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,aAAa,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,eAAe,EAAE,CAAC;QAChD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC;QAEtC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAChC,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC/C,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAC7E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,IAAI,WAAW,CAAC,CAAC;IAE9C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,KAAK,CAAC,0BAA0B,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * duskware sandbox
3
+ * Manage E2B sandboxes for autonomous agents
4
+ */
5
+ import { Command } from 'commander';
6
+ export declare const sandboxCommand: Command;
7
+ //# sourceMappingURL=sandbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/commands/sandbox.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkCpC,eAAO,MAAM,cAAc,SACiC,CAAC"}
@@ -0,0 +1,220 @@
1
+ /**
2
+ * duskware sandbox
3
+ * Manage E2B sandboxes for autonomous agents
4
+ */
5
+ import { Command } from 'commander';
6
+ import ora from 'ora';
7
+ import * as output from '../utils/output.js';
8
+ import { loadConfig } from '../utils/config.js';
9
+ // Credits API URL
10
+ const CREDITS_API = process.env.CREDITS_API || 'https://duskware-credits-api.fly.dev';
11
+ const TIERS = {
12
+ starter: { name: 'Starter', vcpu: 1, memoryMB: 512, diskGB: 5, monthlyUsdc: '$5.00' },
13
+ medium: { name: 'Medium', vcpu: 2, memoryMB: 2048, diskGB: 20, monthlyUsdc: '$10.00' },
14
+ power: { name: 'Power', vcpu: 4, memoryMB: 8192, diskGB: 50, monthlyUsdc: '$25.00' },
15
+ pro: { name: 'Pro', vcpu: 8, memoryMB: 16384, diskGB: 100, monthlyUsdc: '$50.00' },
16
+ };
17
+ export const sandboxCommand = new Command('sandbox')
18
+ .description('Manage E2B sandboxes for autonomous agents');
19
+ // List sandboxes
20
+ sandboxCommand
21
+ .command('list')
22
+ .description('List your sandboxes')
23
+ .action(async () => {
24
+ const config = loadConfig();
25
+ if (!config) {
26
+ output.error('Agent not initialized. Run `duskware init` first.');
27
+ process.exit(1);
28
+ }
29
+ output.header('Your Sandboxes');
30
+ const spinner = ora('Fetching sandboxes...').start();
31
+ try {
32
+ const response = await fetch(`${CREDITS_API}/sandboxes/${config.agentAddress}`);
33
+ if (!response.ok) {
34
+ throw new Error('Failed to fetch sandboxes');
35
+ }
36
+ const data = await response.json();
37
+ spinner.stop();
38
+ if (data.sandboxes.length === 0) {
39
+ output.info('No sandboxes found. Create one with: duskware sandbox create');
40
+ return;
41
+ }
42
+ output.printTable(['ID', 'Name', 'Tier', 'Status', 'Expires'], data.sandboxes.map(s => [
43
+ s.id.slice(0, 8),
44
+ s.name,
45
+ s.tier,
46
+ s.status,
47
+ new Date(s.expiresAt).toLocaleDateString(),
48
+ ]));
49
+ }
50
+ catch (err) {
51
+ spinner.fail('Failed to fetch sandboxes');
52
+ if (err instanceof Error) {
53
+ output.error(err.message);
54
+ }
55
+ process.exit(1);
56
+ }
57
+ });
58
+ // Create sandbox
59
+ sandboxCommand
60
+ .command('create <name>')
61
+ .description('Create a new sandbox')
62
+ .option('-t, --tier <tier>', 'Sandbox tier (starter|medium|power|pro)', 'starter')
63
+ .action(async (name, options) => {
64
+ const config = loadConfig();
65
+ if (!config) {
66
+ output.error('Agent not initialized. Run `duskware init` first.');
67
+ process.exit(1);
68
+ }
69
+ const tier = options.tier.toLowerCase();
70
+ if (!TIERS[tier]) {
71
+ output.error(`Invalid tier. Choose: ${Object.keys(TIERS).join(', ')}`);
72
+ process.exit(1);
73
+ }
74
+ const tierInfo = TIERS[tier];
75
+ output.header('Create Sandbox');
76
+ output.keyValue('Name', name);
77
+ output.keyValue('Tier', `${tierInfo.name} (${tierInfo.vcpu} vCPU, ${tierInfo.memoryMB}MB RAM, ${tierInfo.diskGB}GB disk)`);
78
+ output.keyValue('Price', `${tierInfo.monthlyUsdc}/month`);
79
+ output.keyValue('Address', config.agentAddress);
80
+ const spinner = ora('Creating sandbox via E2B...').start();
81
+ try {
82
+ const response = await fetch(`${CREDITS_API}/sandboxes`, {
83
+ method: 'POST',
84
+ headers: { 'Content-Type': 'application/json' },
85
+ body: JSON.stringify({
86
+ address: config.agentAddress,
87
+ name,
88
+ tier,
89
+ }),
90
+ });
91
+ if (!response.ok) {
92
+ const data = await response.json();
93
+ throw new Error(data.error || 'Failed to create sandbox');
94
+ }
95
+ const sandbox = await response.json();
96
+ spinner.succeed('Sandbox created!');
97
+ console.log();
98
+ output.keyValue('Sandbox ID', sandbox.id);
99
+ output.keyValue('Status', sandbox.status);
100
+ output.keyValue('Expires', new Date(sandbox.expiresAt).toLocaleString());
101
+ console.log();
102
+ output.info('Sandbox is provisioning. Run `duskware sandbox list` to check status.');
103
+ }
104
+ catch (err) {
105
+ spinner.fail('Failed to create sandbox');
106
+ if (err instanceof Error) {
107
+ output.error(err.message);
108
+ }
109
+ process.exit(1);
110
+ }
111
+ });
112
+ // Execute command in sandbox
113
+ sandboxCommand
114
+ .command('exec <sandboxId> <command...>')
115
+ .description('Execute a command in a sandbox')
116
+ .action(async (sandboxId, command) => {
117
+ output.header('Execute Command');
118
+ output.keyValue('Sandbox', sandboxId);
119
+ output.keyValue('Command', command.join(' '));
120
+ const spinner = ora('Executing...').start();
121
+ try {
122
+ const response = await fetch(`${CREDITS_API}/sandboxes/${sandboxId}/exec`, {
123
+ method: 'POST',
124
+ headers: { 'Content-Type': 'application/json' },
125
+ body: JSON.stringify({ command: command.join(' ') }),
126
+ });
127
+ if (!response.ok) {
128
+ const data = await response.json();
129
+ throw new Error(data.error || 'Failed to execute command');
130
+ }
131
+ const result = await response.json();
132
+ spinner.stop();
133
+ console.log();
134
+ if (result.stdout) {
135
+ output.header('stdout');
136
+ console.log(result.stdout);
137
+ }
138
+ if (result.stderr) {
139
+ output.header('stderr');
140
+ console.log(result.stderr);
141
+ }
142
+ output.keyValue('Exit Code', result.exitCode.toString());
143
+ }
144
+ catch (err) {
145
+ spinner.fail('Command failed');
146
+ if (err instanceof Error) {
147
+ output.error(err.message);
148
+ }
149
+ process.exit(1);
150
+ }
151
+ });
152
+ // Stop sandbox (sleep)
153
+ sandboxCommand
154
+ .command('stop <sandboxId>')
155
+ .description('Stop a sandbox (preserves state)')
156
+ .action(async (sandboxId) => {
157
+ const spinner = ora('Stopping sandbox...').start();
158
+ try {
159
+ const response = await fetch(`${CREDITS_API}/sandboxes/${sandboxId}`, {
160
+ method: 'PATCH',
161
+ headers: { 'Content-Type': 'application/json' },
162
+ body: JSON.stringify({ status: 'sleeping' }),
163
+ });
164
+ if (!response.ok) {
165
+ throw new Error('Failed to stop sandbox');
166
+ }
167
+ spinner.succeed('Sandbox stopped (sleeping)');
168
+ output.info('State preserved. Start again with: duskware sandbox start');
169
+ }
170
+ catch (err) {
171
+ spinner.fail('Failed to stop sandbox');
172
+ if (err instanceof Error) {
173
+ output.error(err.message);
174
+ }
175
+ process.exit(1);
176
+ }
177
+ });
178
+ // Delete sandbox
179
+ sandboxCommand
180
+ .command('delete <sandboxId>')
181
+ .description('Permanently delete a sandbox')
182
+ .action(async (sandboxId) => {
183
+ output.warning('This will permanently delete the sandbox and all data.');
184
+ const spinner = ora('Terminating sandbox...').start();
185
+ try {
186
+ const response = await fetch(`${CREDITS_API}/sandboxes/${sandboxId}`, {
187
+ method: 'PATCH',
188
+ headers: { 'Content-Type': 'application/json' },
189
+ body: JSON.stringify({ status: 'terminated' }),
190
+ });
191
+ if (!response.ok) {
192
+ throw new Error('Failed to delete sandbox');
193
+ }
194
+ spinner.succeed('Sandbox terminated');
195
+ }
196
+ catch (err) {
197
+ spinner.fail('Failed to delete sandbox');
198
+ if (err instanceof Error) {
199
+ output.error(err.message);
200
+ }
201
+ process.exit(1);
202
+ }
203
+ });
204
+ // Show tiers
205
+ sandboxCommand
206
+ .command('tiers')
207
+ .description('List available sandbox tiers')
208
+ .action(() => {
209
+ output.header('Sandbox Tiers');
210
+ output.printTable(['Tier', 'vCPU', 'Memory', 'Disk', 'Price/Month'], Object.entries(TIERS).map(([id, t]) => [
211
+ `${t.name} (${id})`,
212
+ t.vcpu.toString(),
213
+ `${t.memoryMB}MB`,
214
+ `${t.diskGB}GB`,
215
+ t.monthlyUsdc,
216
+ ]));
217
+ console.log();
218
+ output.info('Create with: duskware sandbox create <name> --tier <tier>');
219
+ });
220
+ //# sourceMappingURL=sandbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../src/commands/sandbox.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAc,MAAM,oBAAoB,CAAC;AAE5D,kBAAkB;AAClB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,sCAAsC,CAAC;A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C;AAEL,aAAa;AACb,cAAc;KACX,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,8BAA8B,CAAC;KAC3C,MAAM,CAAC,GAAG,EAAE;IACX,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IAE/B,MAAM,CAAC,UAAU,CACf,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;QACrC,GAAG,CAAC,CAAC,IAAI,KAAK,EAAE,GAAG;QACnB,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE;QACjB,GAAG,CAAC,CAAC,QAAQ,IAAI;QACjB,GAAG,CAAC,CAAC,MAAM,IAAI;QACf,CAAC,CAAC,WAAW;KACd,CAAC,CACH,CAAC;IAEF,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,MAAM,CAAC,IAAI,CAAC,2DAA2D,CAAC,CAAC;AAC3E,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * duskware skill
3
+ * Skill marketplace operations: mint, list, buy
4
+ */
5
+ import { Command } from 'commander';
6
+ export declare const skillCommand: Command;
7
+ //# sourceMappingURL=skill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/commands/skill.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,YAAY,SACqB,CAAC"}