@promptbook/node 0.114.0-0 → 0.114.0-2

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.
@@ -86,9 +86,7 @@ export type BookLanguageManualDictionary = {
86
86
  readonly metadataLabels: {
87
87
  readonly bookLanguageVersion: string;
88
88
  readonly generatedAt: string;
89
- readonly commitmentGroups: string;
90
- readonly implementedCommitments: string;
91
- readonly placeholderCommitments: string;
89
+ readonly commitmentCount: string;
92
90
  };
93
91
  /**
94
92
  * Heading of the table of contents.
@@ -128,7 +126,6 @@ export type BookLanguageManualDictionary = {
128
126
  readonly primitivesSections: {
129
127
  readonly coreSyntax: BookLanguageManualChapter;
130
128
  readonly references: BookLanguageManualChapter;
131
- readonly keywordsTitle: string;
132
129
  };
133
130
  /**
134
131
  * Suffixes distinguishing a server-specific catalog from the portable one.
@@ -141,18 +138,7 @@ export type BookLanguageManualDictionary = {
141
138
  * Labels used in every commitment catalog entry.
142
139
  */
143
140
  readonly commitmentLabels: {
144
- readonly status: string;
145
141
  readonly aliases: string;
146
- readonly semantics: string;
147
- readonly typeSchema: string;
148
- readonly blockSchema: string;
149
- readonly lowLevelNotice: string;
150
- readonly usage: string;
151
- readonly usageOccurrence: string;
152
- readonly usageOccurrences: string;
153
- readonly statusImplemented: string;
154
- readonly statusPlaceholder: string;
155
- readonly noAliases: string;
156
142
  };
157
143
  /**
158
144
  * Labels used by end-to-end example sections.
@@ -16,7 +16,7 @@ export type BookLanguageManualCommitmentGroups = {
16
16
  */
17
17
  readonly documented: ReadonlyArray<BookLanguageManualCommitmentGroup>;
18
18
  /**
19
- * Low-level and unfinished commitments documented in their own closing chapter.
19
+ * Low-level commitments documented in their own closing chapter.
20
20
  */
21
21
  readonly lowLevel: ReadonlyArray<BookLanguageManualCommitmentGroup>;
22
22
  };
