@kivimedia/kmhub 2.9.1 → 2.11.0
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 +170 -170
- package/bin/kmhub.mjs +896 -896
- package/coach-book-output-guard.mjs +760 -760
- package/index.mjs +57 -57
- package/package.json +56 -56
- package/prompts/briefing.md +29 -29
- package/prompts/luxury.md +70 -70
- package/prompts/play.md +49 -49
- package/prompts/run.md +37 -36
- package/prompts/setup.md +33 -33
- package/prompts/vs-booked.md +46 -46
- package/prompts/what-can-you-do.md +40 -40
- package/prompts.mjs +110 -110
- package/read-only-tools.json +143 -142
- package/remote.mjs +929 -929
- package/tools/balloon-costing.mjs +80 -80
- package/tools/booking-equipment.mjs +110 -110
- package/tools/bridges.mjs +54 -54
- package/tools/briefing.mjs +91 -91
- package/tools/calendar.mjs +170 -170
- package/tools/capabilities.mjs +155 -155
- package/tools/catalog.mjs +288 -288
- package/tools/clubs.mjs +176 -176
- package/tools/coach.mjs +771 -771
- package/tools/compare.mjs +76 -76
- package/tools/core.mjs +244 -244
- package/tools/crm.mjs +209 -209
- package/tools/dubsado.mjs +137 -137
- package/tools/exports.mjs +128 -128
- package/tools/fact-review.mjs +125 -125
- package/tools/flows.mjs +261 -261
- package/tools/forms.mjs +158 -158
- package/tools/gols.mjs +144 -134
- package/tools/hr.mjs +162 -162
- package/tools/knowledge.mjs +129 -125
- package/tools/marketing.mjs +396 -396
- package/tools/meta.mjs +245 -245
- package/tools/military.mjs +244 -244
- package/tools/money.mjs +235 -197
- package/tools/outreach.mjs +238 -238
- package/tools/pending.mjs +122 -122
- package/tools/photos.mjs +140 -140
- package/tools/plays.mjs +244 -244
- package/tools/profile.mjs +118 -118
- package/tools/radar.mjs +173 -173
- package/tools/recurring-invoices.mjs +149 -149
- package/tools/reengage.mjs +434 -434
- package/tools/schedules.mjs +55 -55
- package/tools/setup.mjs +168 -168
- package/tools/sops-bridges.mjs +86 -86
- package/tools/sops.mjs +314 -314
- package/tools/sourcing.mjs +268 -268
- package/tools/strategy.mjs +146 -146
- package/tools/studio.mjs +132 -132
- package/tools/venueradar.mjs +151 -151
- package/tools/voice.mjs +137 -134
- package/tools.mjs +407 -407
package/tools/compare.mjs
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool family: compare - the honest, computed comparison.
|
|
3
|
-
*
|
|
4
|
-
* Workstream E1. A comparison in a slide is out of date the day after it is
|
|
5
|
-
* written. This counts KM Hub's side at the moment somebody asks, from the same
|
|
6
|
-
* sources the product runs on.
|
|
7
|
-
*
|
|
8
|
-
* 🚨 IT COUNTS KM HUB ONLY, ON PURPOSE. The API cannot see a competitor's product,
|
|
9
|
-
* and a stored figure about somebody else's software is a claim nobody can
|
|
10
|
-
* re-verify and nobody notices going stale. Booked is counted from the plugin
|
|
11
|
-
* actually installed on the reader's machine, by the /kmhub-vs-booked command, or
|
|
12
|
-
* it is reported as not installed. Never fill the gap from memory.
|
|
13
|
-
*
|
|
14
|
-
* The family contract this file follows is documented in ./README.md.
|
|
15
|
-
*/
|
|
16
|
-
import { readFileSync } from 'node:fs';
|
|
17
|
-
|
|
18
|
-
export const FAMILY = 'compare';
|
|
19
|
-
|
|
20
|
-
export const TOOLS = ['km_vs_booked'];
|
|
21
|
-
|
|
22
|
-
export const PROFILES = ['*'];
|
|
23
|
-
|
|
24
|
-
function routeMissing(r) {
|
|
25
|
-
return r.status === 404 || r.status === 405 || r.status === 501;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const NOT_SUPPORTED =
|
|
29
|
-
'Your KM Hub does not publish the comparison route yet. That is not a fault: the workspace is fine and every ' +
|
|
30
|
-
'other tool works as normal.';
|
|
31
|
-
|
|
32
|
-
/** The connector owns the tool and reach numbers, so they are read here, not fetched. */
|
|
33
|
-
function localCounts() {
|
|
34
|
-
try {
|
|
35
|
-
const caps = JSON.parse(readFileSync(new URL('../capabilities.json', import.meta.url), 'utf8'));
|
|
36
|
-
return {
|
|
37
|
-
gui_pages: caps?.counts?.pages ?? null,
|
|
38
|
-
pages_reachable_from_terminal: caps?.counts?.reachable_from_terminal ?? null,
|
|
39
|
-
pages_web_only_by_design: caps?.counts?.web_only_by_design ?? null,
|
|
40
|
-
pages_not_built_yet: caps?.counts?.web_only_not_built_yet ?? null,
|
|
41
|
-
pillars: caps?.counts?.pillars ?? null,
|
|
42
|
-
};
|
|
43
|
-
} catch {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function register(server, call, { out, text }) {
|
|
49
|
-
server.tool(
|
|
50
|
-
'km_vs_booked',
|
|
51
|
-
'The live, counted comparison of KM Hub Terminal Mode against Booked Solid, for when the user asks how the two ' +
|
|
52
|
-
'compare, whether to switch, or which does more. ' +
|
|
53
|
-
'Everything it returns about KM Hub is counted at the moment you ask, from the play catalogue, the active play ' +
|
|
54
|
-
'library and the connector capability map. Nothing is a stored marketing figure. ' +
|
|
55
|
-
'🚨 IT RETURNS NOTHING ABOUT BOOKED, and `booked` comes back null on purpose. To count Booked, use the installed ' +
|
|
56
|
-
'Booked Solid client\'s own capability inventory and CLI when that client is available on the same machine. ' +
|
|
57
|
-
'Treat its documented tool names and play identifiers as the source of the count. If Booked is not installed, ' +
|
|
58
|
-
'SAY SO and give KM Hub numbers alone. Never quote a Booked ' +
|
|
59
|
-
'figure from memory: an uncounted number is worse than an absent one, because nobody can tell afterwards which ' +
|
|
60
|
-
'it was. ' +
|
|
61
|
-
'🚨 Read `what_booked_does_better` and say at least one true thing in its favour BEFORE anything in KM Hub\'s. ' +
|
|
62
|
-
'It works with no internet, nothing leaves the client machine, and no subscription sits between somebody and ' +
|
|
63
|
-
'their own records. A model that produces an all-green comparison is a brochure, and the reader discounts ' +
|
|
64
|
-
'everything after the first one-sided line. ' +
|
|
65
|
-
'Read `the_honest_framing` too: these are different SHAPES of product, so a play count alone misleads in both ' +
|
|
66
|
-
'directions. Read only, sends nothing, changes nothing.',
|
|
67
|
-
{},
|
|
68
|
-
async () => {
|
|
69
|
-
const r = await call('GET', '/compare/terminal');
|
|
70
|
-
if (routeMissing(r)) return text(NOT_SUPPORTED, true);
|
|
71
|
-
if (!r.ok) return out(r);
|
|
72
|
-
const body = { ...(r.data || {}), kmhub_connector: localCounts() };
|
|
73
|
-
return { content: [{ type: 'text', text: JSON.stringify(body, null, 2) }] };
|
|
74
|
-
},
|
|
75
|
-
);
|
|
76
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Tool family: compare - the honest, computed comparison.
|
|
3
|
+
*
|
|
4
|
+
* Workstream E1. A comparison in a slide is out of date the day after it is
|
|
5
|
+
* written. This counts KM Hub's side at the moment somebody asks, from the same
|
|
6
|
+
* sources the product runs on.
|
|
7
|
+
*
|
|
8
|
+
* 🚨 IT COUNTS KM HUB ONLY, ON PURPOSE. The API cannot see a competitor's product,
|
|
9
|
+
* and a stored figure about somebody else's software is a claim nobody can
|
|
10
|
+
* re-verify and nobody notices going stale. Booked is counted from the plugin
|
|
11
|
+
* actually installed on the reader's machine, by the /kmhub-vs-booked command, or
|
|
12
|
+
* it is reported as not installed. Never fill the gap from memory.
|
|
13
|
+
*
|
|
14
|
+
* The family contract this file follows is documented in ./README.md.
|
|
15
|
+
*/
|
|
16
|
+
import { readFileSync } from 'node:fs';
|
|
17
|
+
|
|
18
|
+
export const FAMILY = 'compare';
|
|
19
|
+
|
|
20
|
+
export const TOOLS = ['km_vs_booked'];
|
|
21
|
+
|
|
22
|
+
export const PROFILES = ['*'];
|
|
23
|
+
|
|
24
|
+
function routeMissing(r) {
|
|
25
|
+
return r.status === 404 || r.status === 405 || r.status === 501;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const NOT_SUPPORTED =
|
|
29
|
+
'Your KM Hub does not publish the comparison route yet. That is not a fault: the workspace is fine and every ' +
|
|
30
|
+
'other tool works as normal.';
|
|
31
|
+
|
|
32
|
+
/** The connector owns the tool and reach numbers, so they are read here, not fetched. */
|
|
33
|
+
function localCounts() {
|
|
34
|
+
try {
|
|
35
|
+
const caps = JSON.parse(readFileSync(new URL('../capabilities.json', import.meta.url), 'utf8'));
|
|
36
|
+
return {
|
|
37
|
+
gui_pages: caps?.counts?.pages ?? null,
|
|
38
|
+
pages_reachable_from_terminal: caps?.counts?.reachable_from_terminal ?? null,
|
|
39
|
+
pages_web_only_by_design: caps?.counts?.web_only_by_design ?? null,
|
|
40
|
+
pages_not_built_yet: caps?.counts?.web_only_not_built_yet ?? null,
|
|
41
|
+
pillars: caps?.counts?.pillars ?? null,
|
|
42
|
+
};
|
|
43
|
+
} catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function register(server, call, { out, text }) {
|
|
49
|
+
server.tool(
|
|
50
|
+
'km_vs_booked',
|
|
51
|
+
'The live, counted comparison of KM Hub Terminal Mode against Booked Solid, for when the user asks how the two ' +
|
|
52
|
+
'compare, whether to switch, or which does more. ' +
|
|
53
|
+
'Everything it returns about KM Hub is counted at the moment you ask, from the play catalogue, the active play ' +
|
|
54
|
+
'library and the connector capability map. Nothing is a stored marketing figure. ' +
|
|
55
|
+
'🚨 IT RETURNS NOTHING ABOUT BOOKED, and `booked` comes back null on purpose. To count Booked, use the installed ' +
|
|
56
|
+
'Booked Solid client\'s own capability inventory and CLI when that client is available on the same machine. ' +
|
|
57
|
+
'Treat its documented tool names and play identifiers as the source of the count. If Booked is not installed, ' +
|
|
58
|
+
'SAY SO and give KM Hub numbers alone. Never quote a Booked ' +
|
|
59
|
+
'figure from memory: an uncounted number is worse than an absent one, because nobody can tell afterwards which ' +
|
|
60
|
+
'it was. ' +
|
|
61
|
+
'🚨 Read `what_booked_does_better` and say at least one true thing in its favour BEFORE anything in KM Hub\'s. ' +
|
|
62
|
+
'It works with no internet, nothing leaves the client machine, and no subscription sits between somebody and ' +
|
|
63
|
+
'their own records. A model that produces an all-green comparison is a brochure, and the reader discounts ' +
|
|
64
|
+
'everything after the first one-sided line. ' +
|
|
65
|
+
'Read `the_honest_framing` too: these are different SHAPES of product, so a play count alone misleads in both ' +
|
|
66
|
+
'directions. Read only, sends nothing, changes nothing.',
|
|
67
|
+
{},
|
|
68
|
+
async () => {
|
|
69
|
+
const r = await call('GET', '/compare/terminal');
|
|
70
|
+
if (routeMissing(r)) return text(NOT_SUPPORTED, true);
|
|
71
|
+
if (!r.ok) return out(r);
|
|
72
|
+
const body = { ...(r.data || {}), kmhub_connector: localCounts() };
|
|
73
|
+
return { content: [{ type: 'text', text: JSON.stringify(body, null, 2) }] };
|
|
74
|
+
},
|
|
75
|
+
);
|
|
76
|
+
}
|