@promptbook/remote-server 0.103.0-45 → 0.103.0-47

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.
Files changed (59) hide show
  1. package/esm/index.es.js +12 -6
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/servers.d.ts +1 -7
  4. package/esm/typings/src/_packages/components.index.d.ts +4 -0
  5. package/esm/typings/src/_packages/core.index.d.ts +16 -14
  6. package/esm/typings/src/_packages/types.index.d.ts +12 -6
  7. package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +6 -1
  8. package/esm/typings/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +1 -1
  9. package/esm/typings/src/book-2.0/agent-source/createCommitmentRegex.d.ts +1 -1
  10. package/esm/typings/src/book-2.0/agent-source/padBook.d.ts +2 -0
  11. package/esm/typings/src/book-2.0/agent-source/string_book.d.ts +2 -0
  12. package/esm/typings/src/book-components/Chat/AgentChat/AgentChat.d.ts +14 -0
  13. package/esm/typings/src/book-components/Chat/AgentChat/AgentChat.test.d.ts +1 -0
  14. package/esm/typings/src/book-components/Chat/AgentChat/AgentChatProps.d.ts +13 -0
  15. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +5 -60
  16. package/esm/typings/src/{book-2.0/commitments → commitments}/ACTION/ACTION.d.ts +1 -1
  17. package/esm/typings/src/{book-2.0/commitments → commitments}/DELETE/DELETE.d.ts +1 -1
  18. package/esm/typings/src/{book-2.0/commitments → commitments}/FORMAT/FORMAT.d.ts +1 -1
  19. package/esm/typings/src/{book-2.0/commitments → commitments}/GOAL/GOAL.d.ts +1 -1
  20. package/esm/typings/src/{book-2.0/commitments → commitments}/KNOWLEDGE/KNOWLEDGE.d.ts +1 -5
  21. package/esm/typings/src/{book-2.0/commitments → commitments}/MEMORY/MEMORY.d.ts +1 -1
  22. package/esm/typings/src/{book-2.0/commitments → commitments}/MESSAGE/MESSAGE.d.ts +1 -1
  23. package/esm/typings/src/{book-2.0/commitments → commitments}/META/META.d.ts +1 -1
  24. package/esm/typings/src/{book-2.0/commitments → commitments}/META_IMAGE/META_IMAGE.d.ts +1 -1
  25. package/esm/typings/src/{book-2.0/commitments → commitments}/META_LINK/META_LINK.d.ts +1 -1
  26. package/esm/typings/src/{book-2.0/commitments → commitments}/MODEL/MODEL.d.ts +1 -1
  27. package/esm/typings/src/{book-2.0/commitments → commitments}/NOTE/NOTE.d.ts +1 -1
  28. package/esm/typings/src/{book-2.0/commitments → commitments}/PERSONA/PERSONA.d.ts +1 -1
  29. package/esm/typings/src/{book-2.0/commitments → commitments}/RULE/RULE.d.ts +1 -1
  30. package/esm/typings/src/{book-2.0/commitments → commitments}/SAMPLE/SAMPLE.d.ts +1 -1
  31. package/esm/typings/src/{book-2.0/commitments → commitments}/SCENARIO/SCENARIO.d.ts +1 -1
  32. package/esm/typings/src/{book-2.0/commitments → commitments}/STYLE/STYLE.d.ts +1 -1
  33. package/esm/typings/src/{book-2.0/commitments → commitments}/_base/BaseCommitmentDefinition.d.ts +1 -1
  34. package/esm/typings/src/{book-2.0/commitments → commitments}/_base/CommitmentDefinition.d.ts +1 -1
  35. package/esm/typings/src/{book-2.0/commitments → commitments}/_base/NotYetImplementedCommitmentDefinition.d.ts +1 -1
  36. package/esm/typings/src/{book-2.0/commitments → commitments}/_base/createEmptyAgentModelRequirements.d.ts +1 -1
  37. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +2 -0
  38. package/esm/typings/src/execution/LlmExecutionTools.d.ts +1 -1
  39. package/esm/typings/src/execution/utils/validatePromptResult.d.ts +2 -0
  40. package/esm/typings/src/llm-providers/agent/Agent.d.ts +3 -7
  41. package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +1 -1
  42. package/esm/typings/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +1 -1
  43. package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +32 -0
  44. package/esm/typings/src/llm-providers/agent/RemoteAgentOptions.d.ts +11 -0
  45. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +5 -1
  46. package/esm/typings/src/pipeline/validatePipelineString.d.ts +2 -0
  47. package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -0
  48. package/esm/typings/src/types/typeAliases.d.ts +6 -0
  49. package/esm/typings/src/utils/color/internal-utils/checkChannelValue.d.ts +0 -3
  50. package/esm/typings/src/utils/random/$generateBookBoilerplate.d.ts +2 -2
  51. package/esm/typings/src/utils/random/$randomFullnameWithColor.d.ts +1 -1
  52. package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +2 -0
  53. package/esm/typings/src/version.d.ts +1 -1
  54. package/package.json +2 -2
  55. package/umd/index.umd.js +15 -9
  56. package/umd/index.umd.js.map +1 -1
  57. /package/esm/typings/src/{book-2.0/commitments → commitments}/_base/BookCommitment.d.ts +0 -0
  58. /package/esm/typings/src/{book-2.0/commitments → commitments}/_base/ParsedCommitment.d.ts +0 -0
  59. /package/esm/typings/src/{book-2.0/commitments → commitments}/index.d.ts +0 -0
