@syntero/orca-cli 1.2.5 → 1.2.7
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/dist/components/ChatApp.js +2 -2
- package/dist/components/ChatApp.js.map +1 -1
- package/dist/components/InputFooter.d.ts +3 -3
- package/dist/components/InputFooter.d.ts.map +1 -1
- package/dist/components/InputFooter.js +3 -3
- package/dist/components/InputFooter.js.map +1 -1
- package/dist/components/SyncMenu.d.ts +4 -4
- package/dist/components/SyncMenu.d.ts.map +1 -1
- package/dist/components/SyncMenu.js +26 -26
- package/dist/components/SyncMenu.js.map +1 -1
- package/dist/hooks/useInputDispatch.js +1 -1
- package/dist/hooks/useInputDispatch.js.map +1 -1
- package/dist/hooks/useSyncFetchers.d.ts +1 -1
- package/dist/hooks/useSyncFetchers.d.ts.map +1 -1
- package/dist/hooks/useSyncFetchers.js +8 -9
- package/dist/hooks/useSyncFetchers.js.map +1 -1
- package/dist/sync/download.d.ts +0 -27
- package/dist/sync/download.d.ts.map +1 -1
- package/dist/sync/download.js +2 -54
- package/dist/sync/download.js.map +1 -1
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/manifest.d.ts +3 -37
- package/dist/sync/manifest.d.ts.map +1 -1
- package/dist/sync/manifest.js +13 -47
- package/dist/sync/manifest.js.map +1 -1
- package/dist/sync/progress.d.ts +3 -84
- package/dist/sync/progress.d.ts.map +1 -1
- package/dist/sync/progress.js +32 -71
- package/dist/sync/progress.js.map +1 -1
- package/dist/sync/sync-engine.d.ts +4 -4
- package/dist/sync/sync-engine.d.ts.map +1 -1
- package/dist/sync/sync-engine.js +79 -185
- package/dist/sync/sync-engine.js.map +1 -1
- package/dist/types/sync.d.ts +37 -119
- package/dist/types/sync.d.ts.map +1 -1
- package/dist/types/sync.js +3 -1
- package/dist/types/sync.js.map +1 -1
- package/package.json +1 -1
package/dist/types/sync.d.ts
CHANGED
|
@@ -1,64 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Sync Types - TypeScript interfaces for library sync
|
|
2
|
+
* Sync Types - TypeScript interfaces for file-based library sync.
|
|
3
|
+
*
|
|
4
|
+
* All sync operations work on flat file lists — no solution abstraction.
|
|
3
5
|
*/
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
7
|
+
* A single file entry from the remote manifest.
|
|
6
8
|
*/
|
|
7
9
|
export interface FileEntry {
|
|
8
|
-
/** Relative path from
|
|
10
|
+
/** Relative path from base_path (e.g., "demo-testing/server.py") */
|
|
9
11
|
path: string;
|
|
10
|
-
/** SHA-256 hash of file content */
|
|
12
|
+
/** SHA-256 hash of file content (prefixed with "sha256:") */
|
|
11
13
|
hash: string;
|
|
12
14
|
/** File size in bytes */
|
|
13
15
|
size: number;
|
|
14
|
-
/** Last modified timestamp (ISO 8601) */
|
|
15
|
-
modified: string;
|
|
16
|
-
/** File type: 'file' | 'symlink' */
|
|
17
|
-
type: 'file' | 'symlink';
|
|
18
|
-
/** For symlinks: target path */
|
|
19
|
-
target?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Service registration info for a solution.
|
|
23
|
-
*/
|
|
24
|
-
export interface ServiceInfo {
|
|
25
|
-
name: string;
|
|
26
|
-
functions: string[];
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Information about a single solution in the library.
|
|
30
|
-
*/
|
|
31
|
-
export interface SolutionEntry {
|
|
32
|
-
/** Library ID (directory name) */
|
|
33
|
-
library_id: string;
|
|
34
|
-
/** Solution name from manifest */
|
|
35
|
-
name: string;
|
|
36
|
-
/** Solution description */
|
|
37
|
-
description?: string;
|
|
38
|
-
/** Category for organization */
|
|
39
|
-
category?: string;
|
|
40
|
-
/** Tags for searchability */
|
|
41
|
-
tags?: string[];
|
|
42
|
-
/** Author user ID */
|
|
43
|
-
author_id: string;
|
|
44
|
-
/** Author display name */
|
|
45
|
-
author_name: string;
|
|
46
|
-
/** When published/updated (ISO 8601) */
|
|
47
|
-
published_at: string;
|
|
48
|
-
/** All files in this solution */
|
|
49
|
-
files: FileEntry[];
|
|
50
|
-
/** Total size of all files */
|
|
51
|
-
total_size: number;
|
|
52
|
-
/** Number of files */
|
|
53
|
-
file_count: number;
|
|
54
|
-
/** Combined hash of all file hashes (for quick change detection) */
|
|
55
|
-
solution_hash: string;
|
|
56
|
-
/** Service registration info if exposed */
|
|
57
|
-
service?: ServiceInfo;
|
|
58
|
-
/** Dependencies (library_id references) */
|
|
59
|
-
dependencies?: {
|
|
60
|
-
library_id: string;
|
|
61
|
-
}[];
|
|
62
16
|
}
|
|
63
17
|
/**
|
|
64
18
|
* Service entry in the services registry.
|
|
@@ -75,71 +29,51 @@ export interface ServiceEntry {
|
|
|
75
29
|
*/
|
|
76
30
|
export type ServicesRegistry = Record<string, ServiceEntry>;
|
|
77
31
|
/**
|
|
78
|
-
*
|
|
32
|
+
* Complete file manifest from backend (v2 — flat file list).
|
|
79
33
|
*/
|
|
80
|
-
export interface
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
total_size: number;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Complete library manifest from backend.
|
|
87
|
-
*/
|
|
88
|
-
export interface RemoteLibraryManifest {
|
|
89
|
-
/** Manifest format version (for future compatibility) */
|
|
90
|
-
version: 1;
|
|
34
|
+
export interface RemoteManifest {
|
|
35
|
+
/** Manifest format version */
|
|
36
|
+
version: number;
|
|
91
37
|
/** Timestamp when manifest was generated (ISO 8601) */
|
|
92
38
|
generated_at: string;
|
|
93
39
|
/** Organization ID */
|
|
94
40
|
org_id: string;
|
|
95
41
|
/** Backend endpoint that generated this */
|
|
96
42
|
endpoint: string;
|
|
97
|
-
/**
|
|
98
|
-
|
|
43
|
+
/** Base path that was scanned */
|
|
44
|
+
base_path: string;
|
|
45
|
+
/** All files under base_path */
|
|
46
|
+
files: FileEntry[];
|
|
99
47
|
/** Services registry content */
|
|
100
48
|
services_registry: ServicesRegistry;
|
|
101
|
-
/** Total
|
|
102
|
-
stats:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Local solution entry with sync status.
|
|
108
|
-
*/
|
|
109
|
-
export interface LocalSolutionEntry {
|
|
110
|
-
/** Library ID */
|
|
111
|
-
library_id: string;
|
|
112
|
-
/** Solution hash at time of sync */
|
|
113
|
-
solution_hash: string;
|
|
114
|
-
/** When this solution was last synced */
|
|
115
|
-
synced_at: string;
|
|
116
|
-
/** Files with their synced hashes */
|
|
117
|
-
files: {
|
|
118
|
-
path: string;
|
|
119
|
-
hash: string;
|
|
120
|
-
size: number;
|
|
121
|
-
}[];
|
|
122
|
-
/** Sync status for this solution */
|
|
123
|
-
status: 'complete' | 'partial' | 'pending';
|
|
124
|
-
/** If partial, which files still need sync */
|
|
125
|
-
pending_files?: string[];
|
|
49
|
+
/** Total statistics */
|
|
50
|
+
stats: {
|
|
51
|
+
total_files: number;
|
|
52
|
+
total_size: number;
|
|
53
|
+
};
|
|
126
54
|
}
|
|
127
55
|
/**
|
|
128
|
-
* Local sync manifest
|
|
56
|
+
* Local sync manifest — tracks what we last synced.
|
|
129
57
|
*/
|
|
130
58
|
export interface LocalSyncManifest {
|
|
131
59
|
/** Manifest format version */
|
|
132
|
-
version:
|
|
60
|
+
version: number;
|
|
133
61
|
/** When this manifest was last updated */
|
|
134
62
|
updated_at: string;
|
|
135
63
|
/** Organization ID this is synced from */
|
|
136
64
|
org_id: string;
|
|
137
65
|
/** Backend endpoint this was synced from */
|
|
138
66
|
endpoint: string;
|
|
67
|
+
/** Base path that was synced */
|
|
68
|
+
base_path: string;
|
|
139
69
|
/** ETag from last manifest fetch (for caching) */
|
|
140
70
|
remote_etag?: string;
|
|
141
|
-
/**
|
|
142
|
-
|
|
71
|
+
/** Files that have been synced with their hashes */
|
|
72
|
+
files: {
|
|
73
|
+
path: string;
|
|
74
|
+
hash: string;
|
|
75
|
+
size: number;
|
|
76
|
+
}[];
|
|
143
77
|
/** Services registry (copy of remote) */
|
|
144
78
|
services_registry: ServicesRegistry;
|
|
145
79
|
}
|
|
@@ -151,8 +85,7 @@ export type SyncStatus = 'idle' | 'in_progress' | 'interrupted' | 'error';
|
|
|
151
85
|
* Current operation being performed.
|
|
152
86
|
*/
|
|
153
87
|
export interface CurrentOperation {
|
|
154
|
-
type: 'manifest' | '
|
|
155
|
-
solution_id?: string;
|
|
88
|
+
type: 'manifest' | 'file';
|
|
156
89
|
file_path?: string;
|
|
157
90
|
progress: number;
|
|
158
91
|
}
|
|
@@ -160,13 +93,11 @@ export interface CurrentOperation {
|
|
|
160
93
|
* Pending queue for resumable syncs.
|
|
161
94
|
*/
|
|
162
95
|
export interface PendingQueue {
|
|
163
|
-
solutions_to_sync: string[];
|
|
164
96
|
files_to_download: {
|
|
165
|
-
solution: string;
|
|
166
97
|
path: string;
|
|
167
98
|
hash: string;
|
|
168
99
|
}[];
|
|
169
|
-
|
|
100
|
+
files_to_delete: string[];
|
|
170
101
|
}
|
|
171
102
|
/**
|
|
172
103
|
* Last error information.
|
|
@@ -174,7 +105,6 @@ export interface PendingQueue {
|
|
|
174
105
|
export interface LastError {
|
|
175
106
|
message: string;
|
|
176
107
|
timestamp: string;
|
|
177
|
-
solution_id?: string;
|
|
178
108
|
file_path?: string;
|
|
179
109
|
}
|
|
180
110
|
/**
|
|
@@ -220,10 +150,12 @@ export interface SyncOptions {
|
|
|
220
150
|
backup?: boolean;
|
|
221
151
|
/** Keep locally modified files */
|
|
222
152
|
skipModified?: boolean;
|
|
223
|
-
/** Sync only
|
|
224
|
-
|
|
153
|
+
/** Sync only paths matching these prefixes (e.g. ["demo-testing", "bom-analyzer"]) */
|
|
154
|
+
pathFilter?: string[];
|
|
225
155
|
/** Override org_id (super_admin cross-org sync) */
|
|
226
156
|
orgId?: string;
|
|
157
|
+
/** Base path to sync from (default: /workspace/library) */
|
|
158
|
+
basePath?: string;
|
|
227
159
|
}
|
|
228
160
|
/**
|
|
229
161
|
* Sync result returned by SyncEngine.
|
|
@@ -231,17 +163,13 @@ export interface SyncOptions {
|
|
|
231
163
|
export interface SyncResult {
|
|
232
164
|
success: boolean;
|
|
233
165
|
stats: {
|
|
234
|
-
newSolutions: number;
|
|
235
|
-
updatedSolutions: number;
|
|
236
|
-
deletedSolutions: number;
|
|
237
166
|
filesDownloaded: number;
|
|
238
167
|
filesDeleted: number;
|
|
239
168
|
bytesDownloaded: number;
|
|
240
169
|
durationMs: number;
|
|
241
170
|
};
|
|
242
171
|
errors: {
|
|
243
|
-
|
|
244
|
-
file?: string;
|
|
172
|
+
path: string;
|
|
245
173
|
error: string;
|
|
246
174
|
}[];
|
|
247
175
|
}
|
|
@@ -249,17 +177,8 @@ export interface SyncResult {
|
|
|
249
177
|
* Sync plan calculated by comparing manifests.
|
|
250
178
|
*/
|
|
251
179
|
export interface SyncPlan {
|
|
252
|
-
|
|
253
|
-
modifiedSolutions: string[];
|
|
254
|
-
deletedSolutions: string[];
|
|
255
|
-
filesToDownload: {
|
|
256
|
-
solution: string;
|
|
257
|
-
path: string;
|
|
258
|
-
hash: string;
|
|
259
|
-
size: number;
|
|
260
|
-
}[];
|
|
180
|
+
filesToDownload: FileEntry[];
|
|
261
181
|
filesToDelete: {
|
|
262
|
-
solution: string;
|
|
263
182
|
path: string;
|
|
264
183
|
}[];
|
|
265
184
|
}
|
|
@@ -277,7 +196,6 @@ export interface PreflightResult {
|
|
|
277
196
|
* Local modification detected during sync.
|
|
278
197
|
*/
|
|
279
198
|
export interface LocalModification {
|
|
280
|
-
solution: string;
|
|
281
199
|
path: string;
|
|
282
200
|
type: 'modified' | 'deleted';
|
|
283
201
|
localHash?: string;
|
package/dist/types/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/types/sync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":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,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
package/dist/types/sync.js
CHANGED
package/dist/types/sync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/types/sync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/types/sync.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|