New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More โ†’
Socket
Sign inDemoInstall
Socket

@promptbook/execute-javascript

Package Overview
Dependencies
Maintainers
0
Versions
567
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@promptbook/execute-javascript - npm Package Compare versions

Comparing version 0.81.0-22 to 0.81.0-23

esm/typings/src/pipeline/validatePipelineString.d.ts

2

esm/typings/src/_packages/core.index.d.ts

@@ -103,2 +103,3 @@ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';

import { EXPECTATION_UNITS } from '../pipeline/PipelineJson/Expectations';
import { validatePipelineString } from '../pipeline/validatePipelineString';
import { isPipelinePrepared } from '../prepare/isPipelinePrepared';

@@ -226,2 +227,3 @@ import { preparePipeline } from '../prepare/preparePipeline';

export { EXPECTATION_UNITS };
export { validatePipelineString };
export { isPipelinePrepared };

@@ -228,0 +230,0 @@ export { preparePipeline };

@@ -175,2 +175,3 @@ import type { PipelineCollection } from '../collection/PipelineCollection';

import type { string_base_url } from '../types/typeAliases';
import type { string_pipeline_root_url } from '../types/typeAliases';
import type { string_pipeline_url } from '../types/typeAliases';

@@ -441,2 +442,3 @@ import type { string_pipeline_url_with_task_hash } from '../types/typeAliases';

export type { string_base_url };
export type { string_pipeline_root_url };
export type { string_pipeline_url };

@@ -443,0 +445,0 @@ export type { string_pipeline_url_with_task_hash };

2

esm/typings/src/cli/cli-commands/make.d.ts

@@ -9,3 +9,3 @@ import type { Command as Program } from 'commander';

/**
* TODO: [๐Ÿฅƒ][main] !!! Allow `ptbk make` without configuring any llm tools
* TODO: [๐Ÿฅƒ][main] !!3 Allow `ptbk make` without configuring any llm tools
* TODO: [0] DRY Javascript and typescript - Maybe make ONLY typescript and for javascript just remove types

@@ -12,0 +12,0 @@ * Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name

@@ -9,5 +9,5 @@ import type { Command as Program } from 'commander';

/**
* TODO: !!!!! Catch and wrap all errors from CLI
* TODO: !!5 Catch and wrap all errors from CLI
* TODO: [๐Ÿง ] Pass `maxExecutionAttempts`, `csvSettings`
* TODO: [๐Ÿฅƒ][main] !!! Allow `ptbk run` without configuring any llm tools
* TODO: [๐Ÿฅƒ][main] !!3 Allow `ptbk run` without configuring any llm tools
* Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name

@@ -14,0 +14,0 @@ * Note: [๐ŸŸก] Code in this file should never be published outside of `@promptbook/cli`

import type { ExecutionTools } from '../../execution/ExecutionTools';
import type { PrepareAndScrapeOptions } from '../../prepare/PrepareAndScrapeOptions';
import type { string_dirname } from '../../types/typeAliases';
import type { string_pipeline_root_url } from '../../types/typeAliases';
import type { PipelineCollection } from '../PipelineCollection';

@@ -25,2 +26,12 @@ /**

/**
* This will be used as a root URL for all pipelines in the collection
*
* It has 2 purposes:
* 1) Every pipeline in the collection is checked if it is a child of `rootUrl`
* 2) If the pipeline does not have a URL, it is created from the `rootUrl` and path to the pipeline
*
* @default false
*/
rootUrl?: string_pipeline_root_url;
/**
* If true, directory will be scanned only when needed not during the construction

@@ -27,0 +38,0 @@ *

@@ -28,3 +28,3 @@ import type { string_url } from '../../types/typeAliases';

/**
* TODO: [main] !!!! [๐Ÿง ] Library precompilation and do not mix markdown and json promptbooks
* TODO: [main] !!4 [๐Ÿง ] Library precompilation and do not mix markdown and json promptbooks
*/

@@ -9,2 +9,2 @@ /**

* Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
*/
*/

