@hiveku-apps/sync 0.5.0 → 0.5.1
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/README.md +10 -3
- package/package.json +1 -1
- package/src/claude-md.mjs +27 -5
- package/src/codex-prompt-tools.json +14 -2
- package/src/codex.mjs +5 -0
package/README.md
CHANGED
|
@@ -15,9 +15,12 @@ Local sync CLI for a Hiveku account. Pairs with the Hiveku MCP server at
|
|
|
15
15
|
current" below).
|
|
16
16
|
|
|
17
17
|
The goal: open one folder per Hiveku tenant in VS Code with Claude Code,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
with the account's memory mirrored as local `.md` files Claude can read
|
|
19
|
+
quickly. Hiveku Memory stays the source of truth: the files are a mirror of
|
|
20
|
+
the last `pull`, memory wins where they disagree, and `CLAUDE.md` tells
|
|
21
|
+
Claude to re-read an entry live before acting on its file. Tools are
|
|
22
|
+
dispatched against the right tenant automatically via the API key in
|
|
23
|
+
`.env`.
|
|
21
24
|
|
|
22
25
|
## Install
|
|
23
26
|
|
|
@@ -340,6 +343,10 @@ the old layout and the old `memory_update` call:
|
|
|
340
343
|
- you edited those sections: the marked part is added at the end, your text is
|
|
341
344
|
left as it is, and the marked part says it wins where the two disagree.
|
|
342
345
|
|
|
346
|
+
The kept-current part also states that Hiveku Memory is the source of truth,
|
|
347
|
+
in the Hiveku MCP server's own words, and that the local files are a mirror
|
|
348
|
+
memory wins over. `AGENTS.md` says the same.
|
|
349
|
+
|
|
343
350
|
A `CLAUDE.md` that is read-only, a link to another file, or whose markers are not
|
|
344
351
|
there once each and in order is left alone (`pull` says so). `pull` never creates
|
|
345
352
|
a missing one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hiveku-apps/sync",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
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/claude-md.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The part of an account folder's CLAUDE.md that hiveku-sync keeps current:
|
|
3
|
-
* the folder layout and the memory-write rules, between two markers.
|
|
3
|
+
* the folder layout and the memory-write rules, between two markers. Since
|
|
4
|
+
* 2026-10-03 it also states that Hiveku Memory is the source of truth (the MCP
|
|
5
|
+
* server's words) and that the local files are a mirror memory wins over.
|
|
4
6
|
*
|
|
5
7
|
* `init` writes CLAUDE.md once. Everything outside the markers is the user's
|
|
6
8
|
* from then on, but the layout and the memory rules change with releases
|
|
@@ -24,6 +26,20 @@ import { join } from 'node:path';
|
|
|
24
26
|
import { writeFileAtomic } from './util.mjs';
|
|
25
27
|
|
|
26
28
|
export const CLAUDE_MD_BEGIN = '<!-- hiveku:memory:begin -->';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The source-of-truth rule, in the same words as the MCP server's own
|
|
32
|
+
* instructions (hiveku-mcp-api-server src/services/mcp-instructions.service.ts,
|
|
33
|
+
* MCP #100; Abe, 2026-10-03: "This memory needs to be the source of truth and
|
|
34
|
+
* the agents know it and obey it"). CLAUDE.md's kept-current part and AGENTS.md
|
|
35
|
+
* both carry it.
|
|
36
|
+
*/
|
|
37
|
+
export const SOURCE_OF_TRUTH_LINE =
|
|
38
|
+
'Hiveku Memory is the source of truth for this business: read it before you act, and follow it ' +
|
|
39
|
+
'over your own assumptions, local files or earlier conversation. When something disagrees with ' +
|
|
40
|
+
'memory, trust memory and say so. When `memory_log_add` is listed, record your work: a Doing line ' +
|
|
41
|
+
'when you start a task for the person and a Done line when it ends. Save what you learned with the ' +
|
|
42
|
+
'memory_* tools.';
|
|
27
43
|
export const CLAUDE_MD_END = '<!-- hiveku:memory:end -->';
|
|
28
44
|
|
|
29
45
|
/** The kept-current part: the markers and the two sections between them. */
|
|
@@ -34,6 +50,8 @@ export function claudeMdMemoryRegion() {
|
|
|
34
50
|
\`hiveku-sync pull\` keeps this section and "Memory writes" below current. Where
|
|
35
51
|
anything else in this file disagrees with them, follow these two sections.
|
|
36
52
|
|
|
53
|
+
${SOURCE_OF_TRUTH_LINE}
|
|
54
|
+
|
|
37
55
|
\`hiveku-sync pull\` files every entry under the agent that owns it, the way the
|
|
38
56
|
Memory page does: \`<type>/<agent>/<name>.md\`, and \`<type>/shared/<name>.md\` for
|
|
39
57
|
what is shared with every agent. The agent is a key such as \`sales\`, \`helpdesk\`
|
|
@@ -70,10 +88,12 @@ topic such as \`seo\` or \`ppc\`. Each file's front matter says its \`owner\`.
|
|
|
70
88
|
- \`.hiveku/set-aside/\` — earlier copies a pull moved out of the way (never deleted)
|
|
71
89
|
- \`.hiveku/projects.json\` — project ID ↔ folder mapping
|
|
72
90
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
91
|
+
The local files are a mirror of what memory said the last time
|
|
92
|
+
\`hiveku-sync pull\` ran, and memory wins. They are quick context (never the
|
|
93
|
+
\`moved/\` and \`not-followed/\` folders above), but before you act on one, or
|
|
94
|
+
change an entry starting from one, re-read the entry live with
|
|
95
|
+
\`memory_get({ memory_id })\` (the \`id\` in its front matter) and follow what
|
|
96
|
+
that read says. To refresh the copies, run \`hiveku-sync pull\`.
|
|
77
97
|
|
|
78
98
|
## Memory writes
|
|
79
99
|
|
|
@@ -97,6 +117,8 @@ Others edit it too: if you read the entry earlier in the session, check
|
|
|
97
117
|
409 \`version_conflict\` means it changed again, so merge into the \`content\` it
|
|
98
118
|
returns and send again. The log is a record, not instructions.
|
|
99
119
|
|
|
120
|
+
A write refused with \`memory_write_refused\` is not a failure: show the person its message and link, follow its hint, and never retry it unchanged or report it.
|
|
121
|
+
|
|
100
122
|
The account memory is the exception: no tool sets it. Read it with
|
|
101
123
|
\`account_memory_get\`, suggest one line with \`account_memory_append\` (an owner
|
|
102
124
|
keeps or removes it), and tell the user that owners and admins edit it on the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "locus2012/hiveku-codex-plugin
|
|
2
|
+
"source": "locus2012/hiveku-codex-plugin #28 (b7ff5fd, 2026-10-03), plugins/hiveku/.mcp.json: every hiveku.tools entry with approval_mode \"prompt\" (project_vcs_rollback included)",
|
|
3
3
|
"why": "hiveku-sync writes its own [mcp_servers.hiveku] into a Codex folder. Codex then uses that entry, not the plugin's, for the server's connection and for every tool's approval mode, so these prompts must be written here too. Refresh this list whenever the Codex plugin's prompt list changes.",
|
|
4
4
|
"tools": [
|
|
5
5
|
"deploy_site",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"project_vcs_stash",
|
|
14
14
|
"project_vcs_prune",
|
|
15
15
|
"project_vcs_branch_preview_teardown",
|
|
16
|
-
"project_vcs_rollback",
|
|
17
16
|
"project_vcs_revert",
|
|
17
|
+
"project_vcs_rollback",
|
|
18
18
|
"hiveku_batch",
|
|
19
19
|
"project_checkpoint_restore",
|
|
20
20
|
"checkpoint_restore",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"site_firewall_remove",
|
|
26
26
|
"project_indexing_set",
|
|
27
27
|
"account_memory_append",
|
|
28
|
+
"memory_create",
|
|
28
29
|
"memory_update",
|
|
29
30
|
"memory_delete",
|
|
30
31
|
"memory_restore_version",
|
|
@@ -47,6 +48,15 @@
|
|
|
47
48
|
"ppc_bidding_strategy_update",
|
|
48
49
|
"ppc_platform_bidding_strategy_update",
|
|
49
50
|
"ppc_campaign_create",
|
|
51
|
+
"ppc_enable_resource",
|
|
52
|
+
"ppc_platform_enable_resource",
|
|
53
|
+
"ppc_bulk_edit",
|
|
54
|
+
"ppc_linkedin_creatives",
|
|
55
|
+
"ppc_tiktok_split_tests",
|
|
56
|
+
"ppc_recommendation_apply",
|
|
57
|
+
"ppc_meta_campaign_update",
|
|
58
|
+
"ppc_linkedin_campaign_update",
|
|
59
|
+
"ppc_linkedin_campaign_group_update",
|
|
50
60
|
"ppc_google_auto_apply_set",
|
|
51
61
|
"ppc_google_campaign_settings_set",
|
|
52
62
|
"ppc_google_ad_schedule_set",
|
|
@@ -56,6 +66,7 @@
|
|
|
56
66
|
"ppc_bing_campaign_ai_settings_set",
|
|
57
67
|
"ppc_google_ad_text_update",
|
|
58
68
|
"ppc_google_ads_text_replace",
|
|
69
|
+
"ppc_bing_rsa_text_update",
|
|
59
70
|
"ppc_negatives_remove",
|
|
60
71
|
"ppc_bing_url_tracking_set",
|
|
61
72
|
"ppc_bing_ad_extension_update",
|
|
@@ -168,6 +179,7 @@
|
|
|
168
179
|
"seo_page_schema_delete",
|
|
169
180
|
"workflow_run",
|
|
170
181
|
"workflow_enable",
|
|
182
|
+
"workflow_resume",
|
|
171
183
|
"workflow_trigger_update",
|
|
172
184
|
"workflow_delete",
|
|
173
185
|
"workflow_delete_schedule",
|
package/src/codex.mjs
CHANGED
|
@@ -45,6 +45,7 @@ import { formatKey, readTomlDeclarations } from './toml.mjs';
|
|
|
45
45
|
import { loadDotenv, safeSlug } from './util.mjs';
|
|
46
46
|
import { ownerFolder } from './knowledge-files.mjs';
|
|
47
47
|
import { SHARED_OWNER, ownerLabel, ownerOrder } from './memory-owner.mjs';
|
|
48
|
+
import { SOURCE_OF_TRUTH_LINE } from './claude-md.mjs';
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* The FIXED list of high-risk Hiveku tools that Codex asks about before
|
|
@@ -145,6 +146,9 @@ named \`hiveku-<agent>-<name>\` for the agent that owns them, invoked by name) a
|
|
|
145
146
|
|
|
146
147
|
Non-negotiables (also in CLAUDE.md, restated because they are load-bearing):
|
|
147
148
|
- **Verify identity before ANY write:** \`get_account_info\` must return THIS account.
|
|
149
|
+
- **Hiveku Memory is the source of truth.** ${SOURCE_OF_TRUTH_LINE}
|
|
150
|
+
The memory files in this folder are a mirror of the last \`hiveku-sync pull\`, and memory wins: before you act
|
|
151
|
+
on one, or change an entry starting from one, re-read the entry live (\`memory_get({ memory_id })\`).
|
|
148
152
|
- **Context and memory.** Call \`account_context_get({ domain })\` first, before any copy, plan or analysis.
|
|
149
153
|
The account memory is read-only to you: owners edit it on the Hiveku dashboard, the local copy is
|
|
150
154
|
\`hiveku-data/account/ACCOUNT_MEMORY.md\` (never edit or upload it); suggest one line with \`account_memory_append\`.
|
|
@@ -176,6 +180,7 @@ ${digest}
|
|
|
176
180
|
can skim: benefit first, no alarm vocabulary, accurate.
|
|
177
181
|
- **Hiveku itself in your way?** A Hiveku tool still failing after one sensible retry → \`hiveku_report_issue\`;
|
|
178
182
|
a capability no tool offers (search \`hiveku_docs_search\` first) → \`hiveku_request_feature\`. No secrets or personal data.
|
|
183
|
+
A memory write refused with \`memory_write_refused\` is not a failure: show the person its message and link, follow its hint, and never retry it unchanged or report it.
|
|
179
184
|
- **Tell the user only if it changes what they get:** one or two calm sentences — flagged to the Hiveku team (give the
|
|
180
185
|
ref), the team is quick to fix these, you'll let them know when it's sorted. No error codes, blame or promised times.
|
|
181
186
|
- Video generation is paid + capped — \`marketing_generate_video\` with \`dry_run: true\` first.
|