50c 2.0.0 → 2.0.2

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/lib/config.js CHANGED
@@ -101,7 +101,7 @@ function loadConfigLocal() {
101
101
  }
102
102
 
103
103
  async function loadConfigCloud() {
104
- const apiKey = process.env.FIFTY_CENT_API_KEY;
104
+ const apiKey = process.env.FIFTY_CENT_API_KEY || process.env.FIFTYC_API_KEY;
105
105
  if (!apiKey) return { ...DEFAULT_CONFIG };
106
106
 
107
107
  try {
@@ -128,7 +128,7 @@ function saveConfigLocal(config) {
128
128
  }
129
129
 
130
130
  async function saveConfigCloud(config) {
131
- const apiKey = process.env.FIFTY_CENT_API_KEY;
131
+ const apiKey = process.env.FIFTY_CENT_API_KEY || process.env.FIFTYC_API_KEY;
132
132
  if (!apiKey) throw new Error('API key required for cloud mode');
133
133
 
134
134
  await apiRequest('PUT', '/user/config', { packs: config.packs, vault: config.vault });
@@ -137,7 +137,7 @@ async function saveConfigCloud(config) {
137
137
  // API request helper
138
138
  function apiRequest(method, endpoint, body = null) {
139
139
  return new Promise((resolve, reject) => {
140
- const apiKey = process.env.FIFTY_CENT_API_KEY || '';
140
+ const apiKey = process.env.FIFTY_CENT_API_KEY || process.env.FIFTYC_API_KEY || '';
141
141
  const url = new URL(endpoint, API_URL);
142
142
 
143
143
  const options = {
package/lib/packs/labs.js CHANGED
@@ -17,9 +17,7 @@ async function ideaFold(claim) {
17
17
  return apiRequest('POST', '/tools/idea_fold', { claim });
18
18
  }
19
19
 
20
- async function bcalc(expression, mode = 'explore') {
21
- return apiRequest('POST', '/tools/bcalc', { expression, mode });
22
- }
20
+
23
21
 
24
22
  async function contextHealth(text) {
25
23
  return apiRequest('POST', '/tools/context_health', { text });
@@ -78,20 +76,7 @@ const LABS_TOOLS = [
78
76
  cost: 0.10,
79
77
  tier: 'pro'
80
78
  },
81
- {
82
- name: 'bcalc',
83
- description: 'Mathematical discovery engine. $0.15',
84
- inputSchema: {
85
- type: 'object',
86
- properties: {
87
- expression: { type: 'string', description: 'Math expression or conjecture' },
88
- mode: { type: 'string', enum: ['explore', 'conjecture', 'connect'], default: 'explore' }
89
- },
90
- required: ['expression']
91
- },
92
- cost: 0.15,
93
- tier: 'pro'
94
- },
79
+
95
80
  {
96
81
  name: 'context_health',
97
82
  description: 'Token zone, density, redundancy analysis. $0.05',
@@ -156,8 +141,7 @@ async function handleTool(name, args) {
156
141
  return await mindOpener(args.problem);
157
142
  case 'idea_fold':
158
143
  return await ideaFold(args.claim);
159
- case 'bcalc':
160
- return await bcalc(args.expression, args.mode);
144
+
161
145
  case 'context_health':
162
146
  return await contextHealth(args.text);
163
147
  case 'context_compress':
@@ -180,7 +164,7 @@ module.exports = {
180
164
  genius,
181
165
  mindOpener,
182
166
  ideaFold,
183
- bcalc,
167
+
184
168
  contextHealth,
185
169
  contextCompress,
186
170
  contextExtract,
@@ -9,6 +9,10 @@ async function geniusPlus(problem) {
9
9
  return apiRequest('POST', '/tools/genius_plus', { problem });
10
10
  }
11
11
 
12
+ async function bcalc(expression, mode = 'explore') {
13
+ return apiRequest('POST', '/tools/bcalc', { expression, mode });
14
+ }
15
+
12
16
  async function bcalcWhy(expression) {
13
17
  return apiRequest('POST', '/tools/bcalc_why', { expression });
14
18
  }
@@ -50,6 +54,20 @@ async function handoff(project, context) {
50
54
  }
51
55
 
52
56
  const LABS_PLUS_TOOLS = [
57
+ {
58
+ name: 'bcalc',
59
+ description: 'Mathematical discovery engine. $0.15',
60
+ inputSchema: {
61
+ type: 'object',
62
+ properties: {
63
+ expression: { type: 'string', description: 'Math expression or conjecture' },
64
+ mode: { type: 'string', enum: ['explore', 'conjecture', 'connect'], default: 'explore' }
65
+ },
66
+ required: ['expression']
67
+ },
68
+ cost: 0.15,
69
+ tier: 'enterprise'
70
+ },
53
71
  {
54
72
  name: 'genius_plus',
55
73
  description: 'Self-improving code gen. $0.65. Learns from errors.',
@@ -199,6 +217,8 @@ const LABS_PLUS_TOOLS = [
199
217
  async function handleTool(name, args) {
200
218
  try {
201
219
  switch (name) {
220
+ case 'bcalc':
221
+ return await bcalc(args.expression, args.mode);
202
222
  case 'genius_plus':
203
223
  return await geniusPlus(args.problem);
204
224
  case 'bcalc_why':
@@ -232,6 +252,7 @@ async function handleTool(name, args) {
232
252
  module.exports = {
233
253
  LABS_PLUS_TOOLS,
234
254
  handleTool,
255
+ bcalc,
235
256
  geniusPlus,
236
257
  bcalcWhy,
237
258
  discoveryCollision,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "50c",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "AI toolkit. One install, 100+ tools. Works everywhere.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {