@elevasis/sdk 1.20.0 → 1.20.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/dist/cli.cjs
CHANGED
|
@@ -42985,7 +42985,7 @@ function wrapAction(commandName, fn) {
|
|
|
42985
42985
|
// package.json
|
|
42986
42986
|
var package_default = {
|
|
42987
42987
|
name: "@elevasis/sdk",
|
|
42988
|
-
version: "1.20.
|
|
42988
|
+
version: "1.20.2",
|
|
42989
42989
|
description: "SDK for building Elevasis organization resources",
|
|
42990
42990
|
type: "module",
|
|
42991
42991
|
bin: {
|
|
@@ -46134,14 +46134,14 @@ function nodeTags(node, sourcePath) {
|
|
|
46134
46134
|
).map(slugify).filter((term) => term && !ROUTING_STOPWORDS.has(term) && (term.length >= 3 || term === "ai")).slice(0, 20)
|
|
46135
46135
|
]);
|
|
46136
46136
|
}
|
|
46137
|
-
function readCommandForNode(node) {
|
|
46137
|
+
function readCommandForNode(node, cliCommand = "elevasis") {
|
|
46138
46138
|
return [
|
|
46139
46139
|
{
|
|
46140
|
-
command: `pnpm exec
|
|
46140
|
+
command: `pnpm exec ${cliCommand} knowledge:cat ${node.id}`,
|
|
46141
46141
|
description: `Read ${node.title}`
|
|
46142
46142
|
},
|
|
46143
46143
|
{
|
|
46144
|
-
command: `pnpm exec
|
|
46144
|
+
command: `pnpm exec ${cliCommand} knowledge:ls /by-kind/${node.kind}`,
|
|
46145
46145
|
description: `List ${node.kind} knowledge nodes`
|
|
46146
46146
|
}
|
|
46147
46147
|
];
|
|
@@ -46186,7 +46186,7 @@ function generateGraphSkillsRegistry(nodes) {
|
|
|
46186
46186
|
domains: Object.fromEntries(Object.entries(domains).sort(([a], [b]) => a.localeCompare(b)))
|
|
46187
46187
|
};
|
|
46188
46188
|
}
|
|
46189
|
-
function generateKnowledgeFlagRegistry(nodes, sourcePaths = {}) {
|
|
46189
|
+
function generateKnowledgeFlagRegistry(nodes, sourcePaths = {}, options = {}) {
|
|
46190
46190
|
const routes = /* @__PURE__ */ new Map();
|
|
46191
46191
|
for (const node of nodes) {
|
|
46192
46192
|
const routeKey = node.domain ?? `kind-${node.kind}`;
|
|
@@ -46195,7 +46195,7 @@ function generateKnowledgeFlagRegistry(nodes, sourcePaths = {}) {
|
|
|
46195
46195
|
const routingTerms = nodeRoutingTerms(node, sourcePath, 24);
|
|
46196
46196
|
const tags = nodeTags(node, sourcePath);
|
|
46197
46197
|
const skills = uniqueSorted(node.skills);
|
|
46198
|
-
const cliBindings = readCommandForNode(node);
|
|
46198
|
+
const cliBindings = readCommandForNode(node, options.cliCommand);
|
|
46199
46199
|
const route = routes.get(flag) ?? {
|
|
46200
46200
|
flag,
|
|
46201
46201
|
label: toTitle(routeKey),
|
|
@@ -46310,7 +46310,13 @@ function generateKnowledgeNodes(options) {
|
|
|
46310
46310
|
(0, import_node_fs2.mkdirSync)((0, import_node_path2.dirname)(options.knowledgeFlagsOutputPath), { recursive: true });
|
|
46311
46311
|
(0, import_node_fs2.writeFileSync)(
|
|
46312
46312
|
options.knowledgeFlagsOutputPath,
|
|
46313
|
-
`${JSON.stringify(
|
|
46313
|
+
`${JSON.stringify(
|
|
46314
|
+
generateKnowledgeFlagRegistry(nodes, sourcePaths, {
|
|
46315
|
+
cliCommand: options.knowledgeFlagsCliCommand ?? "elevasis"
|
|
46316
|
+
}),
|
|
46317
|
+
null,
|
|
46318
|
+
2
|
|
46319
|
+
)}
|
|
46314
46320
|
`,
|
|
46315
46321
|
"utf8"
|
|
46316
46322
|
);
|
|
@@ -46358,6 +46364,7 @@ function registerKnowledgeGenerate(program3) {
|
|
|
46358
46364
|
outputPath,
|
|
46359
46365
|
graphSkillsOutputPath,
|
|
46360
46366
|
knowledgeFlagsOutputPath,
|
|
46367
|
+
knowledgeFlagsCliCommand: "elevasis-sdk",
|
|
46361
46368
|
sourceLabel: options.source ?? "core/config/knowledge/nodes"
|
|
46362
46369
|
});
|
|
46363
46370
|
process.stdout.write(`Generated ${result.nodes.length} knowledge node(s): ${result.outputPath}
|
package/dist/index.d.ts
CHANGED
|
@@ -10406,8 +10406,8 @@ type CrmStateKey = z.infer<typeof CrmStateKeySchema>
|
|
|
10406
10406
|
/**
|
|
10407
10407
|
* @elevasis/sdk - Types and utilities for building Elevasis organization resources
|
|
10408
10408
|
*
|
|
10409
|
-
* All types are re-exported from
|
|
10410
|
-
* via rollup-plugin-dts. External consumers never see
|
|
10409
|
+
* All types are re-exported from the internal core package and inlined at build time
|
|
10410
|
+
* via rollup-plugin-dts. External consumers never see internal workspace imports.
|
|
10411
10411
|
*/
|
|
10412
10412
|
|
|
10413
10413
|
declare const ListBuilderStageKeySchema: z.ZodEnum<{
|
package/dist/node/index.d.ts
CHANGED
package/dist/node/index.js
CHANGED
|
@@ -182,14 +182,14 @@ function nodeTags(node, sourcePath) {
|
|
|
182
182
|
).map(slugify).filter((term) => term && !ROUTING_STOPWORDS.has(term) && (term.length >= 3 || term === "ai")).slice(0, 20)
|
|
183
183
|
]);
|
|
184
184
|
}
|
|
185
|
-
function readCommandForNode(node) {
|
|
185
|
+
function readCommandForNode(node, cliCommand = "elevasis") {
|
|
186
186
|
return [
|
|
187
187
|
{
|
|
188
|
-
command: `pnpm exec
|
|
188
|
+
command: `pnpm exec ${cliCommand} knowledge:cat ${node.id}`,
|
|
189
189
|
description: `Read ${node.title}`
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
|
-
command: `pnpm exec
|
|
192
|
+
command: `pnpm exec ${cliCommand} knowledge:ls /by-kind/${node.kind}`,
|
|
193
193
|
description: `List ${node.kind} knowledge nodes`
|
|
194
194
|
}
|
|
195
195
|
];
|
|
@@ -234,7 +234,7 @@ function generateGraphSkillsRegistry(nodes) {
|
|
|
234
234
|
domains: Object.fromEntries(Object.entries(domains).sort(([a], [b]) => a.localeCompare(b)))
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
function generateKnowledgeFlagRegistry(nodes, sourcePaths = {}) {
|
|
237
|
+
function generateKnowledgeFlagRegistry(nodes, sourcePaths = {}, options = {}) {
|
|
238
238
|
const routes = /* @__PURE__ */ new Map();
|
|
239
239
|
for (const node of nodes) {
|
|
240
240
|
const routeKey = node.domain ?? `kind-${node.kind}`;
|
|
@@ -243,7 +243,7 @@ function generateKnowledgeFlagRegistry(nodes, sourcePaths = {}) {
|
|
|
243
243
|
const routingTerms = nodeRoutingTerms(node, sourcePath, 24);
|
|
244
244
|
const tags = nodeTags(node, sourcePath);
|
|
245
245
|
const skills = uniqueSorted(node.skills);
|
|
246
|
-
const cliBindings = readCommandForNode(node);
|
|
246
|
+
const cliBindings = readCommandForNode(node, options.cliCommand);
|
|
247
247
|
const route = routes.get(flag) ?? {
|
|
248
248
|
flag,
|
|
249
249
|
label: toTitle(routeKey),
|
|
@@ -358,7 +358,13 @@ function generateKnowledgeNodes(options) {
|
|
|
358
358
|
mkdirSync(dirname(options.knowledgeFlagsOutputPath), { recursive: true });
|
|
359
359
|
writeFileSync(
|
|
360
360
|
options.knowledgeFlagsOutputPath,
|
|
361
|
-
`${JSON.stringify(
|
|
361
|
+
`${JSON.stringify(
|
|
362
|
+
generateKnowledgeFlagRegistry(nodes, sourcePaths, {
|
|
363
|
+
cliCommand: options.knowledgeFlagsCliCommand ?? "elevasis"
|
|
364
|
+
}),
|
|
365
|
+
null,
|
|
366
|
+
2
|
|
367
|
+
)}
|
|
362
368
|
`,
|
|
363
369
|
"utf8"
|
|
364
370
|
);
|
|
@@ -5,7 +5,21 @@
|
|
|
5
5
|
* from within worker threads. Communicates with the parent process via
|
|
6
6
|
* postMessage() -- the parent dispatches to the real service layer.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
/** Token usage metadata returned for tool calls with cost accounting. */
|
|
9
|
+
interface TokenUsage {
|
|
10
|
+
inputTokens: number;
|
|
11
|
+
outputTokens: number;
|
|
12
|
+
cost?: number;
|
|
13
|
+
}
|
|
14
|
+
/** Inbound tool-result from parent */
|
|
15
|
+
interface ToolCallResponse {
|
|
16
|
+
type: 'tool-result';
|
|
17
|
+
id: string;
|
|
18
|
+
result?: unknown;
|
|
19
|
+
error?: string;
|
|
20
|
+
code?: string;
|
|
21
|
+
usage?: TokenUsage;
|
|
22
|
+
}
|
|
9
23
|
/** Inbound credential-result from parent */
|
|
10
24
|
interface CredentialResultMessage {
|
|
11
25
|
type: 'credential-result';
|
package/package.json
CHANGED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generatedBy": "generate-knowledge-nodes",
|
|
3
|
+
"routingMode": "deterministic-keyword",
|
|
4
|
+
"flags": {
|
|
5
|
+
"--kind-playbook": {
|
|
6
|
+
"flag": "--kind-playbook",
|
|
7
|
+
"label": "Kind Playbook",
|
|
8
|
+
"kind": "playbook",
|
|
9
|
+
"tags": [
|
|
10
|
+
"browser",
|
|
11
|
+
"delete",
|
|
12
|
+
"dev",
|
|
13
|
+
"first",
|
|
14
|
+
"knowledge",
|
|
15
|
+
"mdx",
|
|
16
|
+
"node",
|
|
17
|
+
"playbook",
|
|
18
|
+
"proves",
|
|
19
|
+
"rewrite",
|
|
20
|
+
"start",
|
|
21
|
+
"starter",
|
|
22
|
+
"welcome",
|
|
23
|
+
"welcome-mdx",
|
|
24
|
+
"wiring",
|
|
25
|
+
"works"
|
|
26
|
+
],
|
|
27
|
+
"queryTerms": [
|
|
28
|
+
"2026",
|
|
29
|
+
"2026-05-04",
|
|
30
|
+
"anywhere",
|
|
31
|
+
"appear",
|
|
32
|
+
"browser",
|
|
33
|
+
"codegen",
|
|
34
|
+
"config",
|
|
35
|
+
"core",
|
|
36
|
+
"delete",
|
|
37
|
+
"each",
|
|
38
|
+
"file",
|
|
39
|
+
"kind",
|
|
40
|
+
"knowledge",
|
|
41
|
+
"mdx",
|
|
42
|
+
"node",
|
|
43
|
+
"nodes",
|
|
44
|
+
"playbook",
|
|
45
|
+
"reference",
|
|
46
|
+
"starter",
|
|
47
|
+
"strategy",
|
|
48
|
+
"string",
|
|
49
|
+
"title",
|
|
50
|
+
"welcome",
|
|
51
|
+
"welcome-mdx"
|
|
52
|
+
],
|
|
53
|
+
"skills": [],
|
|
54
|
+
"cliBindings": [
|
|
55
|
+
{
|
|
56
|
+
"command": "pnpm exec elevasis-sdk knowledge:cat knowledge.welcome",
|
|
57
|
+
"description": "Read Welcome to the Knowledge Browser"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"command": "pnpm exec elevasis-sdk knowledge:ls /by-kind/playbook",
|
|
61
|
+
"description": "List playbook knowledge nodes"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"nodes": [
|
|
65
|
+
{
|
|
66
|
+
"id": "knowledge.welcome",
|
|
67
|
+
"title": "Welcome to the Knowledge Browser",
|
|
68
|
+
"kind": "playbook",
|
|
69
|
+
"sourcePath": "welcome.mdx",
|
|
70
|
+
"tags": [
|
|
71
|
+
"browser",
|
|
72
|
+
"delete",
|
|
73
|
+
"dev",
|
|
74
|
+
"first",
|
|
75
|
+
"knowledge",
|
|
76
|
+
"mdx",
|
|
77
|
+
"node",
|
|
78
|
+
"playbook",
|
|
79
|
+
"proves",
|
|
80
|
+
"rewrite",
|
|
81
|
+
"start",
|
|
82
|
+
"starter",
|
|
83
|
+
"welcome",
|
|
84
|
+
"welcome-mdx",
|
|
85
|
+
"wiring",
|
|
86
|
+
"works"
|
|
87
|
+
],
|
|
88
|
+
"routingTerms": [
|
|
89
|
+
"knowledge",
|
|
90
|
+
"nodes",
|
|
91
|
+
"browser",
|
|
92
|
+
"mdx",
|
|
93
|
+
"welcome",
|
|
94
|
+
"file",
|
|
95
|
+
"node",
|
|
96
|
+
"playbook",
|
|
97
|
+
"codegen",
|
|
98
|
+
"config",
|
|
99
|
+
"core",
|
|
100
|
+
"delete",
|
|
101
|
+
"each",
|
|
102
|
+
"kind",
|
|
103
|
+
"reference",
|
|
104
|
+
"starter",
|
|
105
|
+
"strategy",
|
|
106
|
+
"string",
|
|
107
|
+
"title",
|
|
108
|
+
"welcome-mdx",
|
|
109
|
+
"2026",
|
|
110
|
+
"2026-05-04",
|
|
111
|
+
"anywhere",
|
|
112
|
+
"appear"
|
|
113
|
+
],
|
|
114
|
+
"links": [],
|
|
115
|
+
"skills": [],
|
|
116
|
+
"cliBindings": [
|
|
117
|
+
{
|
|
118
|
+
"command": "pnpm exec elevasis-sdk knowledge:cat knowledge.welcome",
|
|
119
|
+
"description": "Read Welcome to the Knowledge Browser"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"command": "pnpm exec elevasis-sdk knowledge:ls /by-kind/playbook",
|
|
123
|
+
"description": "List playbook knowledge nodes"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"aliases": {
|
|
131
|
+
"2026": "--kind-playbook",
|
|
132
|
+
"2026-05-04": "--kind-playbook",
|
|
133
|
+
"anywhere": "--kind-playbook",
|
|
134
|
+
"appear": "--kind-playbook",
|
|
135
|
+
"browser": "--kind-playbook",
|
|
136
|
+
"codegen": "--kind-playbook",
|
|
137
|
+
"config": "--kind-playbook",
|
|
138
|
+
"core": "--kind-playbook",
|
|
139
|
+
"delete": "--kind-playbook",
|
|
140
|
+
"dev": "--kind-playbook",
|
|
141
|
+
"each": "--kind-playbook",
|
|
142
|
+
"file": "--kind-playbook",
|
|
143
|
+
"first": "--kind-playbook",
|
|
144
|
+
"kind": "--kind-playbook",
|
|
145
|
+
"kind playbook": "--kind-playbook",
|
|
146
|
+
"kind-playbook": "--kind-playbook",
|
|
147
|
+
"knowledge": "--kind-playbook",
|
|
148
|
+
"mdx": "--kind-playbook",
|
|
149
|
+
"node": "--kind-playbook",
|
|
150
|
+
"playbook": "--kind-playbook",
|
|
151
|
+
"proves": "--kind-playbook",
|
|
152
|
+
"rewrite": "--kind-playbook",
|
|
153
|
+
"start": "--kind-playbook",
|
|
154
|
+
"starter": "--kind-playbook"
|
|
155
|
+
}
|
|
156
|
+
}
|