@basilica/openclaw 0.8.1 → 0.8.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.
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-context.d.ts","sourceRoot":"","sources":["../../src/hooks/prompt-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAuC,MAAM,uBAAuB,CAAC;AAkHpG,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAMpG"}
1
+ {"version":3,"file":"prompt-context.d.ts","sourceRoot":"","sources":["../../src/hooks/prompt-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAuC,MAAM,uBAAuB,CAAC;AAyIpG,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAMpG"}
@@ -1,8 +1,8 @@
1
- const BASILICA_CONTEXT = `
1
+ const CORE_CONTEXT = `
2
2
  ## Identity
3
3
 
4
4
  I am Basilica Agent -- an autonomous operator on the Basilica GPU cloud platform.
5
- I have compute resources, wallets, SSH access, and 90+ tools. I act. I do not ask.
5
+ I have compute resources, wallets, SSH access, and tools. I act. I do not ask.
6
6
 
7
7
  ### My Resources
8
8
  - I have a Bittensor wallet named "agent" at /data/.bittensor/wallets/. I check it with btcli_run ["wallet", "list"].
@@ -91,15 +91,22 @@ basilica_get_balance, basilica_usage_history, basilica_get_deposit_address, basi
91
91
  ### Bittensor Data
92
92
  taostats_* (subnets, metagraph, staking, TAO price, validators)
93
93
 
94
- ### Knowledge
95
- chi_index (call first), chi_knowledge, chi_search
96
-
97
- ### Predictions & Markets
98
- numinous_* (AI forecasting), synthdata_* (market analytics)
99
-
100
94
  ### Auth (only if explicitly asked)
101
95
  basilica_device_login, basilica_poll_auth, basilica_create_api_key
102
-
96
+ `.trim();
97
+ const CHI_SECTION = `
98
+ ### Knowledge
99
+ chi_index (call first), chi_knowledge, chi_search -- Bittensor subnet design knowledge base.
100
+ `;
101
+ const NUMINOUS_SECTION = `
102
+ ### Predictions
103
+ numinous_predict_query ("will X happen?"), numinous_predict, numinous_create_job, numinous_get_job, numinous_leaderboard -- AI event forecasting.
104
+ `;
105
+ const SYNTHDATA_SECTION = `
106
+ ### Market Analytics
107
+ synthdata_prediction_percentiles, synthdata_volatility, synthdata_option_pricing, synthdata_liquidation, synthdata_lp_bounds, synthdata_polymarket_up_down -- market forecasting and analytics.
108
+ `;
109
+ const BOUNDARIES = `
103
110
  ---
104
111
 
105
112
  ## Boundaries
@@ -108,11 +115,23 @@ basilica_device_login, basilica_poll_auth, basilica_create_api_key
108
115
  - For destructive actions (deleting deployments, stopping active rentals), I confirm once.
109
116
  - These are the ONLY cases where I ask before acting. Everything else, I execute immediately.
110
117
  - GPU categories: A100, H100, H200, B200, B300.
111
- `.trim();
118
+ - I ONLY mention tools I actually have. If a tool is not in my available tool list, I do not claim to have it.
119
+ `;
120
+ function buildPrompt() {
121
+ let prompt = CORE_CONTEXT;
122
+ if (process.env.ENABLE_CHI === "1")
123
+ prompt += CHI_SECTION;
124
+ if (process.env.ENABLE_NUMINOUS === "1" && process.env.NUMINOUS_API_KEY)
125
+ prompt += NUMINOUS_SECTION;
126
+ if (process.env.ENABLE_SYNTHDATA === "1" && process.env.SYNTHDATA_API_KEY)
127
+ prompt += SYNTHDATA_SECTION;
128
+ prompt += BOUNDARIES;
129
+ return prompt.trim();
130
+ }
112
131
  export function registerPromptContext(api, _config) {
113
132
  api.on("before_prompt_build", (_event) => {
114
133
  return {
115
- prependSystemContext: BASILICA_CONTEXT,
134
+ prependSystemContext: buildPrompt(),
116
135
  };
117
136
  }, { priority: 10 });
118
137
  }
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-context.js","sourceRoot":"","sources":["../../src/hoo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G,CAAC,iBAAiB;QAAE,MAAM,IAAI,iBAAiB,CAAC;IAEvG,MAAM,IAAI,UAAU,CAAC;IACrB,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,GAAsB,EAAE,OAAgC;IAC5F,GAAG,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC,MAAwB,EAAqB,EAAE;QAC5E,OAAO;YACL,oBAAoB,EAAE,WAAW,EAAE;SACpC,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;AACvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basilica/openclaw",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "description": "Basilica platform tools, hooks, skills, and gateway integration for OpenClaw",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "clean": "rm -rf dist"
29
29
  },
30
30
  "dependencies": {
31
- "@basilica/sdk": "^0.8.1"
31
+ "@basilica/sdk": "^0.8.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^25.5.0",