@promptbook/remote-server 0.112.0-41 → 0.112.0-42

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.
package/esm/index.es.js CHANGED
@@ -40,7 +40,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
40
40
  * @generated
41
41
  * @see https://github.com/webgptorg/promptbook
42
42
  */
43
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-41';
43
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-42';
44
44
  /**
45
45
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
46
46
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -0,0 +1 @@
1
+ export {};
@@ -4,23 +4,11 @@ import type { string_book } from '../../../../book-2.0/agent-source/string_book'
4
4
  import type { string_agent_name, string_agent_permanent_id } from '../../../../types/typeAliases';
5
5
  import { AgentCollectionInSupabaseOptions } from './AgentCollectionInSupabaseOptions';
6
6
  import type { AgentsDatabaseSchema } from './AgentsDatabaseSchema';
7
+ import { type CreateAgentPersistenceRecordsOptions } from './createAgentPersistenceRecords';
7
8
  /**
8
9
  * Options for creating a new agent entry.
9
10
  */
10
- type CreateAgentOptions = {
11
- /**
12
- * Visibility for the new agent.
13
- */
14
- readonly visibility?: 'PRIVATE' | 'UNLISTED' | 'PUBLIC';
15
- /**
16
- * Folder identifier to assign the new agent to.
17
- */
18
- readonly folderId?: number | null;
19
- /**
20
- * Sort order for the agent within its parent folder.
21
- */
22
- readonly sortOrder?: number;
23
- };
11
+ type CreateAgentOptions = CreateAgentPersistenceRecordsOptions;
24
12
  /**
25
13
  * Optional controls for persisting one source update.
26
14
  */
