@promptbook/node 0.112.0-42 → 0.112.0-44

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 (30) hide show
  1. package/README.md +10 -3
  2. package/esm/index.es.js +207 -57
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -1
  5. package/esm/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +2 -1
  6. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +1 -1
  7. package/esm/src/cli/cli-commands/coder/getTypescriptModule.d.ts +19 -0
  8. package/esm/src/cli/cli-commands/coder/getTypescriptModule.test.d.ts +1 -0
  9. package/esm/src/cli/cli-commands/coder/mergeStringRecordJsonFile.test.d.ts +1 -0
  10. package/esm/src/commitments/PERSONA/PERSONA.d.ts +7 -0
  11. package/esm/src/llm-providers/agent/Agent.test.d.ts +1 -0
  12. package/esm/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +4 -0
  13. package/esm/src/llm-providers/agent/AgentOptions.d.ts +8 -0
  14. package/esm/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +9 -0
  15. package/esm/src/version.d.ts +1 -1
  16. package/package.json +2 -2
  17. package/umd/index.umd.js +207 -57
  18. package/umd/index.umd.js.map +1 -1
  19. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -1
  20. package/umd/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +2 -1
  21. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +1 -1
  22. package/umd/src/cli/cli-commands/coder/getTypescriptModule.d.ts +19 -0
  23. package/umd/src/cli/cli-commands/coder/getTypescriptModule.test.d.ts +1 -0
  24. package/umd/src/cli/cli-commands/coder/mergeStringRecordJsonFile.test.d.ts +1 -0
  25. package/umd/src/commitments/PERSONA/PERSONA.d.ts +7 -0
  26. package/umd/src/llm-providers/agent/Agent.test.d.ts +1 -0
  27. package/umd/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +4 -0
  28. package/umd/src/llm-providers/agent/AgentOptions.d.ts +8 -0
  29. package/umd/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +9 -0
  30. package/umd/src/version.d.ts +1 -1
@@ -66,7 +66,8 @@ export type AgentBasicInformation = {
66
66
  permanentId?: string_agent_permanent_id;
67
67
  /**
68
68
  * Optional description of the agent
69
- * This is the line starting with "PERSONA"
69
+ * This is derived from the last `GOAL` / `GOALS` commitment,
70
+ * falling back to deprecated `PERSONA` / `PERSONAE` for backward compatibility.
70
71
  */
71
72
  personaDescription: string | null;
72
73
  /**
@@ -9,7 +9,8 @@ export type TeammateProfile = {
9
9
  */
10
10
  readonly agentName: string;
11
11
  /**
12
- * Short description of what the agent does, from its PERSONA commitment.
12
+ * Short profile text for what the agent does, from the last GOAL commitment
13
+ * or deprecated PERSONA fallback.
13
14
  */
14
15
  readonly personaDescription: string | null;
15
16
  };
@@ -745,7 +745,7 @@ export type ChatProps = {
745
745
  * - `BUBBLE_MODE`: keeps the default bubble appearance for all messages.
746
746
  * - `ARTICLE_MODE`: keeps user bubbles while rendering assistant replies as borderless article blocks.
747
747
  *
748
- * @default 'BUBBLE_MODE'
748
+ * @default 'ARTICLE_MODE'
749
749
  */
750
750
  readonly CHAT_VISUAL_MODE?: ChatVisualMode;
751
751
  /**
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Possible runtime shapes returned when importing the `typescript` package.
3
+ */
4
+ type ImportedTypescriptModule = typeof import('typescript') | {
5
+ default: typeof import('typescript');
6
+ };
7
+ /**
8
+ * Loads the TypeScript runtime used for parsing JSONC-style project files.
9
+ *
10
+ * @private internal utility of `coder init`
11
+ */
12
+ export declare function getTypescriptModule(): Promise<typeof import('typescript')>;
13
+ /**
14
+ * Normalizes CommonJS-via-`default` and direct namespace imports of TypeScript.
15
+ *
16
+ * @private internal utility of `getTypescriptModule`
17
+ */
18
+ export declare function normalizeImportedTypescriptModule(importedTypescriptModule: ImportedTypescriptModule): typeof import('typescript');
19
+ export {};
@@ -29,6 +29,13 @@ export declare class PersonaCommitmentDefinition extends BaseCommitmentDefinitio
29
29
  * Short one-line description of PERSONA.
30
30
  */
31
31
  get description(): string;
32
+ /**
33
+ * Optional UI/docs-only deprecation metadata.
34
+ */
35
+ get deprecation(): {
36
+ readonly message: "Use `GOAL` for agent profile text and inheritance-safe rewrites.";
37
+ readonly replacedBy: readonly ["GOAL"];
38
+ };
32
39
  /**
33
40
  * Icon for this commitment.
34
41
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -44,6 +44,10 @@ export declare class AgentLlmExecutionTools implements LlmExecutionTools {
44
44
  * Cached parsed agent information
45
45
  */
46
46
  private _cachedAgentInfo;
47
+ /**
48
+ * Optional server-precomputed model requirements reused until the source changes.
49
+ */
50
+ private precomputedModelRequirements;
47
51
  /**
48
52
  * Creates new AgentLlmExecutionTools
49
53
  *
@@ -1,4 +1,5 @@
1
1
  import type { string_book } from '../../book-2.0/agent-source/string_book';
2
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
3
  import type { CommonToolsOptions } from '../../execution/CommonToolsOptions';
3
4
  import type { ExecutionTools } from '../../execution/ExecutionTools';
4
5
  import type { Updatable } from '../../types/Updatable';
@@ -27,6 +28,13 @@ export type AgentOptions = CommonToolsOptions & {
27
28
  * The source of the agent
28
29
  */
29
30
  agentSource: Updatable<string_book>;
31
+ /**
32
+ * Optional precomputed model requirements reused until `agentSource` changes.
33
+ *
34
+ * This keeps the actual runtime prompt aligned with server-prepared requirements
35
+ * such as compact-reference-resolved `TEAM` tools.
36
+ */
37
+ precomputedModelRequirements?: AgentModelRequirements;
30
38
  /**
31
39
  * Teacher agent for self-learning
32
40
  *
@@ -1,4 +1,5 @@
1
1
  import type { string_book } from '../../book-2.0/agent-source/string_book';
2
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
3
  import type { CommonToolsOptions } from '../../execution/CommonToolsOptions';
3
4
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
4
5
  import type { OpenAiAgentKitExecutionTools } from '../openai/OpenAiAgentKitExecutionTools';
@@ -25,4 +26,12 @@ export type CreateAgentLlmExecutionToolsOptions = CommonToolsOptions & {
25
26
  * The agent source string that defines the agent's behavior
26
27
  */
27
28
  agentSource: string_book;
29
+ /**
30
+ * Optional precomputed model requirements reused until `agentSource` changes.
31
+ *
32
+ * This is useful for runtimes such as Agents Server that already resolved compact
33
+ * references (for example in `TEAM`) and need the executed prompt to stay aligned
34
+ * with the server-prepared tool list.
35
+ */
36
+ precomputedModelRequirements?: AgentModelRequirements;
28
37
  };
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-41`).
18
+ * It follows semantic versioning (e.g., `0.112.0-43`).
19
19
  *
20
20
  * @generated
21
21
  */