@promptbook/cli 0.103.0-53 → 0.103.0-54

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 (49) hide show
  1. package/apps/agents-server/src/app/admin/api-tokens/ApiTokensClient.tsx +186 -0
  2. package/apps/agents-server/src/app/admin/api-tokens/page.tsx +13 -0
  3. package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +10 -2
  4. package/apps/agents-server/src/app/agents/[agentName]/api/openai/chat/completions/route.ts +176 -0
  5. package/apps/agents-server/src/app/agents/[agentName]/page.tsx +24 -3
  6. package/apps/agents-server/src/app/api/api-tokens/route.ts +76 -0
  7. package/apps/agents-server/src/app/docs/[docId]/page.tsx +1 -0
  8. package/apps/agents-server/src/app/docs/page.tsx +1 -0
  9. package/apps/agents-server/src/components/Header/Header.tsx +5 -0
  10. package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +2 -1
  11. package/apps/agents-server/src/database/migrations/2025-12-0010-llm-cache.sql +12 -0
  12. package/apps/agents-server/src/database/migrations/2025-12-0060-api-tokens.sql +13 -0
  13. package/apps/agents-server/src/database/schema.ts +51 -0
  14. package/apps/agents-server/src/middleware.ts +49 -1
  15. package/apps/agents-server/src/tools/$provideCdnForServer.ts +3 -7
  16. package/apps/agents-server/src/tools/$provideExecutionToolsForServer.ts +10 -1
  17. package/apps/agents-server/src/utils/cache/SupabaseCacheStorage.ts +55 -0
  18. package/apps/agents-server/src/utils/cdn/classes/VercelBlobStorage.ts +63 -0
  19. package/esm/index.es.js +127 -1
  20. package/esm/index.es.js.map +1 -1
  21. package/esm/typings/src/commitments/ACTION/ACTION.d.ts +4 -0
  22. package/esm/typings/src/commitments/DELETE/DELETE.d.ts +4 -0
  23. package/esm/typings/src/commitments/FORMAT/FORMAT.d.ts +4 -0
  24. package/esm/typings/src/commitments/GOAL/GOAL.d.ts +4 -0
  25. package/esm/typings/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +4 -0
  26. package/esm/typings/src/commitments/MEMORY/MEMORY.d.ts +4 -0
  27. package/esm/typings/src/commitments/MESSAGE/AgentMessageCommitmentDefinition.d.ts +4 -0
  28. package/esm/typings/src/commitments/MESSAGE/InitialMessageCommitmentDefinition.d.ts +4 -0
  29. package/esm/typings/src/commitments/MESSAGE/MESSAGE.d.ts +4 -0
  30. package/esm/typings/src/commitments/MESSAGE/UserMessageCommitmentDefinition.d.ts +4 -0
  31. package/esm/typings/src/commitments/META/META.d.ts +4 -0
  32. package/esm/typings/src/commitments/META_COLOR/META_COLOR.d.ts +4 -0
  33. package/esm/typings/src/commitments/META_IMAGE/META_IMAGE.d.ts +4 -0
  34. package/esm/typings/src/commitments/META_LINK/META_LINK.d.ts +4 -0
  35. package/esm/typings/src/commitments/MODEL/MODEL.d.ts +4 -0
  36. package/esm/typings/src/commitments/NOTE/NOTE.d.ts +4 -0
  37. package/esm/typings/src/commitments/PERSONA/PERSONA.d.ts +4 -0
  38. package/esm/typings/src/commitments/RULE/RULE.d.ts +4 -0
  39. package/esm/typings/src/commitments/SAMPLE/SAMPLE.d.ts +4 -0
  40. package/esm/typings/src/commitments/SCENARIO/SCENARIO.d.ts +4 -0
  41. package/esm/typings/src/commitments/STYLE/STYLE.d.ts +4 -0
  42. package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +5 -0
  43. package/esm/typings/src/commitments/_base/CommitmentDefinition.d.ts +5 -0
  44. package/esm/typings/src/commitments/_base/NotYetImplementedCommitmentDefinition.d.ts +4 -0
  45. package/esm/typings/src/version.d.ts +1 -1
  46. package/package.json +2 -2
  47. package/umd/index.umd.js +127 -1
  48. package/umd/index.umd.js.map +1 -1
  49. package/apps/agents-server/src/utils/cdn/classes/DigitalOceanSpaces.ts +0 -119
