pi-codebuddy-sdk 0.1.5 → 0.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-codebuddy-sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "CodeBuddy Agent SDK provider for Pi — native tool execution, 29+ models, thinking controls, session pool",
5
5
  "author": "slahser",
6
6
  "license": "MIT",
package/src/context.ts CHANGED
@@ -73,11 +73,9 @@ function buildMessage(context: Context, startIndex: number): string | CbUserMess
73
73
  function buildHistoryPrefix(context: Context, startIndex: number): string {
74
74
  const parts: string[] = [];
75
75
 
76
- // System prompt only on first turn (startIndex === 0)
77
- if (startIndex === 0 && context.systemPrompt) {
78
- parts.push(context.systemPrompt);
79
- parts.push("");
80
- }
76
+ // ponytail: skip Pi systemPrompt — CodeBuddy uses its own.
77
+ // Pi's prompt references MCP/tool ecosystem not present in CodeBuddy,
78
+ // which confuses the model into calling non-existent tools.
81
79
 
82
80
  const messages = context.messages;
83
81
 
package/src/test-sesh.ts DELETED
@@ -1,35 +0,0 @@
1
- import sdk from '@tencent-ai/agent-sdk';
2
-
3
- async function main() {
4
- console.log('Creating session with includePartialMessages=true...');
5
- const session = await sdk.unstable_v2_createSession({
6
- model: 'hy3-preview-agent-ioa',
7
- permissionMode: 'bypassPermissions',
8
- maxTurns: 3,
9
- includePartialMessages: true,
10
- });
11
- console.log('Session created, sending...');
12
- await session.send('say: hello in 3 words');
13
- console.log('Sent, streaming...');
14
-
15
- let count = 0;
16
- try {
17
- for await (const msg of session.stream()) {
18
- count++;
19
- const t = msg.type;
20
- if (t === 'stream_event') {
21
- const evt = (msg as any).event;
22
- console.log(` #${count} ${t}.${evt.type} idx=${evt.index}`);
23
- } else if (t === 'assistant') {
24
- console.log(` #${count} ${t} blocks=${(msg as any).message.content.length}`);
25
- } else {
26
- console.log(` #${count} ${t}`);
27
- }
28
- }
29
- } catch (e: any) {
30
- console.error('STREAM ERROR:', e.message);
31
- }
32
- console.log(`Done. Total messages: ${count}`);
33
- await session.close();
34
- }
35
- main().catch(e => console.error('FATAL:', e.message));