@promptbook/node 0.114.0-25 → 0.114.0-27

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 (45) hide show
  1. package/esm/index.es.js +23 -9
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +1 -1
  4. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  5. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  6. package/esm/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  7. package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +26 -0
  8. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  9. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +5 -0
  10. package/esm/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  11. package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  12. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  13. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  14. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  15. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  16. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  17. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  18. package/esm/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  19. package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  20. package/esm/src/commitments/index.d.ts +1 -1
  21. package/esm/src/version.d.ts +1 -1
  22. package/package.json +2 -2
  23. package/umd/index.umd.js +23 -9
  24. package/umd/index.umd.js.map +1 -1
  25. package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +1 -1
  26. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  27. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  28. package/umd/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  29. package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +26 -0
  30. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  31. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +5 -0
  32. package/umd/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  33. package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  34. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  35. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  36. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  37. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  38. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  39. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  40. package/umd/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  41. package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  42. package/umd/src/commitments/index.d.ts +1 -1
  43. package/umd/src/version.d.ts +1 -1
  44. package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  45. package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
package/esm/index.es.js CHANGED
@@ -30,7 +30,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
30
30
  * @generated
31
31
  * @see https://github.com/webgptorg/promptbook
32
32
  */
33
- const PROMPTBOOK_ENGINE_VERSION = '0.114.0-25';
33
+ const PROMPTBOOK_ENGINE_VERSION = '0.114.0-27';
34
34
  /**
35
35
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
36
36
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1787,6 +1787,11 @@ const HARNESS_DEFINITIONS = {
1787
1787
  label: 'OpenAI Codex',
1788
1788
  commandName: 'codex',
1789
1789
  npmPackageName: '@openai/codex',
1790
+ // Note: The official standalone installer keeps its package in `~/.codex` and links it onto the `PATH`
1791
+ standaloneInstallation: {
1792
+ directoryNames: ['.codex'],
1793
+ updateCommand: 'codex update',
1794
+ },
1790
1795
  },
1791
1796
  'github-copilot': {
1792
1797
  harnessName: 'github-copilot',
@@ -27931,29 +27936,36 @@ class UseUserLocationCommitmentDefinition extends BaseCommitmentDefinition {
27931
27936
  /**
27932
27937
  * `WRITING RULES` commitment definition.
27933
27938
  *
27934
- * It adds constraints that apply strictly to writing style and presentation
27935
- * rather than task-solving behavior.
27939
+ * The `WRITING RULES`/`WRITING RULE` commitment adds constraints that apply strictly to writing style
27940
+ * and presentation rather than task-solving behavior.
27941
+ *
27942
+ * Example usage in agent source:
27943
+ *
27944
+ * ```book
27945
+ * WRITING RULES Keep every response under 120 words
27946
+ * WRITING RULE Always end the message with an emoji
27947
+ * ```
27936
27948
  *
27937
27949
  * @private [🪔] Maybe export the commitments through some package
27938
27950
  */
27939
27951
  class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
27940
- constructor() {
27941
- super('WRITING RULES');
27952
+ constructor(type = 'WRITING RULES') {
27953
+ super(type);
27942
27954
  }
27943
27955
  /**
27944
- * Short one-line description of `WRITING RULES`.
27956
+ * Short one-line description of `WRITING RULES`/`WRITING RULE`.
27945
27957
  */
27946
27958
  get description() {
27947
27959
  return 'Add writing-only constraints such as tone, length, formatting, or emoji usage.';
27948
27960
  }
27949
27961
  /**
27950
- * Icon for `WRITING RULES`.
27962
+ * Icon for `WRITING RULES`/`WRITING RULE`.
27951
27963
  */
27952
27964
  get icon() {
27953
27965
  return '📝';
27954
27966
  }
27955
27967
  /**
27956
- * Markdown documentation for `WRITING RULES`.
27968
+ * Markdown documentation for `WRITING RULES`/`WRITING RULE` commitment.
27957
27969
  */
27958
27970
  get documentation() {
27959
27971
  return spaceTrim$1(`
@@ -27963,6 +27975,7 @@ class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
27963
27975
 
27964
27976
  ## Key aspects
27965
27977
 
27978
+ - All writing rules are treated equally regardless of singular/plural form.
27966
27979
  - Use it for writing-only constraints such as tone, formatting, length, emoji usage, punctuation, or reading level.
27967
27980
  - Do **not** use it for problem-solving behavior, policy, tool usage, or decision-making logic. Use \`RULE\` for that.
27968
27981
  - Newer writing-rules blocks override conflicting earlier writing-rules blocks.
@@ -28161,7 +28174,8 @@ const COMMITMENT_REGISTRY = [
28161
28174
  new LanguageCommitmentDefinition('LANGUAGE'),
28162
28175
  new LanguageCommitmentDefinition('LANGUAGES'),
28163
28176
  new WritingSampleCommitmentDefinition(),
28164
- new WritingRulesCommitmentDefinition(),
28177
+ new WritingRulesCommitmentDefinition('WRITING RULES'),
28178
+ new WritingRulesCommitmentDefinition('WRITING RULE'),
28165
28179
  new SampleCommitmentDefinition('SAMPLE'),
28166
28180
  new SampleCommitmentDefinition('EXAMPLE'),
28167
28181
  new FormatCommitmentDefinition('FORMAT'),