@hiveku-apps/sync 0.5.12 → 0.5.13
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/package.json +1 -1
- package/src/memory-owner.mjs +20 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hiveku-apps/sync",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"description": "Sync a Hiveku account's memory/rules/skills + coder projects into a local folder, and ship projects (push/deploy/pull-env) from the terminal. Pairs with the Hiveku MCP at core.hiveku.com/mcp so Claude Code can drive Hiveku tools per-folder.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/memory-owner.mjs
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
* The Marketing family: the Marketing parent and its topics. Peers, each with
|
|
42
42
|
* its own owner key (builder src/lib/olympus/memory-types.ts
|
|
43
43
|
* MARKETING_FAMILY_DEPARTMENTS). Analytics is a Marketing topic (audit
|
|
44
|
-
* decision 6).
|
|
44
|
+
* decision 6); Outbound is not: it is its own agent since 2026-10-26.
|
|
45
45
|
*/
|
|
46
46
|
export const MARKETING_FAMILY = Object.freeze([
|
|
47
47
|
'marketing',
|
|
@@ -49,7 +49,6 @@ export const MARKETING_FAMILY = Object.freeze([
|
|
|
49
49
|
'seo',
|
|
50
50
|
'social',
|
|
51
51
|
'ppc',
|
|
52
|
-
'outbound',
|
|
53
52
|
'branding',
|
|
54
53
|
'customer_avatar',
|
|
55
54
|
'customer_journey',
|
|
@@ -64,6 +63,7 @@ export const MARKETING_FAMILY = Object.freeze([
|
|
|
64
63
|
/** Every canonical department (memory-types.ts VALID_DEPARTMENTS). */
|
|
65
64
|
export const DEPARTMENTS = Object.freeze([
|
|
66
65
|
...MARKETING_FAMILY,
|
|
66
|
+
'outbound',
|
|
67
67
|
'sales',
|
|
68
68
|
'helpdesk',
|
|
69
69
|
'production',
|
|
@@ -331,16 +331,27 @@ export function accountPlacement(domain, content) {
|
|
|
331
331
|
// ─── Where the page shows every other row ────────────────────────────────
|
|
332
332
|
|
|
333
333
|
/** The team the Memory page lists (builder tree/team-keys.ts TEAM_AGENTS). */
|
|
334
|
-
export const TEAM_AGENTS = Object.freeze(['orchestrator', 'sales', 'helpdesk', 'marketing', 'production', 'accounting', 'coder', 'comms']);
|
|
334
|
+
export const TEAM_AGENTS = Object.freeze(['orchestrator', 'sales', 'helpdesk', 'marketing', 'outbound', 'production', 'accounting', 'coder', 'comms']);
|
|
335
335
|
const TEAM_SET = new Set(TEAM_AGENTS);
|
|
336
336
|
|
|
337
337
|
/**
|
|
338
338
|
* The departments whose own notes are ONE plain domain, their own name
|
|
339
339
|
* (tree-model.ts ONE_NOTES_NAME_DEPARTMENTS): their agents read that one
|
|
340
340
|
* document (the sales server reads `domain = 'sales'`), so a note one of them
|
|
341
|
-
* owns under another plain name is one its agent never reads.
|
|
341
|
+
* owns under another plain name is one its agent never reads. Outbound also
|
|
342
|
+
* keeps its `outbound_*` notes (ideal customer, reply tone, do not contact),
|
|
343
|
+
* which its server reads before every draft (builder memory-types.ts
|
|
344
|
+
* DEPARTMENT_NOTES_PREFIXES).
|
|
342
345
|
*/
|
|
343
|
-
const ONE_NOTES_NAME_DEPARTMENTS = new Set(['sales', 'helpdesk', 'comms', 'production', 'accounting', 'coder']);
|
|
346
|
+
const ONE_NOTES_NAME_DEPARTMENTS = new Set(['sales', 'helpdesk', 'comms', 'production', 'accounting', 'coder', 'outbound']);
|
|
347
|
+
const DEPARTMENT_NOTES_PREFIXES = Object.freeze({ outbound: 'outbound_' });
|
|
348
|
+
|
|
349
|
+
/** Whether `domain` is a plain note `department`'s own memory lists (builder isDepartmentNotesName). */
|
|
350
|
+
function isDepartmentNotesName(department, domain) {
|
|
351
|
+
if (domain === department) return true;
|
|
352
|
+
const prefix = Object.prototype.hasOwnProperty.call(DEPARTMENT_NOTES_PREFIXES, department) ? DEPARTMENT_NOTES_PREFIXES[department] : undefined;
|
|
353
|
+
return !!prefix && domain.length > prefix.length && domain.startsWith(prefix);
|
|
354
|
+
}
|
|
344
355
|
|
|
345
356
|
/** The page's group for each type of row (tree-model.ts KIND_GROUP). */
|
|
346
357
|
const TYPE_GROUP = Object.freeze({
|
|
@@ -378,7 +389,7 @@ export function ownedPlacement(domain, owner) {
|
|
|
378
389
|
const group = TYPE_GROUP[type];
|
|
379
390
|
if (owner === null || owner === undefined || owner === '') return { where: 'shared', group };
|
|
380
391
|
// The page compares the stored name exactly, as the agents' own reads do.
|
|
381
|
-
if (type === 'memory' && ONE_NOTES_NAME_DEPARTMENTS.has(owner) && domain
|
|
392
|
+
if (type === 'memory' && ONE_NOTES_NAME_DEPARTMENTS.has(owner) && !isDepartmentNotesName(owner, domain)) return { where: 'hidden', reason: 'unlisted' };
|
|
382
393
|
if (owner === 'orchestrator' && type !== 'identity') return { where: 'hidden', reason: 'unlisted' };
|
|
383
394
|
if (TEAM_SET.has(owner) && owner !== 'marketing') return { where: 'agent', agent: owner, topic: null, group };
|
|
384
395
|
if (isMarketingTopic(owner)) {
|
|
@@ -396,6 +407,7 @@ const AGENT_JOBS = Object.freeze({
|
|
|
396
407
|
sales: 'Sales',
|
|
397
408
|
helpdesk: 'Support',
|
|
398
409
|
marketing: 'Marketing',
|
|
410
|
+
outbound: 'Outbound',
|
|
399
411
|
production: 'Production',
|
|
400
412
|
accounting: 'Accounting',
|
|
401
413
|
coder: 'Website',
|
|
@@ -413,7 +425,6 @@ const TOPIC_NAMES = Object.freeze({
|
|
|
413
425
|
branding: 'Branding',
|
|
414
426
|
customer_journey: 'Customer journey',
|
|
415
427
|
knowledge_base: 'Knowledge base',
|
|
416
|
-
outbound: 'Outbound',
|
|
417
428
|
workflow: 'Workflow',
|
|
418
429
|
before_after_grid: 'Before and after',
|
|
419
430
|
website_design: 'Website design',
|
|
@@ -431,13 +442,13 @@ export function ownerLabel(owner) {
|
|
|
431
442
|
return AGENT_JOBS[owner] ?? owner;
|
|
432
443
|
}
|
|
433
444
|
|
|
434
|
-
/** The order the page lists the team in: shared first, then the team, the Marketing topics after Marketing. */
|
|
445
|
+
/** The order the page lists the team in: shared first, then the team, the Marketing topics after Marketing, then Outbound. */
|
|
435
446
|
export function ownerOrder(owner) {
|
|
436
447
|
if (!owner || owner === SHARED_OWNER) return 0;
|
|
437
448
|
const team = ['orchestrator', 'sales', 'helpdesk'];
|
|
438
449
|
if (team.includes(owner)) return 1 + team.indexOf(owner);
|
|
439
450
|
if (MARKETING_SET.has(owner)) return 10 + MARKETING_FAMILY.indexOf(owner);
|
|
440
|
-
const rest = ['production', 'accounting', 'coder', 'comms'];
|
|
451
|
+
const rest = ['outbound', 'production', 'accounting', 'coder', 'comms'];
|
|
441
452
|
if (rest.includes(owner)) return 40 + rest.indexOf(owner);
|
|
442
453
|
return 100;
|
|
443
454
|
}
|