@codebolt/narrative 1.11.0 → 1.12.5

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.
@@ -1,5 +1,5 @@
1
1
  import { NarrativeTransport } from '../transport';
2
- import { CreateSnapshotParams, CreateSnapshotResult, SnapshotIdParam, CreateArchiveResult, ImportArchiveParams, ImportArchiveResult, ExportBundleParams, ExportBundleResult, AddBundleParams, AddBundleResult, BrowseSnapshotParams, BrowseResult, MergeSnapshotParams, MergeSnapshotResult, AddCommitParams, AddCommitResult, CheckRecoveryParams, RecoveryCheck, CheckoutSnapshotParams, CheckoutResult, DeleteResult, PruneSnapshotsParams, PruneResult } from '../types/snapshot';
2
+ import { CreateSnapshotParams, CreateSnapshotResult, SnapshotIdParam, CreateArchiveResult, ImportArchiveParams, ImportArchiveResult, ExportBundleParams, ExportBundleResult, AddBundleParams, AddBundleResult, BrowseSnapshotParams, BrowseResult, MergeSnapshotParams, MergeSnapshotResult, CheckSnapshotConflictsParams, CheckConflictsResult, AddCommitParams, AddCommitResult, CheckRecoveryParams, RecoveryCheck, CheckoutSnapshotParams, CheckoutResult, DeleteResult, PruneSnapshotsParams, PruneResult, ExportUnifiedBundleParams, ExportUnifiedBundleResult, ImportUnifiedBundleParams, ImportUnifiedBundleResult } from '../types/snapshot';
3
3
  export declare class SnapshotApi {
4
4
  private readonly transport;
5
5
  constructor(transport: NarrativeTransport);
@@ -10,9 +10,12 @@ export declare class SnapshotApi {
10
10
  addSnapshotBundle(params: AddBundleParams): Promise<AddBundleResult>;
11
11
  browseSnapshot(params: BrowseSnapshotParams): Promise<BrowseResult>;
12
12
  mergeSnapshot(params: MergeSnapshotParams): Promise<MergeSnapshotResult>;
13
+ checkSnapshotConflicts(params: CheckSnapshotConflictsParams): Promise<CheckConflictsResult>;
13
14
  addCommit(params: AddCommitParams): Promise<AddCommitResult>;
14
15
  checkSnapshotRecovery(params: CheckRecoveryParams): Promise<RecoveryCheck>;
15
16
  checkoutSnapshot(params: CheckoutSnapshotParams): Promise<CheckoutResult>;
16
17
  deleteSnapshot(params: SnapshotIdParam): Promise<DeleteResult>;
17
18
  pruneSnapshots(params?: PruneSnapshotsParams): Promise<PruneResult>;
19
+ exportUnifiedBundle(params: ExportUnifiedBundleParams): Promise<ExportUnifiedBundleResult>;
20
+ importUnifiedBundle(params: ImportUnifiedBundleParams): Promise<ImportUnifiedBundleResult>;
18
21
  }
@@ -26,6 +26,9 @@ class SnapshotApi {
26
26
  async mergeSnapshot(params) {
27
27
  return this.transport.request('mergeSnapshot', params);
28
28
  }
29
+ async checkSnapshotConflicts(params) {
30
+ return this.transport.request('checkSnapshotConflicts', params);
31
+ }
29
32
  async addCommit(params) {
30
33
  return this.transport.request('addCommit', params);
31
34
  }
@@ -41,5 +44,11 @@ class SnapshotApi {
41
44
  async pruneSnapshots(params = {}) {
42
45
  return this.transport.request('pruneSnapshots', params);
43
46
  }
47
+ async exportUnifiedBundle(params) {
48
+ return this.transport.request('exportUnifiedBundle', params);
49
+ }
50
+ async importUnifiedBundle(params) {
51
+ return this.transport.request('importUnifiedBundle', params);
52
+ }
44
53
  }
45
54
  exports.SnapshotApi = SnapshotApi;
@@ -79,6 +79,22 @@ export interface MergeSnapshotResult {
79
79
  conflicts: string[];
80
80
  applied_to_workspace: boolean;
81
81
  }
82
+ export interface CheckSnapshotConflictsParams {
83
+ snapshot_id: string;
84
+ strategy: MergeStrategy;
85
+ }
86
+ export interface ConflictDetail {
87
+ path: string;
88
+ conflict_type: string;
89
+ ancestor_content: string | null;
90
+ ours_content: string | null;
91
+ theirs_content: string | null;
92
+ }
93
+ export interface CheckConflictsResult {
94
+ has_conflicts: boolean;
95
+ conflicts: ConflictDetail[];
96
+ merged_tree_hash: string;
97
+ }
82
98
  export interface AddCommitParams {
83
99
  thread_id: string;
84
100
  message: string;
@@ -126,3 +142,30 @@ export interface PruneResult {
126
142
  pruned_count: number;
127
143
  pruned_ids: string[];
128
144
  }
145
+ export interface ExportUnifiedBundleParams {
146
+ snapshot_id: string;
147
+ incremental?: boolean;
148
+ base_snapshot_id?: string;
149
+ }
150
+ export interface NarrativeDataSummary {
151
+ snapshots_count: number;
152
+ commits_count: number;
153
+ execution_traces_count: number;
154
+ trace_records_count: number;
155
+ agent_runs_count: number;
156
+ }
157
+ export interface ExportUnifiedBundleResult {
158
+ bundle_path: string;
159
+ snapshot_id: string;
160
+ base_snapshot_id: string | null;
161
+ narrative_summary: NarrativeDataSummary;
162
+ }
163
+ export interface ImportUnifiedBundleParams {
164
+ bundle_path: string;
165
+ }
166
+ export interface ImportUnifiedBundleResult {
167
+ imported_refs: [string, string][];
168
+ snapshot_ids: string[];
169
+ narrative_imported: boolean;
170
+ narrative_summary: NarrativeDataSummary;
171
+ }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@codebolt/narrative",
3
- "version": "1.11.0",
3
+ "version": "1.12.5",
4
4
  "description": "TypeScript client for the Codebolt Narrative Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "build:native": "node ../codeboltNarrative/scripts/build-platform-pkg.js",
9
+ "build:all": "tsc && npm run build:native",
10
+ "build:native": "node ../codeboltNarrative/scripts/build.js",
10
11
  "clean": "rm -rf dist"
11
12
  },
12
13
  "engines": {
@@ -16,11 +17,11 @@
16
17
  "dist/**/*"
17
18
  ],
18
19
  "optionalDependencies": {
19
- "@codebolt/narrative-darwin-arm64": "1.11.0",
20
- "@codebolt/narrative-darwin-x64": "1.11.0",
21
- "@codebolt/narrative-linux-x64": "1.11.0",
22
- "@codebolt/narrative-linux-arm64": "1.11.0",
23
- "@codebolt/narrative-win32-x64": "1.11.0"
20
+ "@codebolt/narrative-darwin-arm64": "1.12.5",
21
+ "@codebolt/narrative-darwin-x64": "1.12.5",
22
+ "@codebolt/narrative-linux-x64": "1.12.5",
23
+ "@codebolt/narrative-linux-arm64": "1.12.5",
24
+ "@codebolt/narrative-win32-x64": "1.12.5"
24
25
  },
25
26
  "license": "MIT"
26
27
  }