crawd 0.9.5 → 0.9.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": "crawd",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.7",
|
|
4
4
|
"description": "CLI for crawd.bot - AI agent livestreaming platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/types.d.ts",
|
|
@@ -23,15 +23,6 @@
|
|
|
23
23
|
"bin": {
|
|
24
24
|
"crawd": "./dist/cli.js"
|
|
25
25
|
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"dev": "tsx src/cli.ts",
|
|
28
|
-
"build": "tsup src/cli.ts src/types.ts src/client.ts --format esm --dts --clean",
|
|
29
|
-
"build:backend": "tsup src/backend/index.ts --format esm --out-dir dist/backend --clean",
|
|
30
|
-
"build:plugin": "tsup src/plugin.ts --format esm --out-dir dist --dts",
|
|
31
|
-
"build:all": "pnpm build && pnpm build:backend",
|
|
32
|
-
"test": "vitest run",
|
|
33
|
-
"typecheck": "tsc --noEmit"
|
|
34
|
-
},
|
|
35
26
|
"keywords": [
|
|
36
27
|
"ai",
|
|
37
28
|
"agent",
|
|
@@ -84,5 +75,14 @@
|
|
|
84
75
|
"openclaw": {
|
|
85
76
|
"optional": true
|
|
86
77
|
}
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"dev": "tsx src/cli.ts",
|
|
81
|
+
"build": "tsup src/cli.ts src/types.ts src/client.ts --format esm --dts --clean",
|
|
82
|
+
"build:backend": "tsup src/backend/index.ts --format esm --out-dir dist/backend --clean",
|
|
83
|
+
"build:plugin": "tsup src/plugin.ts --format esm --out-dir dist --dts",
|
|
84
|
+
"build:all": "pnpm build && pnpm build:backend",
|
|
85
|
+
"test": "vitest run",
|
|
86
|
+
"typecheck": "tsc --noEmit"
|
|
87
87
|
}
|
|
88
|
-
}
|
|
88
|
+
}
|
|
@@ -330,24 +330,24 @@ describe('Coordinator — Plan Mode', () => {
|
|
|
330
330
|
})
|
|
331
331
|
})
|
|
332
332
|
|
|
333
|
-
describe('chat batch
|
|
334
|
-
it('
|
|
333
|
+
describe('chat batch format', () => {
|
|
334
|
+
it('includes END OF CHAT delimiter', () => {
|
|
335
335
|
const coord = createCoordinator()
|
|
336
|
-
// No plan set
|
|
337
336
|
|
|
338
|
-
const batch = coord.formatBatch([makeChatMessage('
|
|
339
|
-
expect(batch).toContain('
|
|
340
|
-
expect(batch).toContain('plan_set')
|
|
337
|
+
const batch = coord.formatBatch([makeChatMessage('hello')])
|
|
338
|
+
expect(batch).toContain('[END OF CHAT]')
|
|
339
|
+
expect(batch).not.toContain('plan_set')
|
|
341
340
|
|
|
342
341
|
coord.stop()
|
|
343
342
|
})
|
|
344
343
|
|
|
345
|
-
it('does not
|
|
344
|
+
it('does not include plan instruction in chat batch', () => {
|
|
346
345
|
const coord = createCoordinator()
|
|
347
|
-
|
|
346
|
+
// No plan set, but chat batch should NOT include plan instruction
|
|
348
347
|
|
|
349
|
-
const batch = coord.formatBatch([makeChatMessage('
|
|
348
|
+
const batch = coord.formatBatch([makeChatMessage('do something cool')])
|
|
350
349
|
expect(batch).not.toContain('plan mode')
|
|
350
|
+
expect(batch).not.toContain('plan_set')
|
|
351
351
|
|
|
352
352
|
coord.stop()
|
|
353
353
|
})
|
|
@@ -225,6 +225,7 @@ export class GatewayClient implements IGatewayClient {
|
|
|
225
225
|
platform: 'node',
|
|
226
226
|
mode: 'backend',
|
|
227
227
|
},
|
|
228
|
+
scopes: ['operator.write'],
|
|
228
229
|
commands: ['talk'],
|
|
229
230
|
auth: { token: this.token },
|
|
230
231
|
}, true) as Promise<void>
|
|
@@ -446,6 +447,7 @@ export class OneShotGateway {
|
|
|
446
447
|
platform: 'node',
|
|
447
448
|
mode: 'backend',
|
|
448
449
|
},
|
|
450
|
+
scopes: ['operator.write'],
|
|
449
451
|
commands: ['talk'],
|
|
450
452
|
auth: this.token ? { token: this.token } : {},
|
|
451
453
|
},
|
|
@@ -1173,12 +1175,6 @@ export class Coordinator {
|
|
|
1173
1175
|
? '\n(To reply to a specific message, prefix with its ID: [msgId] your reply)'
|
|
1174
1176
|
: ''
|
|
1175
1177
|
|
|
1176
|
-
|
|
1177
|
-
let planInstruction = ''
|
|
1178
|
-
if (this.config.autonomyMode === 'plan' && !this.hasPendingPlanSteps()) {
|
|
1179
|
-
planInstruction = '\n\nCreate a plan using plan_set. Be creative and proactive — come up with something YOU want to do, not just "reply to chat". Browse the web, go down rabbit holes, check X/HN/YouTube, find weird stuff, have opinions. Each step should be a concrete action. Think aloud on stream about what you\'re doing. Never mention plans or steps to viewers.'
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
return `${header}\n${lines.join('\n')}${instruction}${planInstruction}`
|
|
1178
|
+
return `${header}\n${lines.join('\n')}\n[END OF CHAT]${instruction}`
|
|
1183
1179
|
}
|
|
1184
1180
|
}
|