package/esm/index.es.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { join, basename, dirname, isAbsolute } from 'path';
1
2
  import { spawn } from 'child_process';
2
3
  import colors from 'colors';
3
4
  import spaceTrim$1, { spaceTrim } from 'spacetrim';
@@ -9,7 +10,6 @@ import { Server } from 'socket.io';
9
10
  import swaggerUi from 'swagger-ui-express';
10
11
  import { randomBytes } from 'crypto';
11
12
  import { stat, access, constants, readFile, writeFile, readdir, mkdir, watch } from 'fs/promises';
12
- import { join, basename, dirname, isAbsolute } from 'path';
13
13
  import { Subject } from 'rxjs';
14
14
  import hexEncoder from 'crypto-js/enc-hex';
15
15
  import sha256 from 'crypto-js/sha256';
@@ -33,7 +33,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
33
33
  * @generated
34
34
  * @see https://github.com/webgptorg/promptbook
35
35
  */
36
- const PROMPTBOOK_ENGINE_VERSION = '0.103.0-45';
36
+ const PROMPTBOOK_ENGINE_VERSION = '0.103.0-47';
37
37
  /**
38
38
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
39
39
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -268,9 +268,6 @@ function checkChannelValue(channelName, value) {
268
268
  throw new Error(`${channelName} channel is greater than 255, it is ${value}`);
269
269
  }
270
270
  }
271
- /**
272
- * TODO: [🧠][🚓] Is/which combination it better to use asserts/check, validate or is utility function?
273
- */
274
271
 
275
272
  /**
276
273
  * Color object represents an RGB color with alpha channel
@@ -1301,10 +1298,13 @@ function $execCommand(options) {
1301
1298
  async function startAgentServer(options) {
1302
1299
  const { port = 4440 } = options;
1303
1300
  // TODO: !!!! [🌕]
1301
+ const agentsServerRoot = join(__dirname, '../apps/agents-server');
1304
1302
  console.trace(`!!! Starting agents server on port ${port}...`);
1305
1303
  console.log(`!!! cwd`, process.cwd());
1304
+ console.log(`!!! __dirname`, __dirname);
1305
+ console.log(`!!! agentsServerRoot`, agentsServerRoot);
1306
1306
  await $execCommand({
1307
- cwd: './apps/agents-server',
1307
+ cwd: agentsServerRoot,
1308
1308
  command: `next dev --port ${port} `,
1309
1309
  isVerbose: true,
1310
1310
  });
@@ -2444,6 +2444,8 @@ function isValidPipelineUrl(url) {
2444
2444
  * - if it is valid json
2445
2445
  * - if it is meaningful
2446
2446
  *
2447
+ * Note: [🔂] This function is idempotent.
2448
+ *
2447
2449
  * @param pipeline valid or invalid PipelineJson
2448
2450
  * @returns the same pipeline if it is logically valid
2449
2451
  * @throws {PipelineLogicError} on logical error in the pipeline
@@ -3259,6 +3261,8 @@ function isValidFilePath(filename) {
3259
3261
  * Function `validatePipelineString` will validate the if the string is a valid pipeline string
3260
3262
  * It does not check if the string is fully logically correct, but if it is a string that can be a pipeline string or the string looks completely different.
3261
3263
  *
3264
+ * Note: [🔂] This function is idempotent.
3265
+ *
3262
3266
  * @param {string} pipelineString the candidate for a pipeline string
3263
3267
  * @returns {PipelineString} the same string as input, but validated as valid
3264
3268
  * @throws {ParseError} if the string is not a valid pipeline string
@@ -6279,6 +6283,8 @@ function checkExpectations(expectations, value) {
6279
6283
  * This function provides a common abstraction for result validation that can be used
6280
6284
  * by both execution logic and caching logic to ensure consistency.
6281
6285
  *
6286
+ * Note: [🔂] This function is idempotent.
6287
+ *
6282
6288
  * @param options - The validation options including result string, expectations, and format
6283
6289
  * @returns Validation result with processed string and validity status
6284
6290
  * @private internal function of `createPipelineExecutor` and `cacheLlmTools`