@@ -242,6 +242,57 @@ export type AgentsServerDatabase = {
242
242
  };
243
243
  Relationships: [];
244
244
  };
245
+ LlmCache: {
246
+ Row: {
247
+ id: number;
248
+ createdAt: string;
249
+ updatedAt: string;
250
+ hash: string;
251
+ value: Json;
252
+ };
253
+ Insert: {
254
+ id?: number;
255
+ createdAt?: string;
256
+ updatedAt?: string;
257
+ hash: string;
258
+ value: Json;
259
+ };
260
+ Update: {
261
+ id?: number;
262
+ createdAt?: string;
263
+ updatedAt?: string;
264
+ hash?: string;
265
+ value?: Json;
266
+ };
267
+ Relationships: [];
268
+ };
269
+ ApiTokens: {
270
+ Row: {
271
+ id: number;
272
+ createdAt: string;
273
+ updatedAt: string;
274
+ token: string;
275
+ note: string | null;
276
+ isRevoked: boolean;
277
+ };
278
+ Insert: {
279
+ id?: number;
280
+ createdAt?: string;
281
+ updatedAt?: string;
282
+ token: string;
283
+ note?: string | null;
284
+ isRevoked?: boolean;
285
+ };
286
+ Update: {
287
+ id?: number;
288
+ createdAt?: string;
289
+ updatedAt?: string;
290
+ token?: string;
291
+ note?: string | null;
292
+ isRevoked?: boolean;
293
+ };
294
+ Relationships: [];
295
+ };
245
296
  };
246
297
  Views: Record<string, never>;
247
298
  Functions: Record<string, never>;
