newo 3.4.0 → 3.4.2
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/CHANGELOG.md +16 -0
- package/dist/api.d.ts +3 -1
- package/dist/api.js +49 -1
- package/dist/application/migration/MigrationEngine.d.ts +141 -0
- package/dist/application/migration/MigrationEngine.js +322 -0
- package/dist/application/migration/index.d.ts +5 -0
- package/dist/application/migration/index.js +5 -0
- package/dist/application/sync/SyncEngine.d.ts +134 -0
- package/dist/application/sync/SyncEngine.js +335 -0
- package/dist/application/sync/index.d.ts +5 -0
- package/dist/application/sync/index.js +5 -0
- package/dist/cli/commands/create-attribute.js +1 -1
- package/dist/cli/commands/create-customer.d.ts +3 -0
- package/dist/cli/commands/create-customer.js +159 -0
- package/dist/cli/commands/diff.d.ts +6 -0
- package/dist/cli/commands/diff.js +288 -0
- package/dist/cli/commands/help.js +63 -3
- package/dist/cli/commands/logs.d.ts +18 -0
- package/dist/cli/commands/logs.js +283 -0
- package/dist/cli/commands/pull.js +114 -10
- package/dist/cli/commands/push.js +122 -12
- package/dist/cli/commands/update-attribute.d.ts +3 -0
- package/dist/cli/commands/update-attribute.js +78 -0
- package/dist/cli/commands/watch.d.ts +6 -0
- package/dist/cli/commands/watch.js +195 -0
- package/dist/cli-new/bootstrap.d.ts +74 -0
- package/dist/cli-new/bootstrap.js +154 -0
- package/dist/cli-new/di/Container.d.ts +64 -0
- package/dist/cli-new/di/Container.js +122 -0
- package/dist/cli-new/di/tokens.d.ts +77 -0
- package/dist/cli-new/di/tokens.js +76 -0
- package/dist/cli.js +20 -0
- package/dist/domain/resources/common/types.d.ts +71 -0
- package/dist/domain/resources/common/types.js +42 -0
- package/dist/domain/strategies/sync/AkbSyncStrategy.d.ts +63 -0
- package/dist/domain/strategies/sync/AkbSyncStrategy.js +274 -0
- package/dist/domain/strategies/sync/AttributeSyncStrategy.d.ts +87 -0
- package/dist/domain/strategies/sync/AttributeSyncStrategy.js +378 -0
- package/dist/domain/strategies/sync/ConversationSyncStrategy.d.ts +61 -0
- package/dist/domain/strategies/sync/ConversationSyncStrategy.js +232 -0
- package/dist/domain/strategies/sync/ISyncStrategy.d.ts +149 -0
- package/dist/domain/strategies/sync/ISyncStrategy.js +24 -0
- package/dist/domain/strategies/sync/IntegrationSyncStrategy.d.ts +68 -0
- package/dist/domain/strategies/sync/IntegrationSyncStrategy.js +413 -0
- package/dist/domain/strategies/sync/ProjectSyncStrategy.d.ts +111 -0
- package/dist/domain/strategies/sync/ProjectSyncStrategy.js +523 -0
- package/dist/domain/strategies/sync/index.d.ts +13 -0
- package/dist/domain/strategies/sync/index.js +19 -0
- package/dist/sync/migrate.js +99 -23
- package/dist/types.d.ts +124 -0
- package/package.json +3 -1
- package/src/api.ts +53 -2
- package/src/application/migration/MigrationEngine.ts +492 -0
- package/src/application/migration/index.ts +5 -0
- package/src/application/sync/SyncEngine.ts +467 -0
- package/src/application/sync/index.ts +5 -0
- package/src/cli/commands/create-attribute.ts +1 -1
- package/src/cli/commands/create-customer.ts +185 -0
- package/src/cli/commands/diff.ts +360 -0
- package/src/cli/commands/help.ts +63 -3
- package/src/cli/commands/logs.ts +329 -0
- package/src/cli/commands/pull.ts +128 -11
- package/src/cli/commands/push.ts +131 -13
- package/src/cli/commands/update-attribute.ts +82 -0
- package/src/cli/commands/watch.ts +227 -0
- package/src/cli-new/bootstrap.ts +252 -0
- package/src/cli-new/di/Container.ts +152 -0
- package/src/cli-new/di/tokens.ts +105 -0
- package/src/cli.ts +25 -0
- package/src/domain/resources/common/types.ts +106 -0
- package/src/domain/strategies/sync/AkbSyncStrategy.ts +358 -0
- package/src/domain/strategies/sync/AttributeSyncStrategy.ts +508 -0
- package/src/domain/strategies/sync/ConversationSyncStrategy.ts +299 -0
- package/src/domain/strategies/sync/ISyncStrategy.ts +182 -0
- package/src/domain/strategies/sync/IntegrationSyncStrategy.ts +522 -0
- package/src/domain/strategies/sync/ProjectSyncStrategy.ts +747 -0
- package/src/domain/strategies/sync/index.ts +46 -0
- package/src/sync/migrate.ts +103 -24
- package/src/types.ts +135 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diff command handler
|
|
3
|
+
*
|
|
4
|
+
* Shows differences between local files and remote NEWO platform.
|
|
5
|
+
* Supports selective resource diffing with --only flag.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* newo diff # Show all differences
|
|
9
|
+
* newo diff --only projects # Show only project differences
|
|
10
|
+
* newo diff --detailed # Show detailed content diff
|
|
11
|
+
*/
|
|
12
|
+
import { makeClient } from '../../api.js';
|
|
13
|
+
import { getValidAccessToken } from '../../auth.js';
|
|
14
|
+
import { selectSingleCustomer } from '../customer-selection.js';
|
|
15
|
+
import { ALL_RESOURCE_TYPES } from '../../cli-new/di/tokens.js';
|
|
16
|
+
import { getSkill, listAgents, listFlowSkills, getCustomerAttributes, listProjects } from '../../api.js';
|
|
17
|
+
import fs from 'fs-extra';
|
|
18
|
+
import path from 'path';
|
|
19
|
+
import yaml from 'js-yaml';
|
|
20
|
+
/**
|
|
21
|
+
* Parse resource list from comma-separated string
|
|
22
|
+
*/
|
|
23
|
+
function parseResourceList(input) {
|
|
24
|
+
if (!input)
|
|
25
|
+
return [];
|
|
26
|
+
return input.split(',').map(r => r.trim().toLowerCase()).filter(Boolean);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Color codes for terminal output
|
|
30
|
+
*/
|
|
31
|
+
const colors = {
|
|
32
|
+
reset: '\x1b[0m',
|
|
33
|
+
red: '\x1b[31m',
|
|
34
|
+
green: '\x1b[32m',
|
|
35
|
+
yellow: '\x1b[33m',
|
|
36
|
+
blue: '\x1b[34m',
|
|
37
|
+
cyan: '\x1b[36m',
|
|
38
|
+
gray: '\x1b[90m',
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Generate unified diff output
|
|
42
|
+
*/
|
|
43
|
+
function generateUnifiedDiff(local, remote, filePath) {
|
|
44
|
+
const localLines = local.split('\n');
|
|
45
|
+
const remoteLines = remote.split('\n');
|
|
46
|
+
const output = [];
|
|
47
|
+
output.push(`${colors.cyan}--- local: ${filePath}${colors.reset}`);
|
|
48
|
+
output.push(`${colors.cyan}+++ remote: ${filePath}${colors.reset}`);
|
|
49
|
+
// Simple line-by-line comparison
|
|
50
|
+
const maxLines = Math.max(localLines.length, remoteLines.length);
|
|
51
|
+
let diffStart = -1;
|
|
52
|
+
let diffLines = [];
|
|
53
|
+
for (let i = 0; i < maxLines; i++) {
|
|
54
|
+
const localLine = localLines[i] ?? '';
|
|
55
|
+
const remoteLine = remoteLines[i] ?? '';
|
|
56
|
+
if (localLine !== remoteLine) {
|
|
57
|
+
if (diffStart === -1) {
|
|
58
|
+
diffStart = i + 1;
|
|
59
|
+
}
|
|
60
|
+
if (i < localLines.length) {
|
|
61
|
+
diffLines.push(`${colors.red}- ${localLine}${colors.reset}`);
|
|
62
|
+
}
|
|
63
|
+
if (i < remoteLines.length) {
|
|
64
|
+
diffLines.push(`${colors.green}+ ${remoteLine}${colors.reset}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
if (diffStart !== -1) {
|
|
69
|
+
output.push(`${colors.gray}@@ -${diffStart},${diffLines.length} @@${colors.reset}`);
|
|
70
|
+
output.push(...diffLines);
|
|
71
|
+
diffStart = -1;
|
|
72
|
+
diffLines = [];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (diffLines.length > 0) {
|
|
77
|
+
output.push(`${colors.gray}@@ -${diffStart},${diffLines.length} @@${colors.reset}`);
|
|
78
|
+
output.push(...diffLines);
|
|
79
|
+
}
|
|
80
|
+
return output;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get project differences
|
|
84
|
+
*/
|
|
85
|
+
async function getProjectDiffs(client, customer, _verbose) {
|
|
86
|
+
const diffs = [];
|
|
87
|
+
const customerDir = path.join(process.cwd(), 'newo_customers', customer.idn);
|
|
88
|
+
// Get all projects first
|
|
89
|
+
const projects = await listProjects(client);
|
|
90
|
+
for (const project of projects) {
|
|
91
|
+
const projectIdn = project.idn;
|
|
92
|
+
// Get all agents for this project
|
|
93
|
+
const agents = await listAgents(client, project.id);
|
|
94
|
+
for (const agent of agents) {
|
|
95
|
+
for (const flow of agent.flows || []) {
|
|
96
|
+
const skills = await listFlowSkills(client, flow.id);
|
|
97
|
+
for (const skill of skills) {
|
|
98
|
+
// Get full skill content from API
|
|
99
|
+
const remoteSkill = await getSkill(client, skill.id);
|
|
100
|
+
const remoteContent = remoteSkill.prompt_script || '';
|
|
101
|
+
// Determine local file path
|
|
102
|
+
const extension = remoteSkill.runner_type === 'nsl' ? 'jinja' : 'guidance';
|
|
103
|
+
const localPath = path.join(customerDir, 'projects', projectIdn, agent.idn, flow.idn, skill.idn, `${skill.idn}.${extension}`);
|
|
104
|
+
// Compare with local
|
|
105
|
+
if (await fs.pathExists(localPath)) {
|
|
106
|
+
const localContent = await fs.readFile(localPath, 'utf-8');
|
|
107
|
+
if (localContent !== remoteContent) {
|
|
108
|
+
diffs.push({
|
|
109
|
+
path: path.relative(process.cwd(), localPath),
|
|
110
|
+
type: 'modified',
|
|
111
|
+
localContent,
|
|
112
|
+
remoteContent,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
// File exists remotely but not locally
|
|
118
|
+
diffs.push({
|
|
119
|
+
path: path.relative(process.cwd(), localPath),
|
|
120
|
+
type: 'deleted',
|
|
121
|
+
remoteContent,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// Check for local files that don't exist remotely
|
|
129
|
+
const projectsDir = path.join(customerDir, 'projects');
|
|
130
|
+
if (await fs.pathExists(projectsDir)) {
|
|
131
|
+
const walkDir = async (dir) => {
|
|
132
|
+
const files = [];
|
|
133
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
134
|
+
for (const entry of entries) {
|
|
135
|
+
const fullPath = path.join(dir, entry.name);
|
|
136
|
+
if (entry.isDirectory()) {
|
|
137
|
+
files.push(...await walkDir(fullPath));
|
|
138
|
+
}
|
|
139
|
+
else if (entry.name.endsWith('.guidance') || entry.name.endsWith('.jinja')) {
|
|
140
|
+
files.push(fullPath);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return files;
|
|
144
|
+
};
|
|
145
|
+
const localFiles = await walkDir(projectsDir);
|
|
146
|
+
for (const localFile of localFiles) {
|
|
147
|
+
const relativePath = path.relative(process.cwd(), localFile);
|
|
148
|
+
const alreadyInDiffs = diffs.some(d => d.path === relativePath);
|
|
149
|
+
if (!alreadyInDiffs) {
|
|
150
|
+
const localContent = await fs.readFile(localFile, 'utf-8');
|
|
151
|
+
diffs.push({
|
|
152
|
+
path: relativePath,
|
|
153
|
+
type: 'added',
|
|
154
|
+
localContent,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return diffs;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get attribute differences
|
|
163
|
+
*/
|
|
164
|
+
async function getAttributeDiffs(client, customer, _verbose) {
|
|
165
|
+
const diffs = [];
|
|
166
|
+
const customerDir = path.join(process.cwd(), 'newo_customers', customer.idn);
|
|
167
|
+
// Customer attributes
|
|
168
|
+
const localAttrPath = path.join(customerDir, 'attributes.yaml');
|
|
169
|
+
if (await fs.pathExists(localAttrPath)) {
|
|
170
|
+
try {
|
|
171
|
+
const remoteAttrsResponse = await getCustomerAttributes(client, true);
|
|
172
|
+
const localContent = await fs.readFile(localAttrPath, 'utf-8');
|
|
173
|
+
// Transform remote to YAML format for comparison
|
|
174
|
+
const remoteYaml = yaml.dump(remoteAttrsResponse.attributes.map(attr => ({
|
|
175
|
+
idn: attr.idn,
|
|
176
|
+
title: attr.title,
|
|
177
|
+
value: attr.value,
|
|
178
|
+
value_type: attr.value_type,
|
|
179
|
+
is_hidden: attr.is_hidden,
|
|
180
|
+
})), { lineWidth: -1 });
|
|
181
|
+
const localParsed = yaml.load(localContent);
|
|
182
|
+
const localYaml = yaml.dump(localParsed, { lineWidth: -1 });
|
|
183
|
+
if (localYaml !== remoteYaml) {
|
|
184
|
+
diffs.push({
|
|
185
|
+
path: path.relative(process.cwd(), localAttrPath),
|
|
186
|
+
type: 'modified',
|
|
187
|
+
localContent: localYaml,
|
|
188
|
+
remoteContent: remoteYaml,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
// Error fetching remote - skip
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return diffs;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Main diff command handler
|
|
200
|
+
*/
|
|
201
|
+
export async function handleDiffCommand(customerConfig, args, verbose) {
|
|
202
|
+
const { selectedCustomer } = selectSingleCustomer(customerConfig, args.customer);
|
|
203
|
+
if (!selectedCustomer) {
|
|
204
|
+
console.error('❌ Please specify a customer with --customer <idn> or set a default');
|
|
205
|
+
process.exit(1);
|
|
206
|
+
}
|
|
207
|
+
// Parse options
|
|
208
|
+
const onlyResources = parseResourceList(args.only);
|
|
209
|
+
const detailed = Boolean(args.detailed || args.d);
|
|
210
|
+
// Determine resources to diff
|
|
211
|
+
let resourcesToDiff;
|
|
212
|
+
if (onlyResources.length > 0) {
|
|
213
|
+
resourcesToDiff = onlyResources.filter(r => ALL_RESOURCE_TYPES.includes(r));
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
resourcesToDiff = ['projects', 'attributes']; // Default to main resources
|
|
217
|
+
}
|
|
218
|
+
console.log(`🔍 Comparing local vs remote for: ${resourcesToDiff.join(', ')}`);
|
|
219
|
+
console.log(`📁 Customer: ${selectedCustomer.idn}`);
|
|
220
|
+
console.log('');
|
|
221
|
+
const accessToken = await getValidAccessToken(selectedCustomer);
|
|
222
|
+
const client = await makeClient(verbose, accessToken);
|
|
223
|
+
const allDiffs = [];
|
|
224
|
+
// Get diffs for each resource type
|
|
225
|
+
for (const resource of resourcesToDiff) {
|
|
226
|
+
switch (resource) {
|
|
227
|
+
case 'projects':
|
|
228
|
+
console.log(`📦 Checking projects...`);
|
|
229
|
+
const projectDiffs = await getProjectDiffs(client, selectedCustomer, verbose);
|
|
230
|
+
allDiffs.push(...projectDiffs);
|
|
231
|
+
break;
|
|
232
|
+
case 'attributes':
|
|
233
|
+
console.log(`📋 Checking attributes...`);
|
|
234
|
+
const attrDiffs = await getAttributeDiffs(client, selectedCustomer, verbose);
|
|
235
|
+
allDiffs.push(...attrDiffs);
|
|
236
|
+
break;
|
|
237
|
+
default:
|
|
238
|
+
console.log(`⏭️ Skipping ${resource} (diff not implemented yet)`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// Display results
|
|
242
|
+
console.log('');
|
|
243
|
+
if (allDiffs.length === 0) {
|
|
244
|
+
console.log('✅ No differences found. Local and remote are in sync.');
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
console.log(`📊 Found ${allDiffs.length} difference(s):`);
|
|
248
|
+
console.log('');
|
|
249
|
+
// Group by type
|
|
250
|
+
const added = allDiffs.filter(d => d.type === 'added');
|
|
251
|
+
const modified = allDiffs.filter(d => d.type === 'modified');
|
|
252
|
+
const deleted = allDiffs.filter(d => d.type === 'deleted');
|
|
253
|
+
if (added.length > 0) {
|
|
254
|
+
console.log(`${colors.green}➕ Added locally (${added.length}):${colors.reset}`);
|
|
255
|
+
for (const diff of added) {
|
|
256
|
+
console.log(` ${diff.path}`);
|
|
257
|
+
}
|
|
258
|
+
console.log('');
|
|
259
|
+
}
|
|
260
|
+
if (modified.length > 0) {
|
|
261
|
+
console.log(`${colors.yellow}📝 Modified (${modified.length}):${colors.reset}`);
|
|
262
|
+
for (const diff of modified) {
|
|
263
|
+
console.log(` ${diff.path}`);
|
|
264
|
+
if (detailed && diff.localContent && diff.remoteContent) {
|
|
265
|
+
const diffOutput = generateUnifiedDiff(diff.localContent, diff.remoteContent, diff.path);
|
|
266
|
+
diffOutput.forEach(line => console.log(` ${line}`));
|
|
267
|
+
console.log('');
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
console.log('');
|
|
271
|
+
}
|
|
272
|
+
if (deleted.length > 0) {
|
|
273
|
+
console.log(`${colors.red}➖ Deleted locally (${deleted.length}):${colors.reset}`);
|
|
274
|
+
for (const diff of deleted) {
|
|
275
|
+
console.log(` ${diff.path}`);
|
|
276
|
+
}
|
|
277
|
+
console.log('');
|
|
278
|
+
}
|
|
279
|
+
// Summary
|
|
280
|
+
console.log(`${colors.cyan}Summary:${colors.reset}`);
|
|
281
|
+
console.log(` Added: ${added.length}`);
|
|
282
|
+
console.log(` Modified: ${modified.length}`);
|
|
283
|
+
console.log(` Deleted: ${deleted.length}`);
|
|
284
|
+
console.log('');
|
|
285
|
+
console.log(`💡 Run ${colors.cyan}newo push${colors.reset} to upload local changes to remote.`);
|
|
286
|
+
console.log(`💡 Run ${colors.cyan}newo pull${colors.reset} to download remote changes to local.`);
|
|
287
|
+
}
|
|
288
|
+
//# sourceMappingURL=diff.js.map
|
|
@@ -9,10 +9,13 @@ Core Commands:
|
|
|
9
9
|
newo pull [--customer <idn>] # download projects + attributes -> ./newo_customers/<idn>/
|
|
10
10
|
newo push [--customer <idn>] [--no-publish] # upload modified *.guidance/*.jinja + attributes back to NEWO, publish flows by default
|
|
11
11
|
newo status [--customer <idn>] # show modified files that would be pushed
|
|
12
|
+
newo watch [--customer <idn>] # watch for file changes and auto-push (NEW)
|
|
13
|
+
newo diff [--customer <idn>] # show differences between local and remote (NEW)
|
|
14
|
+
newo logs [--customer <idn>] # fetch and display analytics logs from platform (NEW)
|
|
12
15
|
newo conversations [--customer <idn>] [--all] # download user conversations -> ./newo_customers/<idn>/conversations.yaml
|
|
13
|
-
newo sandbox "<message>" [--customer <idn>] # test agent in sandbox - single message mode
|
|
16
|
+
newo sandbox "<message>" [--customer <idn>] # test agent in sandbox - single message mode
|
|
14
17
|
newo sandbox --actor <id> "message" # continue existing sandbox conversation with chat ID
|
|
15
|
-
newo pull-attributes [--customer <idn>] # download customer + project attributes
|
|
18
|
+
newo pull-attributes [--customer <idn>] # download customer + project attributes
|
|
16
19
|
newo list-customers # list available customers and their configuration
|
|
17
20
|
newo meta [--customer <idn>] # get project metadata (debug command)
|
|
18
21
|
newo import-akb <file> <persona_id> [--customer <idn>] # import AKB articles from structured text file
|
|
@@ -51,7 +54,20 @@ Enterprise Features:
|
|
|
51
54
|
newo pull-akb [--customer <idn>] # download AKB articles for all personas with agents → ./newo_customers/<idn>/akb/
|
|
52
55
|
newo push-akb [--customer <idn>] # upload AKB articles from local YAML files to platform
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
Analytics & Monitoring (NEW):
|
|
58
|
+
newo logs [--customer <idn>] # fetch last 1 hour of analytics logs
|
|
59
|
+
newo logs --hours <n> # fetch logs from last N hours
|
|
60
|
+
newo logs --from <datetime> --to <datetime> # fetch logs in datetime range (ISO format)
|
|
61
|
+
newo logs --level <levels> # filter by level: info, warning, error (comma-separated)
|
|
62
|
+
newo logs --type <types> # filter by type: system, operation, call (comma-separated)
|
|
63
|
+
newo logs --flow <idn> --skill <idn> # filter by flow and/or skill
|
|
64
|
+
newo logs --message <text> # search in log messages
|
|
65
|
+
newo logs --follow, -f # tail mode - continuously poll for new logs
|
|
66
|
+
newo logs --json # output logs as JSON array
|
|
67
|
+
newo logs --raw # output each log as single JSON line (for piping)
|
|
68
|
+
|
|
69
|
+
Account & Customer Management:
|
|
70
|
+
newo create-customer <org_name> --email <email> [--tenant <t>] [--phone <p>] [--project <idn>] [--status <temporal|permanent>] # create new NEWO customer
|
|
55
71
|
newo migrate-account --source <idn> --dest <idn> [--yes] # migrate complete account from source to destination
|
|
56
72
|
newo verify --source <idn> --dest <idn> # verify migration by comparing entity counts
|
|
57
73
|
newo create-webhooks [--customer <idn>] # create webhooks from YAML files
|
|
@@ -66,6 +82,20 @@ Flags:
|
|
|
66
82
|
--confirm # confirm destructive operations without prompting
|
|
67
83
|
--no-publish # skip automatic flow publishing during push operations
|
|
68
84
|
|
|
85
|
+
Selective Sync Flags (NEW):
|
|
86
|
+
--only <resources> # sync only specified resources (comma-separated)
|
|
87
|
+
--exclude <resources> # exclude specified resources from sync
|
|
88
|
+
--all # explicitly sync all resources
|
|
89
|
+
--debounce <ms> # debounce delay for watch mode (default: 1000ms)
|
|
90
|
+
--detailed, -d # show detailed content diff (for diff command)
|
|
91
|
+
|
|
92
|
+
Resources: projects, attributes, integrations, akb, conversations (read-only)
|
|
93
|
+
Examples:
|
|
94
|
+
newo pull --only projects,attributes # pull only projects and attributes
|
|
95
|
+
newo push --exclude integrations # push all except integrations
|
|
96
|
+
newo watch --only projects --debounce 2000 # watch projects with 2s delay
|
|
97
|
+
newo diff --only projects --detailed # show project diffs with content
|
|
98
|
+
|
|
69
99
|
Environment Variables:
|
|
70
100
|
NEWO_BASE_URL # NEWO API base URL (default: https://app.newo.ai)
|
|
71
101
|
|
|
@@ -100,6 +130,21 @@ Usage Examples:
|
|
|
100
130
|
newo status # Check for local modifications
|
|
101
131
|
newo push # Upload changes back to NEWO
|
|
102
132
|
|
|
133
|
+
# Watch mode (auto-push on changes):
|
|
134
|
+
newo watch # Watch all files and auto-push changes
|
|
135
|
+
newo watch --only projects # Watch only project files
|
|
136
|
+
newo watch --debounce 2000 # 2-second debounce delay
|
|
137
|
+
|
|
138
|
+
# Diff (compare local vs remote):
|
|
139
|
+
newo diff # Show all differences
|
|
140
|
+
newo diff --only projects # Show only project differences
|
|
141
|
+
newo diff --detailed # Show content-level diffs
|
|
142
|
+
|
|
143
|
+
# Selective sync:
|
|
144
|
+
newo pull --only projects # Pull only projects
|
|
145
|
+
newo push --exclude integrations # Push all except integrations
|
|
146
|
+
newo pull --all # Explicit all resources
|
|
147
|
+
|
|
103
148
|
# Multi-customer operations:
|
|
104
149
|
newo pull --customer acme # Pull projects for Acme only
|
|
105
150
|
newo push --customer globex # Push changes for Globex only
|
|
@@ -139,6 +184,21 @@ Usage Examples:
|
|
|
139
184
|
newo sandbox "Test query" --verbose # With debug info
|
|
140
185
|
newo sandbox "Test query" --quiet # For automation/scripts
|
|
141
186
|
|
|
187
|
+
# Analytics logs (NEW v3.5.0):
|
|
188
|
+
newo logs # Last 1 hour of logs
|
|
189
|
+
newo logs --hours 24 # Last 24 hours
|
|
190
|
+
newo logs --level warning,error # Only warnings and errors
|
|
191
|
+
newo logs --type call --skill CreateActor # Skill calls for specific skill
|
|
192
|
+
newo logs --flow CACreatorFlow --follow # Tail logs for specific flow
|
|
193
|
+
newo logs --from "2026-01-11T00:00:00Z" --to "2026-01-12T00:00:00Z" # Date range
|
|
194
|
+
newo logs --json --per 100 # Get 100 logs as JSON
|
|
195
|
+
newo logs --message "error" --level error # Search errors with message
|
|
196
|
+
|
|
197
|
+
# Customer creation (NEW v3.5.0):
|
|
198
|
+
newo create-customer "Acme Corp" --email admin@acme.com --tenant acme # Create basic customer
|
|
199
|
+
newo create-customer "Test Co" --email test@test.com --status temporal # Temporal (trial) customer
|
|
200
|
+
newo create-customer "Partner" --email p@p.com --project nac_integration --auto-update # With project template
|
|
201
|
+
|
|
142
202
|
File Structure:
|
|
143
203
|
newo_customers/
|
|
144
204
|
├── <customer-idn>/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs command - Fetch and display analytics logs from NEWO platform
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* newo logs # Last 1 hour of logs
|
|
6
|
+
* newo logs --hours 24 # Last 24 hours
|
|
7
|
+
* newo logs --from "2026-01-11T00:00:00Z" --to "2026-01-12T00:00:00Z"
|
|
8
|
+
* newo logs --level warning # Only warnings
|
|
9
|
+
* newo logs --type call # Only skill calls
|
|
10
|
+
* newo logs --flow CACreatorFlow # Filter by flow
|
|
11
|
+
* newo logs --skill CreateActor # Filter by skill
|
|
12
|
+
* newo logs --follow # Tail mode (poll for new logs)
|
|
13
|
+
* newo logs --json # Output as JSON
|
|
14
|
+
*/
|
|
15
|
+
import type { MultiCustomerConfig, CliArgs } from '../../types.js';
|
|
16
|
+
export declare function handleLogsCommand(customerConfig: MultiCustomerConfig, args: CliArgs, verbose: boolean): Promise<void>;
|
|
17
|
+
export declare function printLogsHelp(): void;
|
|
18
|
+
//# sourceMappingURL=logs.d.ts.map
|