@@ -144,3 +144,3 @@ import type { CsvSettings } from './formats/csv/CsvSettings';

* @@@
* TODO: [๐Ÿ][main] !!! Use
* TODO: [๐Ÿ][main] !!3 Use
*

@@ -152,3 +152,3 @@ * @public exported from `@promptbook/core`

* @@@
* TODO: [๐Ÿ][main] !!! Use
* TODO: [๐Ÿ][main] !!3 Use
*

@@ -155,0 +155,0 @@ * @public exported from `@promptbook/core`

@@ -22,3 +22,3 @@ import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';

* TODO: [๐Ÿง ] Maybe more things here can be refactored as high-level abstractions
* TODO: [main] !!!! Warn if used only sync version
* TODO: [main] !!4 Warn if used only sync version
* TODO: [๐Ÿšž] Report here line/column of error

@@ -25,0 +25,0 @@ * TODO: Use spaceTrim more effectively

@@ -25,7 +25,7 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';

/**
* TODO: [๐Ÿง ] !! FOREACH in mermaid graph
* TODO: [๐Ÿง ] !! Knowledge in mermaid graph
* TODO: [๐Ÿง ] !! Personas in mermaid graph
* TODO: [๐Ÿง ] FOREACH in mermaid graph
* TODO: [๐Ÿง ] Knowledge in mermaid graph
* TODO: [๐Ÿง ] Personas in mermaid graph
* TODO: Maybe use some Mermaid package instead of string templating
* TODO: [๐Ÿ•Œ] When more than 2 functionalities, split into separate functions
*/

@@ -21,5 +21,5 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';

*/
export declare function validatePipelineCore(pipeline: PipelineJson): void;
export declare function validatePipeline_InnerFunction(pipeline: PipelineJson): void;
/**
* TODO: !! [๐Ÿงžโ€โ™€๏ธ] Do not allow joker + foreach
* TODO: [๐Ÿงžโ€โ™€๏ธ] Do not allow joker + foreach
* TODO: [๐Ÿง ] Work with promptbookVersion

@@ -36,9 +36,9 @@ * TODO: Use here some json-schema, Zod or something similar and change it to:

/**
* TODO: [๐Ÿงณ][main] !!!! Validate that all examples match expectations
* TODO: [๐Ÿงณ][๐Ÿ][main] !!!! Validate that knowledge is valid (non-void)
* TODO: [๐Ÿงณ][main] !!!! Validate that persona can be used only with CHAT variant
* TODO: [๐Ÿงณ][main] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
* TODO: [๐Ÿงณ][main] !!!! Validate that reserved parameter is not used as joker
* TODO: [๐Ÿงณ][main] !!4 Validate that all examples match expectations
* TODO: [๐Ÿงณ][๐Ÿ][main] !!4 Validate that knowledge is valid (non-void)
* TODO: [๐Ÿงณ][main] !!4 Validate that persona can be used only with CHAT variant
* TODO: [๐Ÿงณ][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
* TODO: [๐Ÿงณ][main] !!4 Validate that reserved parameter is not used as joker
* TODO: [๐Ÿง ] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
* TODO: [๐Ÿ› ] Actions, instruments (and maybe knowledge) => Functions and tools
*/
/**
* Make error report URL for the given error
*
* @private !!!!!!
* @private private within the repository
*/
export declare function getErrorReportUrl(error: Error): URL;

@@ -19,3 +19,3 @@ import type { AvailableModel } from '../../execution/AvailableModel';

* Note: [๐Ÿค–] Add models of new variant
* TODO: [๐Ÿง ][main] !!! Add embedding models OR Anthropic has only chat+completion models?
* TODO: [๐Ÿง ][main] !!3 Add embedding models OR Anthropic has only chat+completion models?
* TODO: [๐Ÿง ] Some mechanism to propagate unsureness

@@ -22,0 +22,0 @@ * TODO: [๐Ÿง ][๐Ÿ‘ฎโ€โ™€๏ธ] Put here more info like description, isVision, trainingDateCutoff, languages, strengths ( Top-level performance, intelligence, fluency, and understanding), contextWindow,...

