@promptbook/cli 0.112.0-16 → 0.112.0-17
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 +105 -49
- package/esm/index.es.js +3 -23
- package/esm/index.es.js.map +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +3 -23
- package/umd/index.umd.js.map +1 -1
- package/umd/src/version.d.ts +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# ✨ Promptbook: AI Agents
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Create persistent AI agents that turn your company's scattered knowledge into action — powered by the [Agents Server](https://gallery.ptbk.io/)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -179,11 +179,13 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
179
179
|
|
|
180
180
|
## 📖 The Book Whitepaper
|
|
181
181
|
|
|
182
|
+
Promptbook lets you create **persistent AI agents** that work on real goals for your company. The [**Agents Server**](https://gallery.ptbk.io/) is the heart of the project — a place where your AI agents live, remember context, collaborate in teams, and get things done.
|
|
183
|
+
|
|
182
184
|
Nowadays, the biggest challenge for most business applications isn't the raw capabilities of AI models. Large language models such as GPT-5.2 and Claude-4.5 are incredibly capable.
|
|
183
185
|
|
|
184
186
|
The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
|
|
185
187
|
|
|
186
|
-
In Promptbook, you
|
|
188
|
+
In Promptbook, you define your agents **using simple Books** — a human-readable language that is explicit, easy to understand and write, reliable, and highly portable. You then deploy them to the **Agents Server**, where they run persistently and work toward their goals.
|
|
187
189
|
|
|
188
190
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
189
191
|
|
|
@@ -191,8 +193,13 @@ In Promptbook, you can define your context **using simple Books** that are very
|
|
|
191
193
|
<br/>
|
|
192
194
|
**PERSONA** You are a company lawyer.<br/>
|
|
193
195
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
196
|
+
**GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
|
|
194
197
|
**RULE** You are knowledgeable, professional, and detail-oriented.<br/>
|
|
195
|
-
|
|
198
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
199
|
+
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
200
|
+
**USE EMAIL**<br/>
|
|
201
|
+
**USE BROWSER**<br/>
|
|
202
|
+
**TEAM** You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
|
|
196
203
|
|
|
197
204
|
</td></tr></table>
|
|
198
205
|
|
|
@@ -215,6 +222,22 @@ Personas define the character of your AI persona, its role, and how it should in
|
|
|
215
222
|
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
216
223
|
<br/>
|
|
217
224
|
**PERSONA** You are a company lawyer.<br/>
|
|
225
|
+
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
226
|
+
|
|
227
|
+
</td></tr></table>
|
|
228
|
+
|
|
229
|
+
#### `Goal` commitment
|
|
230
|
+
|
|
231
|
+
Goals define what the agent should actively work toward. Unlike a chatbot that only responds when asked, an agent with goals takes initiative and works on tasks persistently on the Agents Server.
|
|
232
|
+
|
|
233
|
+
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
234
|
+
|
|
235
|
+
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
236
|
+
<br/>
|
|
237
|
+
**PERSONA** You are a company lawyer.<br/>
|
|
238
|
+
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
239
|
+
**GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
|
|
240
|
+
**GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
|
|
218
241
|
|
|
219
242
|
</td></tr></table>
|
|
220
243
|
|
|
@@ -232,9 +255,9 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
|
|
|
232
255
|
<br/>
|
|
233
256
|
**PERSONA** You are a company lawyer.<br/>
|
|
234
257
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
**KNOWLEDGE**
|
|
258
|
+
**GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
|
|
259
|
+
**GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
|
|
260
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
238
261
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
239
262
|
|
|
240
263
|
</td></tr></table>
|
|
@@ -251,13 +274,38 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
|
|
|
251
274
|
<br/>
|
|
252
275
|
**PERSONA** You are a company lawyer.<br/>
|
|
253
276
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
254
|
-
|
|
277
|
+
**GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
|
|
278
|
+
**GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
|
|
279
|
+
**RULE** Always ensure compliance with local laws and regulations.<br/>
|
|
280
|
+
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
281
|
+
**RULE** Never provide legal advice about criminal law.<br/>
|
|
282
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
283
|
+
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
284
|
+
|
|
285
|
+
</td></tr></table>
|
|
286
|
+
|
|
287
|
+
#### `Use` commitments
|
|
288
|
+
|
|
289
|
+
Use commitments grant the agent real capabilities — tools it can use to interact with the outside world. `USE EMAIL` lets the agent send emails, `USE BROWSER` lets it access and read web content, `USE SEARCH ENGINE` lets it search the web, and many more.
|
|
290
|
+
|
|
291
|
+
These are what turn a chatbot into a persistent agent that actually does work.
|
|
292
|
+
|
|
293
|
+
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
294
|
+
|
|
295
|
+
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
255
296
|
<br/>
|
|
256
|
-
**
|
|
297
|
+
**PERSONA** You are a company lawyer.<br/>
|
|
298
|
+
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
299
|
+
**GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
|
|
300
|
+
**GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
|
|
301
|
+
**RULE** Always ensure compliance with local laws and regulations.<br/>
|
|
257
302
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
258
303
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
259
|
-
**KNOWLEDGE**
|
|
304
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
260
305
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
306
|
+
**USE EMAIL**<br/>
|
|
307
|
+
**USE BROWSER**<br/>
|
|
308
|
+
**USE SEARCH ENGINE**<br/>
|
|
261
309
|
|
|
262
310
|
</td></tr></table>
|
|
263
311
|
|
|
@@ -271,32 +319,31 @@ Team commitment allows you to define the team structure and advisory fellow memb
|
|
|
271
319
|
<br/>
|
|
272
320
|
**PERSONA** You are a company lawyer.<br/>
|
|
273
321
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
322
|
+
**GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
|
|
323
|
+
**GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
|
|
324
|
+
**RULE** Always ensure compliance with local laws and regulations.<br/>
|
|
277
325
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
278
326
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
279
|
-
**KNOWLEDGE**
|
|
327
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
280
328
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
281
|
-
|
|
329
|
+
**USE EMAIL**<br/>
|
|
330
|
+
**USE BROWSER**<br/>
|
|
331
|
+
**USE SEARCH ENGINE**<br/>
|
|
332
|
+
**TEAM** You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
|
|
282
333
|
|
|
283
334
|
</td></tr></table>
|
|
284
335
|
|
|
285
|
-
|
|
286
|
-
|
|
287
336
|
### Promptbook Ecosystem
|
|
288
337
|
|
|
289
|
-
|
|
338
|
+
Promptbook is an ecosystem of tools centered around the **Agents Server** — a production-ready platform for running persistent AI agents.
|
|
290
339
|
|
|
291
|
-
####
|
|
340
|
+
#### Agents Server
|
|
292
341
|
|
|
293
|
-
|
|
342
|
+
The [**Agents Server**](https://gallery.ptbk.io/) is the primary way to use Promptbook. It is a web application where your AI agents live and work. You can create agents, give them knowledge and rules using the Book language, organize them into teams, and let them work on goals persistently. The Agents Server provides a UI for managing agents, an API for integrating them into your applications, and can be self-hosted via [Docker](https://hub.docker.com/r/hejny/promptbook/) or deployed on Vercel.
|
|
294
343
|
|
|
295
344
|
#### Promptbook Engine
|
|
296
345
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
346
|
+
The [Promptbook Engine](https://github.com/webgptorg/promptbook) is the open-source core that powers everything. It parses the Book language, applies commitments, manages LLM provider integrations, and executes agents. The Agents Server is built on top of the Engine. If you need to embed agent capabilities directly into your own application, you can use the Engine as a standalone TypeScript/JavaScript library via [NPM packages](https://www.npmjs.com/package/@promptbook/core).
|
|
300
347
|
|
|
301
348
|
|
|
302
349
|
|
|
@@ -310,7 +357,7 @@ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with
|
|
|
310
357
|
|
|
311
358
|
## 💜 The Promptbook Project
|
|
312
359
|
|
|
313
|
-
Promptbook project is ecosystem
|
|
360
|
+
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:
|
|
314
361
|
|
|
315
362
|
<table>
|
|
316
363
|
<thead>
|
|
@@ -321,9 +368,9 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
321
368
|
</thead>
|
|
322
369
|
<tbody>
|
|
323
370
|
<tr>
|
|
324
|
-
<td><a href="https://gallery.ptbk.io/"
|
|
371
|
+
<td><a href="https://gallery.ptbk.io/"><strong>⭐ Agents Server</strong></a></td>
|
|
325
372
|
<td>
|
|
326
|
-
|
|
373
|
+
The primary way to use Promptbook. A production-ready platform where your AI agents live — create, manage, deploy, and interact with persistent agents that work on goals. Available as a hosted service or <a href="https://hub.docker.com/r/hejny/promptbook/">self-hosted via Docker</a>.
|
|
327
374
|
</td>
|
|
328
375
|
</tr>
|
|
329
376
|
<tr>
|
|
@@ -337,17 +384,14 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
337
384
|
<tr>
|
|
338
385
|
<td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
|
|
339
386
|
<td>
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
Agent Server is based on Promptbook Engine.
|
|
387
|
+
The open-source core that powers the Agents Server. Can also be used as a standalone TypeScript/JavaScript library to embed agent capabilities into your own applications.
|
|
388
|
+
Released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a>.
|
|
343
389
|
</td>
|
|
344
390
|
</tr>
|
|
345
391
|
|
|
346
392
|
</tbody>
|
|
347
393
|
</table>
|
|
348
394
|
|
|
349
|
-
|
|
350
|
-
|
|
351
395
|
### 🌐 Community & Social Media
|
|
352
396
|
|
|
353
397
|
Join our growing community of developers and users:
|
|
@@ -404,8 +448,6 @@ Join our growing community of developers and users:
|
|
|
404
448
|
|
|
405
449
|
|
|
406
450
|
|
|
407
|
-
|
|
408
|
-
|
|
409
451
|
## 📚 Documentation
|
|
410
452
|
|
|
411
453
|
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
@@ -414,9 +456,16 @@ See detailed guides and API reference in the [docs](https://github.com/webgptorg
|
|
|
414
456
|
|
|
415
457
|
For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
|
|
416
458
|
|
|
417
|
-
## 📦
|
|
459
|
+
## 📦 Deployment & Packages
|
|
460
|
+
|
|
461
|
+
The fastest way to get started is with the **Agents Server**:
|
|
418
462
|
|
|
419
|
-
|
|
463
|
+
- 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** — Self-host the Agents Server with full control over your data
|
|
464
|
+
- ☁️ **[Hosted Agents Server](https://gallery.ptbk.io/)** — Start creating agents immediately, no setup required
|
|
465
|
+
|
|
466
|
+
### NPM Packages _(for developers embedding the Engine)_
|
|
467
|
+
|
|
468
|
+
If you want to embed the Promptbook Engine directly into your application, the library is divided into several packages published from a [single monorepo](https://github.com/webgptorg/promptbook).
|
|
420
469
|
You can install all of them at once:
|
|
421
470
|
|
|
422
471
|
```bash
|
|
@@ -435,7 +484,6 @@ Or you can install them separately:
|
|
|
435
484
|
- **[@promptbook/browser](https://www.npmjs.com/package/@promptbook/browser)** - Core of the library for browser environment
|
|
436
485
|
- ⭐ **[@promptbook/utils](https://www.npmjs.com/package/@promptbook/utils)** - Utility functions used in the library but also useful for individual use in preprocessing and postprocessing LLM inputs and outputs
|
|
437
486
|
- **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
|
|
438
|
-
- _(Not finished)_ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard for creating+running promptbooks in single line
|
|
439
487
|
- **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
|
|
440
488
|
- **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
|
|
441
489
|
- **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
|
|
@@ -457,8 +505,7 @@ Or you can install them separately:
|
|
|
457
505
|
- **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
|
|
458
506
|
- **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
|
|
459
507
|
- **[@promptbook/color](https://www.npmjs.com/package/@promptbook/color)** - Color manipulation library
|
|
460
|
-
-
|
|
461
|
-
- 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
|
|
508
|
+
- **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
|
|
462
509
|
|
|
463
510
|
|
|
464
511
|
|
|
@@ -482,8 +529,6 @@ The following glossary is used to clarify certain concepts:
|
|
|
482
529
|
|
|
483
530
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
484
531
|
|
|
485
|
-
|
|
486
|
-
|
|
487
532
|
### 💯 Core concepts
|
|
488
533
|
|
|
489
534
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
|
@@ -545,31 +590,42 @@ _Note: This section is not a complete dictionary, more list of general AI / LLM
|
|
|
545
590
|
|
|
546
591
|
|
|
547
592
|
|
|
593
|
+
## � Agents Server
|
|
594
|
+
|
|
595
|
+
The **[Agents Server](https://gallery.ptbk.io/)** is the primary way to use Promptbook. It is a production-ready platform where you create, deploy, and manage persistent AI agents that work toward goals. Agents remember context across conversations, collaborate in teams, and follow the rules and knowledge you define in the Book language.
|
|
596
|
+
|
|
597
|
+
- **Hosted** at [gallery.ptbk.io](https://gallery.ptbk.io/) — start creating agents immediately
|
|
598
|
+
- **Self-hosted** via [Docker](https://hub.docker.com/r/hejny/promptbook/) — full control over your data and infrastructure
|
|
599
|
+
- **API** for integrating agents into your own applications
|
|
600
|
+
|
|
548
601
|
## 🚂 Promptbook Engine
|
|
549
602
|
|
|
603
|
+
The Engine is the open-source core that powers the Agents Server. If you need to embed agent capabilities directly into your TypeScript/JavaScript application, you can use it as a standalone library.
|
|
604
|
+
|
|
550
605
|

|
|
551
606
|
|
|
552
607
|
## ➕➖ When to use Promptbook?
|
|
553
608
|
|
|
554
609
|
### ➕ When to use
|
|
555
610
|
|
|
556
|
-
- When you
|
|
557
|
-
- When you
|
|
558
|
-
- When you want
|
|
559
|
-
- When you
|
|
560
|
-
- When you want to **
|
|
561
|
-
- When you
|
|
562
|
-
- When you want to **
|
|
611
|
+
- When you want to **deploy persistent AI agents** that work on goals for your company
|
|
612
|
+
- When you need agents with **specific personalities, knowledge, and rules** tailored to your business
|
|
613
|
+
- When you want agents that **collaborate in teams** and consult each other
|
|
614
|
+
- When you need to **integrate AI agents into your existing applications** via API
|
|
615
|
+
- When you want to **self-host** your AI agents with full control over data and infrastructure
|
|
616
|
+
- When you are writing an app that generates complex things via LLM — like **websites, articles, presentations, code, stories, songs**,...
|
|
617
|
+
- When you want to **version** your agent definitions and **test multiple versions**
|
|
618
|
+
- When you want to **log** agent execution and backtrace issues
|
|
563
619
|
|
|
564
620
|
[See more](https://github.com/webgptorg/promptbook/discussions/111)
|
|
565
621
|
|
|
566
622
|
### ➖ When not to use
|
|
567
623
|
|
|
568
|
-
- When
|
|
624
|
+
- When a single simple prompt already works fine for your job
|
|
569
625
|
- When [OpenAI Assistant (GPTs)](https://help.openai.com/en/articles/8673914-gpts-vs-assistants) is enough for you
|
|
570
|
-
- When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_
|
|
626
|
+
- When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_
|
|
571
627
|
- When you need to use something other than JavaScript or TypeScript _(other languages are on the way, [see the discussion](https://github.com/webgptorg/promptbook/discussions/101))_
|
|
572
|
-
- When your main focus is on something other than text
|
|
628
|
+
- When your main focus is on something other than text — like images, audio, video, spreadsheets _(other media types may be added in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/103))_
|
|
573
629
|
- When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
|
|
574
630
|
|
|
575
631
|
[See more](https://github.com/webgptorg/promptbook/discussions/112)
|
package/esm/index.es.js
CHANGED
|
@@ -57,7 +57,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
57
57
|
* @generated
|
|
58
58
|
* @see https://github.com/webgptorg/promptbook
|
|
59
59
|
*/
|
|
60
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
60
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-17';
|
|
61
61
|
/**
|
|
62
62
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
63
63
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -39643,22 +39643,12 @@ if (require.main === module) {
|
|
|
39643
39643
|
});
|
|
39644
39644
|
}
|
|
39645
39645
|
/**
|
|
39646
|
-
* Initializes environment
|
|
39646
|
+
* Initializes environment for this script.
|
|
39647
39647
|
*
|
|
39648
39648
|
* @private utility for `findFreshEmojiTag`
|
|
39649
39649
|
*/
|
|
39650
39650
|
function initializeFindFreshEmojiTagRun() {
|
|
39651
39651
|
dotenv.config({ path: '.env' });
|
|
39652
|
-
if (process.cwd() !== join(__dirname, '../..')) {
|
|
39653
|
-
console.error(colors.red(spaceTrim$1(`
|
|
39654
|
-
CWD must be root of the project
|
|
39655
|
-
|
|
39656
|
-
Script: find-fresh-emoji-tag.ts
|
|
39657
|
-
Current CWD: ${process.cwd()}
|
|
39658
|
-
Expected CWD: ${join(__dirname, '../..')}
|
|
39659
|
-
`)));
|
|
39660
|
-
process.exit(1);
|
|
39661
|
-
}
|
|
39662
39652
|
}
|
|
39663
39653
|
/**
|
|
39664
39654
|
* Finds fresh emoji tags that are not yet used in the codebase.
|
|
@@ -39948,22 +39938,12 @@ if (require.main === module) {
|
|
|
39948
39938
|
});
|
|
39949
39939
|
}
|
|
39950
39940
|
/**
|
|
39951
|
-
* Initializes environment
|
|
39941
|
+
* Initializes environment for this script.
|
|
39952
39942
|
*
|
|
39953
39943
|
* @private utility for `findRefactorCandidates`
|
|
39954
39944
|
*/
|
|
39955
39945
|
function initializeFindRefactorCandidatesRun() {
|
|
39956
39946
|
dotenv.config({ path: '.env' });
|
|
39957
|
-
if (process.cwd() !== join(__dirname, '../..')) {
|
|
39958
|
-
console.error(colors.red(spaceTrim$1(`
|
|
39959
|
-
CWD must be root of the project
|
|
39960
|
-
|
|
39961
|
-
Script: find-refactor-candidates.ts
|
|
39962
|
-
Current CWD: ${process.cwd()}
|
|
39963
|
-
Expected CWD: ${join(__dirname, '../..')}
|
|
39964
|
-
`)));
|
|
39965
|
-
process.exit(1);
|
|
39966
|
-
}
|
|
39967
39947
|
}
|
|
39968
39948
|
/**
|
|
39969
39949
|
* Orchestrates scanning for refactor candidates and generating prompts.
|