@@ -75,9 +75,57 @@ export async function middleware(req: NextRequest) {
75
75
  const allowedIps =
76
76
  allowedIpsMetadata !== null && allowedIpsMetadata !== undefined ? allowedIpsMetadata : allowedIpsEnv;
77
77
 
78
+ let isValidToken = false;
79
+ const authHeader = req.headers.get('authorization');
80
+
81
+ if (authHeader && authHeader.startsWith('Bearer ')) {
82
+ const token = authHeader.split(' ')[1];
83
+
84
+ if (token.startsWith('ptbk_')) {
85
+ const host = req.headers.get('host');
86
+ let tablePrefix = SUPABASE_TABLE_PREFIX;
87
+
88
+ if (host && SERVERS && SERVERS.length > 0) {
89
+ if (SERVERS.some((server) => server === host)) {
90
+ let serverName = host;
91
+ serverName = serverName.replace(/\.ptbk\.io$/, '');
92
+ serverName = normalizeTo_PascalCase(serverName);
93
+ tablePrefix = `server_${serverName}_`;
94
+ }
95
+ }
96
+
97
+ const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
98
+ const supabaseKey = process.env.SUPABASE_SERVICE_ROLE_KEY || process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
99
+
100
+ if (supabaseUrl && supabaseKey) {
101
+ try {
102
+ const supabase = createClient(supabaseUrl, supabaseKey, {
103
+ auth: {
104
+ persistSession: false,
105
+ autoRefreshToken: false,
106
+ },
107
+ });
108
+
109
+ const { data } = await supabase
110
+ .from(`${tablePrefix}ApiTokens`)
111
+ .select('id')
112
+ .eq('token', token)
113
+ .eq('isRevoked', false)
114
+ .single();
115
+
116
+ if (data) {
117
+ isValidToken = true;
118
+ }
119
+ } catch (error) {
120
+ console.error('Error validating token in middleware:', error);
121
+ }
122
+ }
123
+ }
124
+ }
125
+
78
126
  const isIpAllowedResult = isIpAllowed(ip, allowedIps);
79
127
  const isLoggedIn = req.cookies.has('sessionToken');
80
- const isAccessRestricted = !isIpAllowedResult && !isLoggedIn;
128
+ const isAccessRestricted = !isIpAllowedResult && !isLoggedIn && !isValidToken;
81
129
 
82
130
  // Handle OPTIONS (preflight) requests globally
83
131
  if (req.method === 'OPTIONS') {
@@ -1,4 +1,4 @@
1
- import { DigitalOceanSpaces } from '../utils/cdn/classes/DigitalOceanSpaces';
1
+ import { VercelBlobStorage } from '../utils/cdn/classes/VercelBlobStorage';
2
2
  import { IIFilesStorageWithCdn } from '../utils/cdn/interfaces/IFilesStorage';
3
3
 
4
4
  /**
@@ -13,14 +13,10 @@ let cdn: IIFilesStorageWithCdn | null = null;
13
13
  */
14
14
  export function $provideCdnForServer(): IIFilesStorageWithCdn {
15
15
  if (!cdn) {
16
- cdn = new DigitalOceanSpaces({
17
- bucket: process.env.CDN_BUCKET!,
16
+ cdn = new VercelBlobStorage({
17
+ token: process.env.BLOB_READ_WRITE_TOKEN!,
18
18
  pathPrefix: process.env.NEXT_PUBLIC_CDN_PATH_PREFIX!,
19
- endpoint: process.env.CDN_ENDPOINT!,
20
- accessKeyId: process.env.CDN_ACCESS_KEY_ID!,
21
- secretAccessKey: process.env.CDN_SECRET_ACCESS_KEY!,
22
19
  cdnPublicUrl: new URL(process.env.NEXT_PUBLIC_CDN_PUBLIC_URL!),
23
- gzip: true,
24
20
  });
25
21
  }
26
22
 
@@ -1,6 +1,7 @@
1
1
  'use server';
2
2
 
3
3
  import {
4
+ cacheLlmTools,
4
5
  _AnthropicClaudeMetadataRegistration,
5
6
  _AzureOpenAiMetadataRegistration,
6
7
  _BoilerplateScraperMetadataRegistration,
@@ -26,6 +27,7 @@ import { $provideFilesystemForNode } from '../../../../src/scrapers/_common/regi
26
27
  import { $provideScrapersForNode } from '../../../../src/scrapers/_common/register/$provideScrapersForNode';
27
28
  import { $provideScriptingForNode } from '../../../../src/scrapers/_common/register/$provideScriptingForNode';
28
29
  import { $sideEffect } from '../../../../src/utils/organization/$sideEffect';
30
+ import { SupabaseCacheStorage } from '../utils/cache/SupabaseCacheStorage';
29
31
 
30
32
  $sideEffect(
31
33
  _AnthropicClaudeMetadataRegistration,
@@ -90,10 +92,17 @@ export async function $provideExecutionToolsForServer(): Promise<ExecutionTools>
90
92
  isCacheReloaded,
91
93
  }; /* <- TODO: ` satisfies PrepareAndScrapeOptions` */
92
94
  const fs = await $provideFilesystemForNode(prepareAndScrapeOptions);
93
- const { /* [0] strategy,*/ llm } = await $provideLlmToolsForCli({
95
+ const { /* [0] strategy,*/ llm: llmUncached } = await $provideLlmToolsForCli({
94
96
  cliOptions,
95
97
  ...prepareAndScrapeOptions,
96
98
  });
99
+
100
+ const llm = cacheLlmTools(llmUncached, {
101
+ storage: new SupabaseCacheStorage(),
102
+ isVerbose,
103
+ isCacheReloaded,
104
+ });
105
+
97
106
  const executables = await $provideExecutablesForNode(prepareAndScrapeOptions);
98
107
 
99
108
  executionTools = {
@@ -0,0 +1,55 @@
1
+ import { TODO_any } from '@promptbook-local/types';
2
+ import { $getTableName } from '../../database/$getTableName';
3
+ import { $provideSupabaseForServer } from '../../database/$provideSupabaseForServer';
4
+ import { Json } from '../../database/schema';
5
+
6
+ /**
7
+ * Storage for LLM cache using Supabase
8
+ */
9
+ export class SupabaseCacheStorage {
10
+ // implements PromptbookStorage<TODO_any>
11
+
12
+ /**
13
+ * Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
14
+ */
15
+ public async getItem(key: string): Promise<TODO_any | null> {
16
+ const supabase = $provideSupabaseForServer();
17
+ const tableName = await $getTableName('LlmCache');
18
+
19
+ const { data } = await supabase.from(tableName).select('value').eq('hash', key).maybeSingle();
20
+
21
+ if (!data) {
22
+ return null;
23
+ }
24
+
25
+ return data.value;
26
+ }
27
+
28
+ /**
29
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
30
+ */
31
+ public async setItem(key: string, value: TODO_any): Promise<void> {
32
+ const supabase = $provideSupabaseForServer();
33
+ const tableName = await $getTableName('LlmCache');
34
+
35
+ await supabase.from(tableName).upsert(
36
+ {
37
+ hash: key,
38
+ value: value as Json,
39
+ },
40
+ {
41
+ onConflict: 'hash',
42
+ },
43
+ );
44
+ }
45
+
46
+ /**
47
+ * Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists
48
+ */
49
+ public async removeItem(key: string): Promise<void> {
50
+ const supabase = $provideSupabaseForServer();
51
+ const tableName = await $getTableName('LlmCache');
52
+
53
+ await supabase.from(tableName).delete().eq('hash', key);
54
+ }
55
+ }
@@ -0,0 +1,63 @@
1
+ import { del, put } from '@vercel/blob';
2
+ import { validateMimeType } from '../../validators/validateMimeType';
3
+ import type { IFile, IIFilesStorageWithCdn } from '../interfaces/IFilesStorage';
4
+
5
+ type IVercelBlobStorageConfig = {
6
+ readonly token: string;
7
+ readonly cdnPublicUrl: URL;
8
+ readonly pathPrefix?: string;
9
+ // Note: Vercel Blob automatically handles compression/serving
10
+ };
11
+
12
+ export class VercelBlobStorage implements IIFilesStorageWithCdn {
13
+ public get cdnPublicUrl() {
14
+ return this.config.cdnPublicUrl;
15
+ }
16
+
17
+ public constructor(private readonly config: IVercelBlobStorageConfig) {}
18
+
19
+ public getItemUrl(key: string): URL {
20
+ const path = this.config.pathPrefix ? `${this.config.pathPrefix}/${key}` : key;
21
+ return new URL(path, this.cdnPublicUrl);
22
+ }
23
+
24
+ public async getItem(key: string): Promise<IFile | null> {
25
+ const url = this.getItemUrl(key);
26
+
27
+ const response = await fetch(url);
28
+
29
+ if (response.status === 404) {
30
+ return null;
31
+ }
32
+
33
+ if (!response.ok) {
34
+ throw new Error(`Failed to fetch blob from ${url}: ${response.statusText}`);
35
+ }
36
+
37
+ const arrayBuffer = await response.arrayBuffer();
38
+ const buffer = Buffer.from(arrayBuffer);
39
+ const contentType = response.headers.get('content-type') || 'application/octet-stream';
40
+
41
+ return {
42
+ type: validateMimeType(contentType),
43
+ data: buffer,
44
+ };
45
+ }
46
+
47
+ public async removeItem(key: string): Promise<void> {
48
+ const url = this.getItemUrl(key).toString();
49
+ await del(url, { token: this.config.token });
50
+ }
51
+
52
+ public async setItem(key: string, file: IFile): Promise<void> {
53
+ const path = this.config.pathPrefix ? `${this.config.pathPrefix}/${key}` : key;
54
+
55
+ await put(path, file.data, {
56
+ access: 'public',
57
+ addRandomSuffix: false,
58
+ contentType: file.type,
59
+ token: this.config.token,
60
+ // Note: We rely on Vercel Blob for compression
61
+ });
62
+ }
63
+ }
package/esm/index.es.js CHANGED
@@ -47,7 +47,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
47
47
  * @generated
48
48
  * @see https://github.com/webgptorg/promptbook
49
49
  */
50
- const PROMPTBOOK_ENGINE_VERSION = '0.103.0-53';
50
+ const PROMPTBOOK_ENGINE_VERSION = '0.103.0-54';
51
51
  /**
52
52
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
53
53
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -22535,6 +22535,12 @@ class ActionCommitmentDefinition extends BaseCommitmentDefinition {
22535
22535
  get description() {
22536
22536
  return 'Define agent capabilities and actions it can perform.';
22537
22537
  }
22538
+ /**
22539
+ * Icon for this commitment.
22540
+ */
22541
+ get icon() {
22542
+ return '⚡';
22543
+ }
22538
22544
  /**
22539
22545
  * Markdown documentation for ACTION commitment.
22540
22546
  */
@@ -22614,6 +22620,12 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
22614
22620
  get description() {
22615
22621
  return 'Remove or **disregard** certain information, context, or previous commitments.';
22616
22622
  }
22623
+ /**
22624
+ * Icon for this commitment.
22625
+ */
22626
+ get icon() {
22627
+ return 'đŸ—‘ī¸';
22628
+ }
22617
22629
  /**
22618
22630
  * Markdown documentation for DELETE commitment.
22619
22631
  */
@@ -22730,6 +22742,12 @@ class FormatCommitmentDefinition extends BaseCommitmentDefinition {
22730
22742
  get description() {
22731
22743
  return 'Specify output structure or formatting requirements.';
22732
22744
  }
22745
+ /**
22746
+ * Icon for this commitment.
22747
+ */
22748
+ get icon() {
22749
+ return '📜';
22750
+ }
22733
22751
  /**
22734
22752
  * Markdown documentation for FORMAT commitment.
22735
22753
  */
@@ -22805,6 +22823,12 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
22805
22823
  get description() {
22806
22824
  return 'Define main **goals** the AI assistant should achieve, with later goals having higher priority.';
22807
22825
  }
22826
+ /**
22827
+ * Icon for this commitment.
22828
+ */
22829
+ get icon() {
22830
+ return 'đŸŽ¯';
22831
+ }
22808
22832
  /**
22809
22833
  * Markdown documentation for GOAL commitment.
22810
22834
  */
@@ -22901,6 +22925,12 @@ class KnowledgeCommitmentDefinition extends BaseCommitmentDefinition {
22901
22925
  get description() {
22902
22926
  return 'Add domain **knowledge** via direct text or external sources (RAG).';
22903
22927
  }
22928
+ /**
22929
+ * Icon for this commitment.
22930
+ */
22931
+ get icon() {
22932
+ return '🧠';
22933
+ }
22904
22934
  /**
22905
22935
  * Markdown documentation for KNOWLEDGE commitment.
22906
22936
  */
@@ -23002,6 +23032,12 @@ class MemoryCommitmentDefinition extends BaseCommitmentDefinition {
23002
23032
  get description() {
23003
23033
  return 'Remember past interactions and user **preferences** for personalized responses.';
23004
23034
  }
23035
+ /**
23036
+ * Icon for this commitment.
23037
+ */
23038
+ get icon() {
23039
+ return '🧠';
23040
+ }
23005
23041
  /**
23006
23042
  * Markdown documentation for MEMORY commitment.
23007
23043
  */
@@ -23100,6 +23136,12 @@ class AgentMessageCommitmentDefinition extends BaseCommitmentDefinition {
23100
23136
  get description() {
23101
23137
  return 'Defines a **message from the agent** in the conversation history.';
23102
23138
  }
23139
+ /**
23140
+ * Icon for this commitment.
23141
+ */
23142
+ get icon() {
23143
+ return '🤖';
23144
+ }
23103
23145
  /**
23104
23146
  * Markdown documentation for AGENT MESSAGE commitment.
23105
23147
  */
@@ -23171,6 +23213,12 @@ class InitialMessageCommitmentDefinition extends BaseCommitmentDefinition {
23171
23213
  get description() {
23172
23214
  return 'Defines the **initial message** shown to the user when the chat starts.';
23173
23215
  }
23216
+ /**
23217
+ * Icon for this commitment.
23218
+ */
23219
+ get icon() {
23220
+ return '👋';
23221
+ }
23174
23222
  /**
23175
23223
  * Markdown documentation for INITIAL MESSAGE commitment.
23176
23224
  */
@@ -23229,6 +23277,12 @@ class MessageCommitmentDefinition extends BaseCommitmentDefinition {
23229
23277
  get description() {
23230
23278
  return 'Include actual **messages** the AI assistant has sent during conversation history.';
23231
23279
  }
23280
+ /**
23281
+ * Icon for this commitment.
23282
+ */
23283
+ get icon() {
23284
+ return 'đŸ’Ŧ';
23285
+ }
23232
23286
  /**
23233
23287
  * Markdown documentation for MESSAGE commitment.
23234
23288
  */
@@ -23335,6 +23389,12 @@ class UserMessageCommitmentDefinition extends BaseCommitmentDefinition {
23335
23389
  get description() {
23336
23390
  return 'Defines a **message from the user** in the conversation history.';
23337
23391
  }
23392
+ /**
23393
+ * Icon for this commitment.
23394
+ */
23395
+ get icon() {
23396
+ return '🧑';
23397
+ }
23338
23398
  /**
23339
23399
  * Markdown documentation for USER MESSAGE commitment.
23340
23400
  */
@@ -23408,6 +23468,12 @@ class MetaCommitmentDefinition extends BaseCommitmentDefinition {
23408
23468
  get description() {
23409
23469
  return 'Set meta-information about the agent (IMAGE, LINK, TITLE, DESCRIPTION, etc.).';
23410
23470
  }
23471
+ /**
23472
+ * Icon for this commitment.
23473
+ */
23474
+ get icon() {
23475
+ return 'â„šī¸';
23476
+ }
23411
23477
  /**
23412
23478
  * Markdown documentation for META commitment.
23413
23479
  */
@@ -23535,6 +23601,12 @@ class MetaColorCommitmentDefinition extends BaseCommitmentDefinition {
23535
23601
  get description() {
23536
23602
  return "Set the agent's accent color.";
23537
23603
  }
23604
+ /**
23605
+ * Icon for this commitment.
23606
+ */
23607
+ get icon() {
23608
+ return '🎨';
23609
+ }
23538
23610
  /**
23539
23611
  * Markdown documentation for META COLOR commitment.
23540
23612
  */
@@ -23613,6 +23685,12 @@ class MetaImageCommitmentDefinition extends BaseCommitmentDefinition {
23613
23685
  get description() {
23614
23686
  return "Set the agent's profile image URL.";
23615
23687
  }
23688
+ /**
23689
+ * Icon for this commitment.
23690
+ */
23691
+ get icon() {
23692
+ return 'đŸ–ŧī¸';
23693
+ }
23616
23694
  /**
23617
23695
  * Markdown documentation for META IMAGE commitment.
23618
23696
  */
@@ -23703,6 +23781,12 @@ class ModelCommitmentDefinition extends BaseCommitmentDefinition {
23703
23781
  get description() {
23704
23782
  return 'Enforce AI model requirements including name and technical parameters.';
23705
23783
  }
23784
+ /**
23785
+ * Icon for this commitment.
23786
+ */
23787
+ get icon() {
23788
+ return 'âš™ī¸';
23789
+ }
23706
23790
  /**
23707
23791
  * Markdown documentation for MODEL commitment.
23708
23792
  */
@@ -23938,6 +24022,12 @@ class NoteCommitmentDefinition extends BaseCommitmentDefinition {
23938
24022
  get description() {
23939
24023
  return 'Add developer-facing notes without changing behavior or output.';
23940
24024
  }
24025
+ /**
24026
+ * Icon for this commitment.
24027
+ */
24028
+ get icon() {
24029
+ return '📝';
24030
+ }
23941
24031
  /**
23942
24032
  * Markdown documentation for NOTE commitment.
23943
24033
  */
@@ -24040,6 +24130,12 @@ class PersonaCommitmentDefinition extends BaseCommitmentDefinition {
24040
24130
  get description() {
24041
24131
  return 'Define who the agent is: background, expertise, and personality.';
24042
24132
  }
24133
+ /**
24134
+ * Icon for this commitment.
24135
+ */
24136
+ get icon() {
24137
+ return '👤';
24138
+ }
24043
24139
  /**
24044
24140
  * Markdown documentation for PERSONA commitment.
24045
24141
  */
@@ -24167,6 +24263,12 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
24167
24263
  get description() {
24168
24264
  return 'Add behavioral rules the agent must follow.';
24169
24265
  }
24266
+ /**
24267
+ * Icon for this commitment.
24268
+ */
24269
+ get icon() {
24270
+ return 'âš–ī¸';
24271
+ }
24170
24272
  /**
24171
24273
  * Markdown documentation for RULE/RULES commitment.
24172
24274
  */
@@ -24243,6 +24345,12 @@ class SampleCommitmentDefinition extends BaseCommitmentDefinition {
24243
24345
  get description() {
24244
24346
  return 'Provide example responses to guide behavior.';
24245
24347
  }
24348
+ /**
24349
+ * Icon for this commitment.
24350
+ */
24351
+ get icon() {
24352
+ return '🔍';
24353
+ }
24246
24354
  /**
24247
24355
  * Markdown documentation for SAMPLE/EXAMPLE commitment.
24248
24356
  */
@@ -24320,6 +24428,12 @@ class ScenarioCommitmentDefinition extends BaseCommitmentDefinition {
24320
24428
  get description() {
24321
24429
  return 'Define specific **situations** or contexts for AI responses, with later scenarios having higher priority.';
24322
24430
  }
24431
+ /**
24432
+ * Icon for this commitment.
24433
+ */
24434
+ get icon() {
24435
+ return '🎭';
24436
+ }
24323
24437
  /**
24324
24438
  * Markdown documentation for SCENARIO commitment.
24325
24439
  */
@@ -24436,6 +24550,12 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
24436
24550
  get description() {
24437
24551
  return 'Control the tone and writing style of responses.';
24438
24552
  }
24553
+ /**
24554
+ * Icon for this commitment.
24555
+ */
24556
+ get icon() {
24557
+ return 'đŸ–‹ī¸';
24558
+ }
24439
24559
  /**
24440
24560
  * Markdown documentation for STYLE commitment.
24441
24561
  */
@@ -24505,6 +24625,12 @@ class NotYetImplementedCommitmentDefinition extends BaseCommitmentDefinition {
24505
24625
  get description() {
24506
24626
  return 'Placeholder commitment that appends content verbatim to the system message.';
24507
24627
  }
24628
+ /**
24629
+ * Icon for this commitment.
24630
+ */
24631
+ get icon() {
24632
+ return '🚧';
24633
+ }
24508
24634
  /**
24509
24635
  * Markdown documentation available at runtime.
24510
24636
  */