@@ -14,4 +14,4 @@ import { RemoteLlmExecutionTools } from '../remote/RemoteLlmExecutionTools';

/**
* TODO: [๐Ÿง ][main] !!!! Make anonymous this with all LLM providers
* TODO: [๐Ÿง ][๐Ÿงฑ][main] !!!! Maybe change all `new AnthropicClaudeExecutionTools` -> `createAnthropicClaudeExecutionTools` in manual
* TODO: [๐Ÿง ][main] !!4 Make anonymous this with all LLM providers
* TODO: [๐Ÿง ][๐Ÿงฑ][main] !!4 Maybe change all `new AnthropicClaudeExecutionTools` -> `createAnthropicClaudeExecutionTools` in manual
* TODO: [๐Ÿง ] Maybe auto-detect usage in browser and determine default value of `isProxied`

@@ -18,0 +18,0 @@ * TODO: [๐Ÿฆบ] Is there some way how to put `packageName` and `className` on top and function definition on bottom?

#!/usr/bin/env ts-node
export {};
/**
* TODO: [main] !!! Playground with WebGPT / Promptbook.studio anonymous server
* TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
* TODO: [main] !!3 Playground with WebGPT / Promptbook.studio anonymous server
* TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly
* Note: [โšซ] Code in this file should never be published in any package
*/
#!/usr/bin/env ts-node
export {};
/**
* TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
* TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly
* Note: [โšซ] Code in this file should never be published in any package
*/
#!/usr/bin/env ts-node
export {};
/**
* TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
* TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly
* Note: [โšซ] Code in this file should never be published in any package
*/

@@ -21,3 +21,3 @@ import type { string_formfactor_name } from '../../formfactors/_common/string_formfactor_name';

* TODO: [๐Ÿง ] Which is the best place for this function
* TODO: !!!!!! For GENERIC template ensure at least one pipeline is present for typescript in `getBookTemplates`
* TODO: !!6 For GENERIC template ensure at least one pipeline is present for typescript in `getBookTemplates`
*/

@@ -13,6 +13,6 @@ import type { ExecutionTools } from '../execution/ExecutionTools';

/**
* TODO: [๐Ÿ”ƒ][main] !! If the persona was prepared with different version or different set of models, prepare it once again
* TODO: [๐Ÿข] !! Check validity of `modelName` in pipeline
* TODO: [๐Ÿข] !! Check validity of `systemMessage` in pipeline
* TODO: [๐Ÿข] !! Check validity of `temperature` in pipeline
* TODO: [๐Ÿ”ƒ][main] If the persona was prepared with different version or different set of models, prepare it once again
* TODO: [๐Ÿข] Check validity of `modelName` in pipeline
* TODO: [๐Ÿข] Check validity of `systemMessage` in pipeline
* TODO: [๐Ÿข] Check validity of `temperature` in pipeline
*/

@@ -12,5 +12,4 @@ import type { PipelineString } from './PipelineString';

/**
* TODO: Use ACRY book\`...\ notation instead of as PipelineString
* TODO: [๐Ÿง ][๐Ÿˆด] Where is the best location for this file
* Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
*/

@@ -6,7 +6,9 @@ import type { PipelineString } from './PipelineString';

*
* @param {string} pipelineString the candidate for a pipeline string
* @returns {boolean} if the string is a valid pipeline string
* @public exported from `@promptbook/core`
*/
export declare function isValidPipelineString(value: string): value is PipelineString;
export declare function isValidPipelineString(pipelineString: string): pipelineString is PipelineString;
/**
* TODO: [๐Ÿง ][๐Ÿˆด] Where is the best location for this file
*/

@@ -10,4 +10,1 @@ /**

};
/**
* TODO: [๐Ÿ’ฉ] Better validation (validatePipelineString) or remove branded type and make it just string
*/

@@ -11,3 +11,3 @@ import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';

