ptbk 0.113.0-1 → 0.113.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/README.md +1 -17
- package/bin/promptbook-cli-proxy.js +93 -7
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -23,13 +23,7 @@ Create persistent AI agents that turn your company's scattered knowledge into ac
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Standalone VPS
|
|
31
|
-
|
|
32
|
-
Run the standalone VPS installer only on a fresh server. Interactive mode asks for the installation values:
|
|
26
|
+
Run the standalone VPS installer _(for example on DigitalOcean)_ only on a fresh server. Interactive mode asks for the installation values:
|
|
33
27
|
|
|
34
28
|
```bash
|
|
35
29
|
sudo curl -fsSL https://raw.githubusercontent.com/webgptorg/promptbook/refs/heads/main/other/vps/install.sh | bash
|
|
@@ -212,8 +206,6 @@ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with
|
|
|
212
206
|
|
|
213
207
|
</td></tr></table>
|
|
214
208
|
|
|
215
|
-
|
|
216
|
-
|
|
217
209
|
### Promptbook Ecosystem
|
|
218
210
|
|
|
219
211
|
Promptbook is an ecosystem of tools centered around the **Agents Server** - a production-ready platform for running persistent AI agents.
|
|
@@ -236,8 +228,6 @@ The [Promptbook Engine](https://github.com/webgptorg/promptbook) is the open-sou
|
|
|
236
228
|
|
|
237
229
|
|
|
238
230
|
|
|
239
|
-
|
|
240
|
-
|
|
241
231
|
## 💜 The Promptbook Project
|
|
242
232
|
|
|
243
233
|
Promptbook project is an ecosystem centered around the **Agents Server** - a platform for creating, deploying, and running persistent AI agents. Following is a list of the most important pieces of the project:
|
|
@@ -275,8 +265,6 @@ Promptbook project is an ecosystem centered around the **Agents Server** - a pla
|
|
|
275
265
|
</tbody>
|
|
276
266
|
</table>
|
|
277
267
|
|
|
278
|
-
|
|
279
|
-
|
|
280
268
|
### 🌐 Community & Social Media
|
|
281
269
|
|
|
282
270
|
Join our growing community of developers and users:
|
|
@@ -333,8 +321,6 @@ Join our growing community of developers and users:
|
|
|
333
321
|
|
|
334
322
|
|
|
335
323
|
|
|
336
|
-
|
|
337
|
-
|
|
338
324
|
## 📚 Documentation
|
|
339
325
|
|
|
340
326
|
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
@@ -542,8 +528,6 @@ The following glossary is used to clarify certain concepts:
|
|
|
542
528
|
|
|
543
529
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
544
530
|
|
|
545
|
-
|
|
546
|
-
|
|
547
531
|
### 💯 Core concepts
|
|
548
532
|
|
|
549
533
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
|
@@ -6,12 +6,98 @@
|
|
|
6
6
|
* Note: [🔺] Purpose of this file is to forward `ptbk` package launches to `@promptbook/cli`
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
const {
|
|
9
|
+
const { realpathSync } = require('fs');
|
|
10
|
+
const { dirname, resolve } = require('path');
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const PROMPTBOOK_CLI_BIN_PATH = '@promptbook/cli/bin/promptbook-cli.js';
|
|
13
|
+
const PROMPTBOOK_PACKAGE_JSON_PATH = 'promptbook/package.json';
|
|
14
|
+
const PTBK_PACKAGE_JSON_PATH = 'ptbk/package.json';
|
|
15
|
+
const PTBK_PROXY_BIN_PATH = 'bin/promptbook-cli-proxy.js';
|
|
16
|
+
const CURRENT_PACKAGE_ROOT = resolve(__dirname, '..');
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
const localPtbkEntrypoint = resolveLocalPtbkEntrypoint();
|
|
19
|
+
|
|
20
|
+
if (localPtbkEntrypoint !== null) {
|
|
21
|
+
require(localPtbkEntrypoint);
|
|
22
|
+
} else {
|
|
23
|
+
require(resolvePromptbookCliEntrypoint());
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Resolves a cwd-local `ptbk` launcher when this proxy was reached from another install.
|
|
28
|
+
*
|
|
29
|
+
* This keeps `ptbk about` aligned with the project dependency even when another
|
|
30
|
+
* `ptbk` install appears earlier on PATH.
|
|
31
|
+
*/
|
|
32
|
+
function resolveLocalPtbkEntrypoint() {
|
|
33
|
+
const localPtbkPackageJsonPath = tryRequireResolve(PTBK_PACKAGE_JSON_PATH, [process.cwd()]);
|
|
34
|
+
|
|
35
|
+
if (localPtbkPackageJsonPath === null) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const localPtbkPackageRoot = dirname(localPtbkPackageJsonPath);
|
|
40
|
+
|
|
41
|
+
if (isSameFilesystemPath(localPtbkPackageRoot, CURRENT_PACKAGE_ROOT)) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return resolve(localPtbkPackageRoot, PTBK_PROXY_BIN_PATH);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Resolves the CLI binary from this package graph.
|
|
50
|
+
*/
|
|
51
|
+
function resolvePromptbookCliEntrypoint() {
|
|
52
|
+
const directPromptbookCliEntrypoint = tryRequireResolve(PROMPTBOOK_CLI_BIN_PATH, [
|
|
53
|
+
CURRENT_PACKAGE_ROOT,
|
|
54
|
+
__dirname,
|
|
55
|
+
]);
|
|
56
|
+
|
|
57
|
+
if (directPromptbookCliEntrypoint !== null) {
|
|
58
|
+
return directPromptbookCliEntrypoint;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const promptbookPackageRoot = dirname(
|
|
62
|
+
require.resolve(PROMPTBOOK_PACKAGE_JSON_PATH, {
|
|
63
|
+
paths: [CURRENT_PACKAGE_ROOT, __dirname],
|
|
64
|
+
}),
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return require.resolve(PROMPTBOOK_CLI_BIN_PATH, {
|
|
68
|
+
paths: [promptbookPackageRoot, CURRENT_PACKAGE_ROOT, __dirname],
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Resolves a module path and returns `null` when it cannot be resolved.
|
|
74
|
+
*/
|
|
75
|
+
function tryRequireResolve(modulePath, resolvePaths) {
|
|
76
|
+
try {
|
|
77
|
+
return require.resolve(modulePath, { paths: resolvePaths });
|
|
78
|
+
} catch {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Compares filesystem paths after resolving symlinks where possible.
|
|
85
|
+
*/
|
|
86
|
+
function isSameFilesystemPath(firstPath, secondPath) {
|
|
87
|
+
return normalizeFilesystemPath(firstPath) === normalizeFilesystemPath(secondPath);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Normalizes one filesystem path for cross-platform comparisons.
|
|
92
|
+
*/
|
|
93
|
+
function normalizeFilesystemPath(path) {
|
|
94
|
+
let resolvedPath = resolve(path);
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
resolvedPath = realpathSync(resolvedPath);
|
|
98
|
+
} catch {
|
|
99
|
+
// Keep the resolved path when a transient install path cannot be realpathed.
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return process.platform === 'win32' ? resolvedPath.toLowerCase() : resolvedPath;
|
|
103
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ptbk",
|
|
3
|
-
"version": "0.113.0-
|
|
3
|
+
"version": "0.113.0-3",
|
|
4
4
|
"description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -91,10 +91,11 @@
|
|
|
91
91
|
"zod": "$zod"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@promptbook/core": "0.113.0-
|
|
94
|
+
"@promptbook/core": "0.113.0-3"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"promptbook": "0.113.0-
|
|
97
|
+
"@promptbook/cli": "0.113.0-3",
|
|
98
|
+
"promptbook": "0.113.0-3"
|
|
98
99
|
},
|
|
99
100
|
"bin": {
|
|
100
101
|
"ptbk": "bin/promptbook-cli-proxy.js"
|