advisers 0.0.2 → 0.0.3
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/bin/advisers.js +25 -0
- package/index.js +1 -1
- package/package.json +6 -2
package/bin/advisers.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createAdvisers } from 'advisers-core'
|
|
3
|
+
|
|
4
|
+
const text = process.argv.slice(2).join(' ').trim()
|
|
5
|
+
if (!text) {
|
|
6
|
+
console.error('usage: advisers <message>')
|
|
7
|
+
process.exit(1)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const runtime = createAdvisers()
|
|
11
|
+
const context = await runtime.handleInbound({
|
|
12
|
+
linkId: 'cli',
|
|
13
|
+
accountId: 'local',
|
|
14
|
+
conversationId: 'cli',
|
|
15
|
+
messageId: `cli_${Date.now()}`,
|
|
16
|
+
sender: { id: 'local' },
|
|
17
|
+
text,
|
|
18
|
+
timestamp: new Date().toISOString(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
console.log(context.prompt)
|
|
22
|
+
if (context.hints.length) {
|
|
23
|
+
console.log('\nhints:')
|
|
24
|
+
for (const hint of context.hints) console.log(`- ${hint.title}: ${hint.why}`)
|
|
25
|
+
}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "advisers",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "A staff of AI advisers: a cordis-native personal secretary runtime with scoped memory, commitments, and reviewable routines.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cordis",
|
|
@@ -15,18 +15,22 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"main": "./index.js",
|
|
18
|
+
"bin": {
|
|
19
|
+
"advisers": "./bin/advisers.js"
|
|
20
|
+
},
|
|
18
21
|
"exports": {
|
|
19
22
|
".": "./index.js",
|
|
20
23
|
"./package.json": "./package.json"
|
|
21
24
|
},
|
|
22
25
|
"files": [
|
|
23
26
|
"index.js",
|
|
27
|
+
"bin/advisers.js",
|
|
24
28
|
"README.md",
|
|
25
29
|
"README-zh.md",
|
|
26
30
|
"LICENSE"
|
|
27
31
|
],
|
|
28
32
|
"dependencies": {
|
|
29
|
-
"advisers-core": "
|
|
33
|
+
"advisers-core": "0.0.3"
|
|
30
34
|
},
|
|
31
35
|
"repository": {
|
|
32
36
|
"type": "git",
|