@@ -0,0 +1,40 @@
1
+ import type { AgentBasicInformation } from '../../../../book-2.0/agent-source/AgentBasicInformation';
2
+ import type { string_book } from '../../../../book-2.0/agent-source/string_book';
3
+ import type { CreateAgentInput } from '../../CreateAgentInput';
4
+ import type { AgentsDatabaseSchema } from './AgentsDatabaseSchema';
5
+ /**
6
+ * Optional persistence overrides for one new agent row.
7
+ *
8
+ * @private shared persistence helper for `AgentCollectionInSupabase`
9
+ */
10
+ export type CreateAgentPersistenceRecordsOptions = Omit<CreateAgentInput, 'source'>;
11
+ /**
12
+ * Prepared insert rows and returned profile for one newly persisted agent.
13
+ *
14
+ * @private shared persistence helper for `AgentCollectionInSupabase`
15
+ */
16
+ export type CreateAgentPersistenceRecordsResult = {
17
+ /**
18
+ * Parsed created agent profile including the resolved permanent id.
19
+ */
20
+ readonly createdAgent: AgentBasicInformation & Required<Pick<AgentBasicInformation, 'permanentId'>>;
21
+ /**
22
+ * Insert row for the `Agent` table.
23
+ */
24
+ readonly agentInsertRecord: AgentsDatabaseSchema['public']['Tables']['Agent']['Insert'];
25
+ /**
26
+ * Insert row for the `AgentHistory` table.
27
+ */
28
+ readonly agentHistoryInsertRecord: AgentsDatabaseSchema['public']['Tables']['AgentHistory']['Insert'];
29
+ };
30
+ /**
31
+ * Builds normalized insert rows for a newly created persisted agent.
32
+ *
33
+ * @param agentSource - Source content of the agent.
34
+ * @param options - Optional folder placement, ordering, and visibility overrides.
35
+ * @param createdAt - Shared creation timestamp used across all persisted rows.
36
+ * @returns Insert rows and the created agent profile.
37
+ *
38
+ * @private shared persistence helper for `AgentCollectionInSupabase`
39
+ */
40
+ export declare function createAgentPersistenceRecords(agentSource: string_book, options?: CreateAgentPersistenceRecordsOptions, createdAt?: string): CreateAgentPersistenceRecordsResult;
@@ -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-40`).
18
+ * It follows semantic versioning (e.g., `0.112.0-41`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-server",
3
- "version": "0.112.0-41",
3
+ "version": "0.112.0-42",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -98,7 +98,7 @@
98
98
  "module": "./esm/index.es.js",
99
99
  "typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
100
100
  "peerDependencies": {
101
- "@promptbook/core": "0.112.0-41"
101
+ "@promptbook/core": "0.112.0-42"
102
102
  },
103
103
  "dependencies": {
104
104
  "@mozilla/readability": "0.6.0",
package/umd/index.umd.js CHANGED
@@ -50,7 +50,7 @@
50
50
  * @generated
51
51
  * @see https://github.com/webgptorg/promptbook
52
52
  */
53
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-41';
53
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-42';
54
54
  /**
55
55
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
56
56
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -0,0 +1 @@
1
+ export {};
@@ -4,23 +4,11 @@ import type { string_book } from '../../../../book-2.0/agent-source/string_book'
4
4
  import type { string_agent_name, string_agent_permanent_id } from '../../../../types/typeAliases';
5
5
  import { AgentCollectionInSupabaseOptions } from './AgentCollectionInSupabaseOptions';
6
6
  import type { AgentsDatabaseSchema } from './AgentsDatabaseSchema';
7
+ import { type CreateAgentPersistenceRecordsOptions } from './createAgentPersistenceRecords';
7
8
  /**
8
9
  * Options for creating a new agent entry.
9
10
  */
10
- type CreateAgentOptions = {
11
- /**
12
- * Visibility for the new agent.
13
- */
14
- readonly visibility?: 'PRIVATE' | 'UNLISTED' | 'PUBLIC';
15
- /**
16
- * Folder identifier to assign the new agent to.
17
- */
18
- readonly folderId?: number | null;
19
- /**
20
- * Sort order for the agent within its parent folder.
21
- */
22
- readonly sortOrder?: number;
23
- };
11
+ type CreateAgentOptions = CreateAgentPersistenceRecordsOptions;
24
12
  /**
25
13
  * Optional controls for persisting one source update.
26
14
  */
@@ -0,0 +1,40 @@
1
+ import type { AgentBasicInformation } from '../../../../book-2.0/agent-source/AgentBasicInformation';
2
+ import type { string_book } from '../../../../book-2.0/agent-source/string_book';
3
+ import type { CreateAgentInput } from '../../CreateAgentInput';
4
+ import type { AgentsDatabaseSchema } from './AgentsDatabaseSchema';
5
+ /**
6
+ * Optional persistence overrides for one new agent row.
7
+ *
8
+ * @private shared persistence helper for `AgentCollectionInSupabase`
9
+ */
10
+ export type CreateAgentPersistenceRecordsOptions = Omit<CreateAgentInput, 'source'>;
11
+ /**
12
+ * Prepared insert rows and returned profile for one newly persisted agent.
13
+ *
14
+ * @private shared persistence helper for `AgentCollectionInSupabase`
15
+ */
16
+ export type CreateAgentPersistenceRecordsResult = {
17
+ /**
18
+ * Parsed created agent profile including the resolved permanent id.
19
+ */
20
+ readonly createdAgent: AgentBasicInformation & Required<Pick<AgentBasicInformation, 'permanentId'>>;
21
+ /**
22
+ * Insert row for the `Agent` table.
23
+ */
24
+ readonly agentInsertRecord: AgentsDatabaseSchema['public']['Tables']['Agent']['Insert'];
25
+ /**
26
+ * Insert row for the `AgentHistory` table.
27
+ */
28
+ readonly agentHistoryInsertRecord: AgentsDatabaseSchema['public']['Tables']['AgentHistory']['Insert'];
29
+ };
30
+ /**
31
+ * Builds normalized insert rows for a newly created persisted agent.
32
+ *
33
+ * @param agentSource - Source content of the agent.
34
+ * @param options - Optional folder placement, ordering, and visibility overrides.
35
+ * @param createdAt - Shared creation timestamp used across all persisted rows.
36
+ * @returns Insert rows and the created agent profile.
37
+ *
38
+ * @private shared persistence helper for `AgentCollectionInSupabase`
39
+ */
40
+ export declare function createAgentPersistenceRecords(agentSource: string_book, options?: CreateAgentPersistenceRecordsOptions, createdAt?: string): CreateAgentPersistenceRecordsResult;
@@ -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-40`).
18
+ * It follows semantic versioning (e.g., `0.112.0-41`).
19
19
  *
20
20
  * @generated
21
21
  */