@@ -10,10 +10,6 @@ export type RenderCommitmentCatalogSectionOptions = {
10
10
  * Grouped commitment definition with aliases.
11
11
  */
12
12
  readonly groupedCommitment: BookLanguageManualCommitmentGroup;
13
- /**
14
- * Number of uses across the selected server agents.
15
- */
16
- readonly usageCount: number;
17
13
  /**
18
14
  * Translated labels of the manual.
19
15
  */
@@ -25,6 +25,13 @@ export type MarkdownInlineReference = {
25
25
  * Link target for the rendered reference.
26
26
  */
27
27
  readonly href: string;
28
+ /**
29
+ * Markdown link destination prefixes that should render as this reference as well.
30
+ *
31
+ * This supports legacy links such as an Agents Server project file URL while keeping
32
+ * `reference` as the canonical `[[project]]` token.
33
+ */
34
+ readonly sourceHrefPrefixes?: ReadonlyArray<string>;
28
35
  /**
29
36
  * Optional hover title for the rendered reference.
30
37
  */
@@ -1,3 +1,4 @@
1
+ import { string_markdown } from '../../../types/typeAliases';
1
2
  /**
2
3
  * Relative path to the Promptbook Coder quick-reference file initialized in project roots.
3
4
  *
@@ -9,6 +10,4 @@ export declare const AGENT_CODING_FILE_PATH = "AGENT_CODING.md";
9
10
  *
10
11
  * @private internal utility of `ptbk coder`
11
12
  */
12
- export declare function getDefaultCoderAgentCodingFileContent({ packageJsonScripts, }: {
13
- readonly packageJsonScripts: Readonly<Record<string, string>>;
14
- }): string;
13
+ export declare function getDefaultCoderAgentCodingFileContent(): string_markdown;
@@ -0,0 +1,13 @@
1
+ import type { Command as Program } from 'commander';
2
+ import type { $side_effect } from '../../../utils/organization/$side_effect';
3
+ /**
4
+ * Initializes `coder ping` command for Promptbook CLI utilities.
5
+ *
6
+ * The command makes one small, isolated harness/model call, prints its result
7
+ * and reports how long the harness/model turn took.
8
+ *
9
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
10
+ *
11
+ * @private internal function of `promptbookCli`
12
+ */
13
+ export declare function $initializeCoderPingCommand(program: Program): $side_effect;
@@ -0,0 +1 @@
1
+ export {};
@@ -8,6 +8,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
8
8
  * - add: Add one ready-to-run prompt file to the queue
9
9
  * - generate-boilerplates: Generate prompt boilerplate files
10
10
  * - find-refactor-candidates: Find files that need refactoring
11
+ * - ping: Test one harness and model connection with a disposable task
11
12
  * - run: Run coding prompts with AI agents
12
13
  * - verify: Verify completed prompts
13
14
  * - find-fresh-emoji-tags: Find unused emoji tags
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.114.0-0",
3
+ "version": "0.114.0-2",
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,
@@ -97,7 +97,7 @@
97
97
  "types": "./esm/src/_packages/node.index.d.ts",
98
98
  "typings": "./esm/src/_packages/node.index.d.ts",
99
99
  "peerDependencies": {
100
- "@promptbook/core": "0.114.0-0"
100
+ "@promptbook/core": "0.114.0-2"
101
101
  },
102
102
  "dependencies": {
103
103
  "@mozilla/readability": "0.6.0",
package/umd/index.umd.js CHANGED
@@ -51,7 +51,7 @@
51
51
  * @generated
52
52
  * @see https://github.com/webgptorg/promptbook
53
53
  */
54
- const PROMPTBOOK_ENGINE_VERSION = '0.114.0-0';
54
+ const PROMPTBOOK_ENGINE_VERSION = '0.114.0-2';
55
55
  /**
56
56
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
57
57
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -4329,6 +4329,7 @@
4329
4329
  ` -c model_reasoning_effort="${thinkingLevel}" \\`,
4330
4330
  ` --ask-for-approval ${options.askForApproval} \\`,
4331
4331
  ` exec --model ${options.model} \\`,
4332
+ ...(options.isMachineReadableProgressEnabled ? [' --json \\'] : []),
4332
4333
  ' --local-provider none \\',
4333
4334
  ` --sandbox ${options.sandbox} \\`,
4334
4335
  ` -C ${projectPath} \\`,
@@ -4645,6 +4646,10 @@
4645
4646
  * Output line that marks finished Codex usage summary.
4646
4647
  */
4647
4648
  const CODEX_COMPLETION_LINE = /^\s*tokens used\b/i;
4649
+ /**
4650
+ * Output line that marks the completed Codex turn in JSONL output mode.
4651
+ */
4652
+ const CODEX_JSON_COMPLETION_LINE = /^\s*\{"type":"turn\.(?:completed|failed)"/u;
4648
4653
  /**
4649
4654
  * Idle timeout after completion marker to capture trailing output.
4650
4655
  */
@@ -4721,6 +4726,7 @@
4721
4726
  sandbox: this.options.sandbox,
4722
4727
  askForApproval: this.options.askForApproval,
4723
4728
  allowCredits: this.options.allowCredits,
4729
+ isMachineReadableProgressEnabled: this.options.isMachineReadableProgressEnabled,
4724
4730
  codexCommand: this.options.codexCommand,
4725
4731
  });
4726
4732
  for (let retryIndex = 0;; retryIndex++) {
@@ -4735,7 +4741,9 @@
4735
4741
  const output = await $runGoScriptUntilMarkerIdle({
4736
4742
  scriptPath: options.scriptPath,
4737
4743
  scriptContent,
4738
- completionLineMatcher: CODEX_COMPLETION_LINE,
4744
+ completionLineMatcher: this.options.isMachineReadableProgressEnabled
4745
+ ? CODEX_JSON_COMPLETION_LINE
4746
+ : CODEX_COMPLETION_LINE,
4739
4747
  idleTimeoutMs: CODEX_COMPLETION_IDLE_MS,
4740
4748
  logPath: options.logPath,
4741
4749
  shouldPrintLiveOutput: options.shouldPrintLiveOutput,
@@ -4985,6 +4993,7 @@
4985
4993
  sandbox: 'danger-full-access',
4986
4994
  askForApproval: 'never',
4987
4995
  allowCredits: options.allowCredits,
4996
+ isMachineReadableProgressEnabled: options.isMachineReadableProgressEnabled,
4988
4997
  });
4989
4998
  if (!options.allowCredits && options.isVerbose === true) {
4990
4999
  console.info(colors__default["default"].gray('OpenAI Codex credit spending is disabled. Use `--allow-credits` to explicitly opt in.'));