/**
* TODO: [๐Ÿ”ƒ][main] !! If the pipeline was prepared with different version or different set of models, prepare it once again
* TODO: [๐Ÿ”ƒ][main] If the pipeline was prepared with different version or different set of models, prepare it once again
* TODO: [๐Ÿ ] Maybe base this on `makeValidator`

@@ -14,0 +14,0 @@ * TODO: [๐ŸงŠ] Pipeline can be partially prepared, this should return true ONLY if fully prepared

@@ -28,3 +28,3 @@ import type { ExecutionTools } from '../execution/ExecutionTools';

* TODO: [๐Ÿง ] What is better name `prepareTask` or `prepareTaskAndParameters`
* TODO: [โ™จ][main] !!! Prepare index the examples and maybe tasks
* TODO: [โ™จ][main] !!3 Prepare index the examples and maybe tasks
* TODO: Write tests for `preparePipeline`

@@ -31,0 +31,0 @@ * TODO: [๐Ÿ] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch

export {};
/**
* TODO: !! Make shared test between JavascriptEvalExecutionTools and JavascriptExecutionTools to test the same functionality when implemented via vm2
* TODO: Make shared test between JavascriptEvalExecutionTools and JavascriptExecutionTools to test the same functionality when implemented via vm2
*/

@@ -13,3 +13,3 @@ import type { really_any } from '../../../utils/organization/really_any';

* TODO: Probbably remove in favour of `keepImported`
* TODO: !! [1] This maybe does memory leak
* TODO: [1] This maybe does memory leak
*/

@@ -325,2 +325,8 @@ import type { TupleToUnion } from 'type-fest';

*
* For example `"https://promptbook.studio/webgpt/"`
*/
export type string_pipeline_root_url = string;
/**
* Semantic helper
*
* For example `"https://promptbook.studio/webgpt/write-website-content-cs.book.md"`

@@ -627,6 +633,6 @@ */

/**.
* TODO: [main] !!! Change "For example" to @example
* TODO: !! Change to branded types
* TODO: [main] !!3 Change "For example" to @example
* TODO: Change to branded types
* TODO: Delete type aliases that are not exported or used internally
* Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
*/

@@ -43,4 +43,4 @@ import type { string_name } from '../../types/typeAliases';

* TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
* TODO: [๐Ÿง ][main] !!! In-memory cache of same values to prevent multiple checks
* TODO: [๐Ÿง ][main] !!3 In-memory cache of same values to prevent multiple checks
* Note: [๐Ÿ ] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
*/

@@ -23,4 +23,4 @@ import type { JsonValue } from 'type-fest';

/**
* TODO: [๐Ÿง ][main] !!! In-memory cache of same values to prevent multiple checks
* TODO: [๐Ÿง ][main] !!3 In-memory cache of same values to prevent multiple checks
* TODO: [๐Ÿง ][๐Ÿ’บ] Can be done this on type-level?
*/
{
"name": "@promptbook/execute-javascript",
"version": "0.81.0-22",
"version": "0.81.0-23",
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",

@@ -57,3 +57,3 @@ "--note-0": " <- [๐ŸŠ]",

"peerDependencies": {
"@promptbook/core": "0.81.0-22"
"@promptbook/core": "0.81.0-23"
},

@@ -60,0 +60,0 @@ "dependencies": {

@@ -136,28 +136,21 @@ <!-- โš ๏ธ WARNING: This code has been generated so that any manual changes will be overwritten -->

- [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
And **Promptbook.studio** branded socials:
- [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
And **Promptujeme** sub-brand:
*/Subbrand for Czech clients/*
_/Subbrand for Czech clients/_
- [Promptujeme.cz](https://www.promptujeme.cz/)
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
And **Promptbook.city** branded socials:
*/Sub-brand for images and graphics generated via Promptbook prompting/*
_/Sub-brand for images and graphics generated via Promptbook prompting/_
- [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)

@@ -296,7 +289,2 @@

### ๐Ÿ“š Dictionary

@@ -317,4 +305,2 @@

_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_

@@ -380,4 +366,2 @@

### Terms specific to Promptbook TypeScript implementation

@@ -384,0 +368,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc