@voxgig/sdkgen 4.45.0 → 4.46.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/bin/voxgig-sdkgen +1 -1
- package/dist/action/check.js +15 -0
- package/dist/action/check.js.map +1 -1
- package/dist/action/copies.js +1 -0
- package/dist/action/copies.js.map +1 -1
- package/dist/action/doctor.d.ts +21 -2
- package/dist/action/doctor.js +166 -9
- package/dist/action/doctor.js.map +1 -1
- package/dist/action/package.js +9 -0
- package/dist/action/package.js.map +1 -1
- package/dist/action/remove.js +2 -1
- package/dist/action/remove.js.map +1 -1
- package/dist/action/target.d.ts +2 -1
- package/dist/action/target.js +50 -11
- package/dist/action/target.js.map +1 -1
- package/dist/cmp/AgentGuide.js +19 -8
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideContent.d.ts +6 -4
- package/dist/cmp/AgentGuideContent.js +51 -32
- package/dist/cmp/AgentGuideContent.js.map +1 -1
- package/dist/cmp/AgentGuideFeature.js +5 -3
- package/dist/cmp/AgentGuideFeature.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +84 -46
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Changelog.js +12 -1
- package/dist/cmp/Changelog.js.map +1 -1
- package/dist/cmp/Deploy.js +22 -20
- package/dist/cmp/Deploy.js.map +1 -1
- package/dist/cmp/ExternalTarget.js +5 -5
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Feature.js +10 -3
- package/dist/cmp/Feature.js.map +1 -1
- package/dist/cmp/FeatureDocs.d.ts +6 -4
- package/dist/cmp/FeatureDocs.js +14 -39
- package/dist/cmp/FeatureDocs.js.map +1 -1
- package/dist/cmp/FeatureHook.d.ts +7 -1
- package/dist/cmp/FeatureHook.js +34 -1
- package/dist/cmp/FeatureHook.js.map +1 -1
- package/dist/cmp/PublishWorkflow.js +30 -6
- package/dist/cmp/PublishWorkflow.js.map +1 -1
- package/dist/cmp/ReadmeErrors.js +521 -18
- package/dist/cmp/ReadmeErrors.js.map +1 -1
- package/dist/cmp/ReadmeExplanation.js +280 -44
- package/dist/cmp/ReadmeExplanation.js.map +1 -1
- package/dist/cmp/ReadmeFeatures.js +16 -7
- package/dist/cmp/ReadmeFeatures.js.map +1 -1
- package/dist/cmp/ReadmeIntro.js +3 -2
- package/dist/cmp/ReadmeIntro.js.map +1 -1
- package/dist/cmp/ReadmeRefFeatures.js +34 -24
- package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
- package/dist/cmp/ReadmeStation.js +11 -8
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +472 -373
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/ReadmeUnions.js +8 -2
- package/dist/cmp/ReadmeUnions.js.map +1 -1
- package/dist/cmp/Security.js +3 -2
- package/dist/cmp/Security.js.map +1 -1
- package/dist/helpers/applicability.d.ts +2 -1
- package/dist/helpers/applicability.js +26 -0
- package/dist/helpers/applicability.js.map +1 -1
- package/dist/helpers/copymerge.d.ts +3 -0
- package/dist/helpers/copymerge.js +43 -10
- package/dist/helpers/copymerge.js.map +1 -1
- package/dist/helpers/doccheck.d.ts +11 -0
- package/dist/helpers/doccheck.js +146 -0
- package/dist/helpers/doccheck.js.map +1 -0
- package/dist/helpers/doctext.d.ts +11 -0
- package/dist/helpers/doctext.js +84 -0
- package/dist/helpers/doctext.js.map +1 -0
- package/dist/helpers/exampleCall.d.ts +16 -0
- package/dist/helpers/exampleCall.js +334 -0
- package/dist/helpers/exampleCall.js.map +1 -0
- package/dist/helpers/exportnames.d.ts +4 -0
- package/dist/helpers/exportnames.js +35 -0
- package/dist/helpers/exportnames.js.map +1 -0
- package/dist/helpers/facts.d.ts +2 -1
- package/dist/helpers/facts.js +37 -2
- package/dist/helpers/facts.js.map +1 -1
- package/dist/helpers/modelcheck.d.ts +2 -1
- package/dist/helpers/modelcheck.js +13 -0
- package/dist/helpers/modelcheck.js.map +1 -1
- package/dist/helpers/opExample.d.ts +9 -2
- package/dist/helpers/opExample.js +22 -2
- package/dist/helpers/opExample.js.map +1 -1
- package/dist/helpers/opShape.d.ts +2 -1
- package/dist/helpers/opShape.js +12 -0
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/packageMeta.js +21 -8
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/helpers/semver.d.ts +2 -1
- package/dist/helpers/semver.js +7 -0
- package/dist/helpers/semver.js.map +1 -1
- package/dist/sdkgen.js +21 -2
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.d.ts +1 -0
- package/dist/testkit.js +23 -19
- package/dist/testkit.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utility.js +2 -1
- package/dist/utility.js.map +1 -1
- package/model/fact.aontu +44 -0
- package/model/sdkgen.aontu +6 -2
- package/package.json +3 -1
- package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +1 -1
- package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +1 -1
- package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +12 -3
- package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +4 -1
- package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +1 -0
- package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +3 -0
- package/project/.sdk/src/cmp/swift/ReadmeTopQuick_swift.ts +2 -1
- package/project/.sdk/src/cmp/zig/ReadmeOptions_zig.ts +1 -1
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +2 -2
- package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +2 -2
- package/project/sdkgen-package.json +1 -1
- package/src/action/check.ts +21 -0
- package/src/action/copies.ts +2 -0
- package/src/action/doctor.ts +244 -13
- package/src/action/package.ts +10 -0
- package/src/action/remove.ts +2 -1
- package/src/action/target.ts +66 -15
- package/src/cmp/AgentGuide.ts +24 -10
- package/src/cmp/AgentGuideContent.ts +53 -32
- package/src/cmp/AgentGuideFeature.ts +6 -4
- package/src/cmp/AgentGuideTop.ts +108 -47
- package/src/cmp/Changelog.ts +13 -2
- package/src/cmp/Deploy.ts +23 -21
- package/src/cmp/ExternalTarget.ts +6 -6
- package/src/cmp/Feature.ts +11 -4
- package/src/cmp/FeatureDocs.ts +21 -40
- package/src/cmp/FeatureHook.ts +38 -1
- package/src/cmp/PublishWorkflow.ts +33 -7
- package/src/cmp/ReadmeErrors.ts +555 -25
- package/src/cmp/ReadmeExplanation.ts +316 -52
- package/src/cmp/ReadmeFeatures.ts +18 -8
- package/src/cmp/ReadmeIntro.ts +3 -2
- package/src/cmp/ReadmeRefFeatures.ts +39 -27
- package/src/cmp/ReadmeStation.ts +12 -14
- package/src/cmp/ReadmeTop.ts +528 -387
- package/src/cmp/ReadmeUnions.ts +10 -2
- package/src/cmp/Security.ts +3 -2
- package/src/helpers/applicability.ts +28 -0
- package/src/helpers/copymerge.ts +58 -10
- package/src/helpers/doccheck.ts +174 -0
- package/src/helpers/doctext.ts +113 -0
- package/src/helpers/exampleCall.ts +415 -0
- package/src/helpers/exportnames.ts +47 -0
- package/src/helpers/facts.ts +47 -2
- package/src/helpers/modelcheck.ts +16 -0
- package/src/helpers/opExample.ts +34 -2
- package/src/helpers/opShape.ts +13 -0
- package/src/helpers/packageMeta.ts +21 -8
- package/src/helpers/semver.ts +9 -0
- package/src/sdkgen.ts +27 -3
- package/src/testkit.ts +30 -20
- package/src/utility.ts +2 -1
package/dist/cmp/AgentGuide.js
CHANGED
|
@@ -38,6 +38,8 @@ npm run build # only if you changed a component
|
|
|
38
38
|
npm run generate # refreshes this ${lang}/ directory
|
|
39
39
|
\`\`\`
|
|
40
40
|
|
|
41
|
+
${(0, AgentGuideContent_1.regenerationStatement)()}
|
|
42
|
+
|
|
41
43
|
Then build and test the generated output:
|
|
42
44
|
|
|
43
45
|
${(0, AgentGuideContent_1.langCommandsBlock)(lang)}
|
|
@@ -53,6 +55,7 @@ ${(0, AgentGuideContent_1.langCommandsBlock)(lang)}
|
|
|
53
55
|
Decision rule: *same for every API → template; depends on the API →
|
|
54
56
|
component.* After editing a component run \`npm run build\` before
|
|
55
57
|
\`npm run generate\`; template-only edits just need \`npm run generate\`.
|
|
58
|
+
${(0, AgentGuideContent_1.copiesStatement)(model)}
|
|
56
59
|
|
|
57
60
|
`);
|
|
58
61
|
if (featuresOn && 0 < features.length) {
|
|
@@ -71,19 +74,27 @@ Each feature's runtime and its own guide live in \`src/feature/<name>/\`.
|
|
|
71
74
|
`);
|
|
72
75
|
}
|
|
73
76
|
else {
|
|
74
|
-
(0,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
const templates = (0, AgentGuideContent_1.featureTemplates)(ctx$.fs(), target, features);
|
|
78
|
+
const shared = 0 === Object.keys(templates).length;
|
|
79
|
+
(0, jostraca_1.Content)(`Each feature's hooks and default activation come from
|
|
80
|
+
\`.sdk/model/feature/<name>.aontu\`. ${shared
|
|
81
|
+
? `This target has no template per
|
|
82
|
+
feature: customise its features in the runtime under \`.sdk/tm/${lang}/\`
|
|
83
|
+
and regenerate.`
|
|
84
|
+
: `Its runtime is generated from the template
|
|
85
|
+
listed here: customise that and regenerate.`}
|
|
77
86
|
|
|
78
|
-
| Feature |
|
|
79
|
-
| --- | --- | --- |
|
|
87
|
+
| Feature | ${shared ? '' : 'Template | '}Active hooks |
|
|
88
|
+
| --- | ${shared ? '' : '--- | '}--- |
|
|
80
89
|
`);
|
|
81
90
|
features.forEach((f) => {
|
|
82
|
-
const
|
|
91
|
+
const template = templates[f.name];
|
|
83
92
|
const hooks = (0, AgentGuideContent_1.featureHooks)(f);
|
|
84
93
|
const hookList = hooks.length ? hooks.map((h) => '\`' + h + '\`').join(', ') : '—';
|
|
85
94
|
const label = f.title ? `**${f.name}** — ${f.title}` : `**${f.name}**`;
|
|
86
|
-
|
|
95
|
+
const where = shared ? '' :
|
|
96
|
+
(null == template ? '—' : '\`.sdk/tm/' + lang + '/' + template + '\`') + ' | ';
|
|
97
|
+
(0, jostraca_1.Content)(`| ${label} | ${where}${hookList} |
|
|
87
98
|
`);
|
|
88
99
|
});
|
|
89
100
|
(0, jostraca_1.Content)(`
|
|
@@ -107,7 +118,7 @@ Generated by [@voxgig/sdkgen](https://github.com/voxgig/sdkgen). See the
|
|
|
107
118
|
// where each feature has its own directory to hold the guide. Flat-layout
|
|
108
119
|
// targets document features inline above; phase-disabled targets
|
|
109
120
|
// (go-cli/go-mcp) get no feature docs at all.
|
|
110
|
-
if (
|
|
121
|
+
if ((0, AgentGuideContent_1.writesFeatureGuides)(model, target)) {
|
|
111
122
|
features.forEach((feature) => {
|
|
112
123
|
(0, AgentGuideFeature_1.AgentGuideFeature)({ target, feature });
|
|
113
124
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentGuide.js","sourceRoot":"","sources":["../../src/cmp/AgentGuide.ts"],"names":[],"mappings":";;;AACA,uCAAwC;AACxC,oDAA0C;AAE1C,kDAAuD;AAEvD,
|
|
1
|
+
{"version":3,"file":"AgentGuide.js","sourceRoot":"","sources":["../../src/cmp/AgentGuide.ts"],"names":[],"mappings":";;;AACA,uCAAwC;AACxC,oDAA0C;AAE1C,kDAAuD;AAEvD,2DAa4B;AAE5B,2DAAuD;AAGvD,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,sCAAsC;AACtC,MAAM,UAAU,GAAG,IAAA,eAAG,EAAC,SAAS,UAAU,CAAC,KAAU;IACnD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IAEtB,MAAM,IAAI,GAAG,IAAA,+BAAW,EAAC,KAAK,CAAC,CAAA;IAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAA;IACxB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,IAAI,CAAA;IAClC,MAAM,OAAO,G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CAAA;oBAChF,IAAA,kBAAO,EAAC,KAAK,KAAK,MAAM,KAAK,GAAG,QAAQ;CACjD,CAAC,CAAA;gBACM,CAAC,CAAC,CAAA;gBACF,IAAA,kBAAO,EAAC;CACf,CAAC,CAAA;YACI,CAAC;QACH,CAAC;QAED,MAAM,cAAc,GAClB,IAAA,4BAAiB,EAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,CAAA;QAC/C,IAAI,cAAc,EAAE,CAAC;YACnB,cAAc,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAC1C,CAAC;QAED,IAAA,kBAAO,EAAC;;;;CAIX,CAAC,CAAA;IACA,CAAC,CAAC,CAAA;IAEF,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE;QAC/B,IAAA,kBAAO,EAAC,IAAA,iCAAa,EAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;IAEF,4EAA4E;IAC5E,0EAA0E;IAC1E,iEAAiE;IACjE,8CAA8C;IAC9C,IAAI,IAAA,uCAAmB,EAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC;QACvC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAY,EAAE,EAAE;YAChC,IAAA,qCAAiB,EAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;QACxC,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,CAAC,CAAA;AACpF,CAAC,CAAC,CAAA;QAIA,UAAU"}
|
|
@@ -10,16 +10,18 @@ declare function langCmd(name: string): LangCmd;
|
|
|
10
10
|
declare function langCommandsBlock(name: string): string;
|
|
11
11
|
declare function featuresEnabled(target: any): boolean;
|
|
12
12
|
declare function isDirLayout(target: any): boolean;
|
|
13
|
-
declare function
|
|
14
|
-
declare function
|
|
13
|
+
declare function featureTemplates(fs: any, target: any, features: any[]): Record<string, string>;
|
|
14
|
+
declare function writesFeatureGuides(model: any, target: any): boolean;
|
|
15
15
|
declare function featureHooks(feature: any): string[];
|
|
16
16
|
declare function activeTargets(model: any): any[];
|
|
17
17
|
declare function activeFeatures(model: any, target?: any): any[];
|
|
18
18
|
declare function activeEntities(model: any): any[];
|
|
19
19
|
declare function projectName(model: any): string;
|
|
20
|
-
declare function
|
|
20
|
+
declare function regenerationStatement(): string;
|
|
21
|
+
declare function copiesStatement(model: any): string;
|
|
22
|
+
declare function workflowSection(model: any): string;
|
|
21
23
|
declare function featureSection(): string;
|
|
22
24
|
declare function customiseSection(): string;
|
|
23
25
|
declare function aontuSection(): string;
|
|
24
26
|
declare function claudePointer(title: string): string;
|
|
25
|
-
export { LANG_CMD, langCmd, langCommandsBlock, featuresEnabled, isDirLayout,
|
|
27
|
+
export { LANG_CMD, langCmd, langCommandsBlock, featuresEnabled, isDirLayout, featureTemplates, writesFeatureGuides, featureHooks, activeTargets, activeFeatures, activeEntities, projectName, workflowSection, regenerationStatement, copiesStatement, featureSection, customiseSection, aontuSection, claudePointer, };
|
|
@@ -5,19 +5,24 @@ exports.langCmd = langCmd;
|
|
|
5
5
|
exports.langCommandsBlock = langCommandsBlock;
|
|
6
6
|
exports.featuresEnabled = featuresEnabled;
|
|
7
7
|
exports.isDirLayout = isDirLayout;
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
8
|
+
exports.featureTemplates = featureTemplates;
|
|
9
|
+
exports.writesFeatureGuides = writesFeatureGuides;
|
|
10
10
|
exports.featureHooks = featureHooks;
|
|
11
11
|
exports.activeTargets = activeTargets;
|
|
12
12
|
exports.activeFeatures = activeFeatures;
|
|
13
13
|
exports.activeEntities = activeEntities;
|
|
14
14
|
exports.projectName = projectName;
|
|
15
15
|
exports.workflowSection = workflowSection;
|
|
16
|
+
exports.regenerationStatement = regenerationStatement;
|
|
17
|
+
exports.copiesStatement = copiesStatement;
|
|
16
18
|
exports.featureSection = featureSection;
|
|
17
19
|
exports.customiseSection = customiseSection;
|
|
18
20
|
exports.aontuSection = aontuSection;
|
|
19
21
|
exports.claudePointer = claudePointer;
|
|
20
22
|
const applicability_1 = require("../helpers/applicability");
|
|
23
|
+
const facts_1 = require("../helpers/facts");
|
|
24
|
+
const featureSource_1 = require("../helpers/featureSource");
|
|
25
|
+
const copymerge_1 = require("../helpers/copymerge");
|
|
21
26
|
const jostraca_1 = require("jostraca");
|
|
22
27
|
const types_1 = require("../types");
|
|
23
28
|
const LANG_CMD = {
|
|
@@ -64,23 +69,30 @@ function langCommandsBlock(name) {
|
|
|
64
69
|
return '```bash\n# in this target directory (' + name + '/):\n' + lines.join('\n') + '\n```\n';
|
|
65
70
|
}
|
|
66
71
|
function featuresEnabled(target) {
|
|
67
|
-
return target
|
|
72
|
+
return (0, facts_1.fact)(target, 'phase').feature;
|
|
68
73
|
}
|
|
69
|
-
// ts/js lay each feature out as a directory `src/feature/<name
|
|
70
|
-
// SDK targets (`srcfeature: false`)
|
|
71
|
-
// package. Drives where feature guides live / are referenced.
|
|
74
|
+
// ts/js lay each feature out as a directory `src/feature/<name>/`, which also
|
|
75
|
+
// holds its guide; the other SDK targets (`srcfeature: false`) do not.
|
|
72
76
|
function isDirLayout(target) {
|
|
73
77
|
return target?.srcfeature !== false;
|
|
74
78
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
// Each feature's runtime template as discovery finds it in the target's tree,
|
|
80
|
+
// skipping the empty `src/feature/<name>/` a flat-layout target also keeps.
|
|
81
|
+
function featureTemplates(fs, target, features) {
|
|
82
|
+
const dirLayout = isDirLayout(target);
|
|
83
|
+
const out = {};
|
|
84
|
+
const found = (0, featureSource_1.findFeatureSources)(fs, 'tm/' + target.name, features.map((f) => String(f.name).toLowerCase()));
|
|
85
|
+
for (const s of found) {
|
|
86
|
+
if (!dirLayout && s.path.startsWith('src/feature/'))
|
|
87
|
+
continue;
|
|
88
|
+
if (null == out[s.name])
|
|
89
|
+
out[s.name] = s.path + (s.folder ? '/' : '');
|
|
82
90
|
}
|
|
83
|
-
return
|
|
91
|
+
return out;
|
|
92
|
+
}
|
|
93
|
+
function writesFeatureGuides(model, target) {
|
|
94
|
+
return featuresEnabled(target) && isDirLayout(target) &&
|
|
95
|
+
0 < activeFeatures(model, target).length;
|
|
84
96
|
}
|
|
85
97
|
function featureHooks(feature) {
|
|
86
98
|
return (0, jostraca_1.each)(feature.hook || {})
|
|
@@ -108,7 +120,23 @@ function activeEntities(model) {
|
|
|
108
120
|
function projectName(model) {
|
|
109
121
|
return model.Name || model.const?.Name || model.name || 'SDK';
|
|
110
122
|
}
|
|
111
|
-
|
|
123
|
+
// What a run does to the files it generates, stated once for every guide.
|
|
124
|
+
function regenerationStatement() {
|
|
125
|
+
return `Each \`npm run generate\` rewrites every file it generates, so an edit
|
|
126
|
+
made to generated output is lost, and deletes the files it generated before
|
|
127
|
+
and no longer emits. A target or a phase switched off is left as it was.`;
|
|
128
|
+
}
|
|
129
|
+
function copiesStatement(model) {
|
|
130
|
+
return copymerge_1.MERGE === (0, copymerge_1.copyMode)(model?.main?.[types_1.KIT]?.copies) ?
|
|
131
|
+
`\`target add\` and \`feature add\` copy templates and components into
|
|
132
|
+
\`.sdk/\`, and merge toolchain updates into the copies this project has
|
|
133
|
+
edited.` :
|
|
134
|
+
`\`target add\` and \`feature add\` overwrite the templates and components
|
|
135
|
+
in \`.sdk/\` (\`main: kit: copies: 'overwrite'\`): set \`copies\` to
|
|
136
|
+
\`'merge'\` before customising them, so that an add merges toolchain updates
|
|
137
|
+
into the edited copies.`;
|
|
138
|
+
}
|
|
139
|
+
function workflowSection(model) {
|
|
112
140
|
return `## Generating and updating the SDK
|
|
113
141
|
|
|
114
142
|
All generation is driven from the \`.sdk/\` directory. The generated language
|
|
@@ -123,15 +151,8 @@ npm run build # compile .sdk/src/cmp -> .sdk/dist
|
|
|
123
151
|
npm run generate # emit/refresh the SDK into ../<lang>
|
|
124
152
|
\`\`\`
|
|
125
153
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
\`ProjectName\` or \`GOMODULE\` in generated output, delete that one file and
|
|
129
|
-
regenerate it fresh:
|
|
130
|
-
|
|
131
|
-
\`\`\`bash
|
|
132
|
-
rm <lang>/<the-file-with-the-placeholder>
|
|
133
|
-
npm run generate
|
|
134
|
-
\`\`\`
|
|
154
|
+
${regenerationStatement()}
|
|
155
|
+
${copiesStatement(model)}
|
|
135
156
|
|
|
136
157
|
Note: the \`voxgig-sdkgen\` CLI only *scaffolds* (\`target add\` /
|
|
137
158
|
\`feature add\`). Generation itself runs via \`npm run generate\` (backed by
|
|
@@ -159,13 +180,11 @@ so nothing downstream complains. To inspect the model layer **without side
|
|
|
159
180
|
effects**, use \`npm run dry-generate\` (\`-y\`, writes nothing). Never
|
|
160
181
|
\`--no-config\` in anything whose output might be committed.
|
|
161
182
|
|
|
162
|
-
**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
To find either, the target trees must be deleted and regenerated — a
|
|
168
|
-
regeneration in place cannot see stale output at all.
|
|
183
|
+
**Dropping a target deletes nothing.** A run deletes only what it no longer
|
|
184
|
+
emits from the targets and phases that ran, so a target dropped from the
|
|
185
|
+
model, or a phase switched off, leaves its files in the tree, and \`git
|
|
186
|
+
status\` is silent because they are committed and unchanged. Delete them by
|
|
187
|
+
hand.
|
|
169
188
|
`;
|
|
170
189
|
}
|
|
171
190
|
function featureSection() {
|
|
@@ -173,7 +192,7 @@ function featureSection() {
|
|
|
173
192
|
|
|
174
193
|
A **feature** is a pipeline extension: an object of hooks that fire at named
|
|
175
194
|
stages of every entity operation (each target's guide documents its
|
|
176
|
-
features).
|
|
195
|
+
features).
|
|
177
196
|
|
|
178
197
|
\`\`\`bash
|
|
179
198
|
cd .sdk
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentGuideContent.js","sourceRoot":"","sources":["../../src/cmp/AgentGuideContent.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AgentGuideContent.js","sourceRoot":"","sources":["../../src/cmp/AgentGuideContent.ts"],"names":[],"mappings":";;;QAwTE,OAAO;QACP,iBAAiB;QACjB,eAAe;QACf,WAAW;QACX,gBAAgB;QAChB,mBAAmB;QACnB,YAAY;QACZ,aAAa;QACb,cAAc;QACd,cAAc;QACd,WAAW;QACX,eAAe;QACf,qBAAqB;QACrB,eAAe;QACf,cAAc;QACd,gBAAgB;QAChB,YAAY;QACZ,aAAa;AAxUf,4DAAyD;AACzD,4CAAuC;AACvC,4DAA6D;AAC7D,oDAAsD;AAEtD,uCAA+B;AAE/B,oCAGiB;AASjB,MAAM,QAAQ,GAA4B;IACxC,EAAE,EAAG,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE;IAC9C,EAAE,EAAG,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE;IAC9C,EAAE,EAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IACtB,EAAE,EAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE;IACnD,GAAG,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE;IACnD,EAAE,EAAG,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE;IACjD,GAAG,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE;IAChD,QAAQ,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,2CAA2C,EAAE;IACxF,QAAQ,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,iEAAiE,EAAE;IAC9G,SAAS,EA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AAO,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAA;AAC/D,CAAC;AAID,0EAA0E;AAC1E,SAAS,qBAAqB;IAC5B,OAAO;;yEAEgE,CAAA;AACzE,CAAC;AAED,SAAS,eAAe,CAAC,KAAU;IACjC,OAAO,iBAAK,KAAK,IAAA,oBAAQ,EAAC,KAAK,EAAE,IAAI,EAAE,CAAC,WAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QACrD;;QAEI,CAAC,CAAC;QACN;;;wBAGoB,CAAA;AACxB,CAAC;AAGD,SAAS,eAAe,CAAC,KAAU;IACjC,OAAO;;;;;;;;;;;;;;EAcP,qBAAqB,EAAE;EACvB,eAAe,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCvB,CAAA;AACD,CAAC;AAGD,SAAS,cAAc;IACrB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BR,CAAA;AACD,CAAC;AAGD,SAAS,gBAAgB;IACvB,OAAO;;;;;;;;;;;;;;;;;;;;CAoBR,CAAA;AACD,CAAC;AAGD,SAAS,YAAY;IACnB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCR,CAAA;AACD,CAAC;AAGD,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,KAAK,KAAK;;;;;CAKlB,CAAA;AACD,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.AgentGuideFeature = void 0;
|
|
|
4
4
|
const jostraca_1 = require("jostraca");
|
|
5
5
|
const component_1 = require("../helpers/component");
|
|
6
6
|
const facts_1 = require("../helpers/facts");
|
|
7
|
+
const opShape_1 = require("../helpers/opShape");
|
|
7
8
|
const AgentGuideContent_1 = require("./AgentGuideContent");
|
|
8
9
|
function cap(s) {
|
|
9
10
|
return s ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
@@ -24,6 +25,7 @@ const AgentGuideFeature = (0, component_1.cmp)(function AgentGuideFeature(props)
|
|
|
24
25
|
.map((h) => h.name || h.key$)
|
|
25
26
|
.filter(Boolean);
|
|
26
27
|
const defaultOn = (0, facts_1.fact)(feature, 'on');
|
|
28
|
+
const ops = (0, opShape_1.generatedOps)(ctx$.model);
|
|
27
29
|
(0, jostraca_1.Folder)({ name: 'src/feature/' + name }, () => {
|
|
28
30
|
(0, jostraca_1.File)({ name: 'AGENTS.md' }, () => {
|
|
29
31
|
(0, jostraca_1.Content)(`# ${Name}Feature — Agent Guide
|
|
@@ -31,7 +33,7 @@ const AgentGuideFeature = (0, component_1.cmp)(function AgentGuideFeature(props)
|
|
|
31
33
|
${title} (v${version}).
|
|
32
34
|
|
|
33
35
|
A **feature** is a pipeline extension: an object of hooks that fire at named
|
|
34
|
-
stages of every entity operation (
|
|
36
|
+
stages of every entity operation${0 < ops.length ? ' (' + ops.join(', ') + ')' : ''} and of
|
|
35
37
|
the SDK/entity lifecycle. Features are how you inspect or modify the request
|
|
36
38
|
pipeline without forking the SDK. This directory holds the **generated**
|
|
37
39
|
runtime for the \`${name}\` feature in the ${target.title || lang} target — do
|
|
@@ -73,8 +75,8 @@ later feature can override an earlier one.
|
|
|
73
75
|
\`.sdk/tm/${lang}/src/feature/${name}/\`, then regenerate.
|
|
74
76
|
|
|
75
77
|
After any change: \`cd ../../../../.sdk && npm run generate\` (add
|
|
76
|
-
\`npm run build\` first if you changed a component).
|
|
77
|
-
|
|
78
|
+
\`npm run build\` first if you changed a component).
|
|
79
|
+
${(0, AgentGuideContent_1.regenerationStatement)()}
|
|
78
80
|
|
|
79
81
|
To author a **new** feature, copy this one's model + template shape — see the
|
|
80
82
|
[project guide](../../../../AGENTS.md) and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentGuideFeature.js","sourceRoot":"","sources":["../../src/cmp/AgentGuideFeature.ts"],"names":[],"mappings":";;;AACA,uCAAsD;AACtD,oDAA0C;AAC1C,4C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YAC/B,IAAA,kBAAO,EAAC,IAAA,iCAAa,EAAC,GAAG,IAAI,YAAY,IAAI,GAAG,CAAC,CAAC,CAAA;QACpD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;QACf,KAAK,EAAE,6BAA6B,EAAE,MAAM,EAAE,OAAO;QACrD,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,YAAY,GAAG,IAAI;KAC7C,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;QAIA,iBAAiB"}
|
|
@@ -3,18 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AgentGuideTop = void 0;
|
|
4
4
|
const jostraca_1 = require("jostraca");
|
|
5
5
|
const component_1 = require("../helpers/component");
|
|
6
|
+
const facts_1 = require("../helpers/facts");
|
|
6
7
|
const AgentGuideContent_1 = require("./AgentGuideContent");
|
|
7
|
-
const
|
|
8
|
-
const {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
(0, jostraca_1.names)(model, model.name);
|
|
12
|
-
const Name = (0, AgentGuideContent_1.projectName)(model);
|
|
13
|
-
const targets = (0, AgentGuideContent_1.activeTargets)(model);
|
|
14
|
-
const features = (0, AgentGuideContent_1.activeFeatures)(model);
|
|
15
|
-
const entities = (0, AgentGuideContent_1.activeEntities)(model);
|
|
16
|
-
(0, jostraca_1.File)({ name: 'AGENTS.md' }, () => {
|
|
17
|
-
(0, jostraca_1.Content)(`# ${Name} SDK — Agent Guide
|
|
8
|
+
const AgentGuideTopIntro = (0, component_1.cmp)(function AgentGuideTopIntro(props) {
|
|
9
|
+
const { Name, model, targets } = props.s;
|
|
10
|
+
const featureGuides = targets.some((t) => (0, facts_1.fact)(t, 'phase').agentguide && (0, AgentGuideContent_1.writesFeatureGuides)(model, t));
|
|
11
|
+
(0, jostraca_1.Content)(`# ${Name} SDK — Agent Guide
|
|
18
12
|
|
|
19
13
|
This is a **generated** multi-language SDK project. The client libraries in
|
|
20
14
|
each language directory are produced by [@voxgig/sdkgen](https://github.com/voxgig/sdkgen)
|
|
@@ -23,51 +17,63 @@ from an API model; the generator, model, templates, and components all live in
|
|
|
23
17
|
a template, or a component and regenerate.
|
|
24
18
|
|
|
25
19
|
There are companion guides deeper in the tree: one per language
|
|
26
|
-
(\`<lang>/AGENTS.md\`) and one per feature
|
|
27
|
-
(\`<lang>/src/feature/<name>/AGENTS.md\`).
|
|
20
|
+
(\`<lang>/AGENTS.md\`)${featureGuides ? `, and one per feature in a target that keeps each
|
|
21
|
+
feature in its own directory (\`<lang>/src/feature/<name>/AGENTS.md\`)` : ''}.
|
|
28
22
|
|
|
29
23
|
## Project map
|
|
30
24
|
|
|
31
25
|
`);
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
});
|
|
27
|
+
const AgentGuideTopTargets = (0, component_1.cmp)(function AgentGuideTopTargets(props) {
|
|
28
|
+
const { targets } = props.s;
|
|
29
|
+
if (0 < targets.length) {
|
|
30
|
+
(0, jostraca_1.Content)(`**Targets** (${targets.length}):
|
|
34
31
|
|
|
35
32
|
| Target | Directory | Build guide |
|
|
36
33
|
| --- | --- | --- |
|
|
37
34
|
`);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
targets.forEach((t) => {
|
|
36
|
+
const note = (0, AgentGuideContent_1.langCmd)(t.name).note ? ' — ' + (0, AgentGuideContent_1.langCmd)(t.name).note : '';
|
|
37
|
+
(0, jostraca_1.Content)(`| \`${t.name}\` | \`${t.name}/\`${note} | [\`${t.name}/AGENTS.md\`](./${t.name}/AGENTS.md) |
|
|
41
38
|
`);
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
});
|
|
40
|
+
(0, jostraca_1.Content)(`
|
|
44
41
|
`);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const AgentGuideTopFeatures = (0, component_1.cmp)(function AgentGuideTopFeatures(props) {
|
|
45
|
+
const { features } = props.s;
|
|
46
|
+
if (0 < features.length) {
|
|
47
|
+
(0, jostraca_1.Content)(`**Features** (${features.length}): `);
|
|
48
|
+
(0, jostraca_1.Content)(features.map((f) => `\`${f.name}\``).join(', ') + `.
|
|
49
49
|
|
|
50
|
-
Each feature is generated into
|
|
51
|
-
|
|
52
|
-
package (other languages). Each target's guide documents its features.
|
|
50
|
+
Each feature is generated into each SDK target that supports it, and each
|
|
51
|
+
target's guide documents where that target keeps its features.
|
|
53
52
|
|
|
54
53
|
`);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const AgentGuideTopEntities = (0, component_1.cmp)(function AgentGuideTopEntities(props) {
|
|
57
|
+
const { entities } = props.s;
|
|
58
|
+
if (0 < entities.length) {
|
|
59
|
+
(0, jostraca_1.Content)(`**Entities** (${entities.length}): `);
|
|
60
|
+
(0, jostraca_1.Content)(entities.map((e) => `\`${e.Name || e.name}\``).join(', ') + `.
|
|
59
61
|
|
|
60
62
|
`);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const AgentGuideTopStation = (0, component_1.cmp)(function AgentGuideTopStation(props) {
|
|
66
|
+
const { features } = props.s;
|
|
67
|
+
// Station paragraph (station design §9.4; declarative design §11
|
|
68
|
+
// item 4), only when the model carries the feature: an agent working
|
|
69
|
+
// on this repo should know the runtime story without leaving
|
|
70
|
+
// AGENTS.md — and, first, that the application's integrations are
|
|
71
|
+
// DECLARED in station.json, so that file is where to look.
|
|
72
|
+
const station = features.find((f) => 'station' === f.name);
|
|
73
|
+
if (null != station) {
|
|
74
|
+
(0, jostraca_1.Content)(`**Station**: this SDK is a
|
|
69
75
|
[voxgig/station](https://github.com/voxgig/station) plugin (the
|
|
70
|
-
\`station\` feature, off by default). An application's outbound
|
|
76
|
+
\`station\` feature, ${(0, facts_1.fact)(station, 'on') ? 'on' : 'off'} by default). An application's outbound
|
|
71
77
|
integrations are **declared in \`station.json\`** at its repo root —
|
|
72
78
|
to learn what the application talks to, read that file: every SDK
|
|
73
79
|
instance (\`sdk\`), per-api default (\`api\`), feature setting, and
|
|
@@ -83,12 +89,22 @@ with Station" README section and \`src/feature/station/\` (or the
|
|
|
83
89
|
target's feature container) for the generated adapter.
|
|
84
90
|
|
|
85
91
|
`);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
const AgentGuideTopWorkflow = (0, component_1.cmp)(function AgentGuideTopWorkflow(props) {
|
|
95
|
+
(0, jostraca_1.Content)((0, AgentGuideContent_1.workflowSection)(props.s.model));
|
|
96
|
+
});
|
|
97
|
+
const AgentGuideTopFeatureGuide = (0, component_1.cmp)(function AgentGuideTopFeatureGuide() {
|
|
98
|
+
(0, jostraca_1.Content)((0, AgentGuideContent_1.featureSection)());
|
|
99
|
+
});
|
|
100
|
+
const AgentGuideTopCustomise = (0, component_1.cmp)(function AgentGuideTopCustomise() {
|
|
101
|
+
(0, jostraca_1.Content)((0, AgentGuideContent_1.customiseSection)());
|
|
102
|
+
});
|
|
103
|
+
const AgentGuideTopAontu = (0, component_1.cmp)(function AgentGuideTopAontu() {
|
|
104
|
+
(0, jostraca_1.Content)((0, AgentGuideContent_1.aontuSection)());
|
|
105
|
+
});
|
|
106
|
+
const AgentGuideTopLayout = (0, component_1.cmp)(function AgentGuideTopLayout() {
|
|
107
|
+
(0, jostraca_1.Content)(`## Where things live
|
|
92
108
|
|
|
93
109
|
\`\`\`
|
|
94
110
|
.sdk/
|
|
@@ -106,6 +122,28 @@ Makefile per-target deploy recipes
|
|
|
106
122
|
Generated by [@voxgig/sdkgen](https://github.com/voxgig/sdkgen). Regenerate
|
|
107
123
|
with \`cd .sdk && npm run generate\`.
|
|
108
124
|
`);
|
|
125
|
+
});
|
|
126
|
+
const AgentGuideTop = (0, component_1.cmp)(function AgentGuideTop(props) {
|
|
127
|
+
const { ctx$ } = props;
|
|
128
|
+
const { model } = ctx$;
|
|
129
|
+
if (model.name && !model.Name)
|
|
130
|
+
(0, jostraca_1.names)(model, model.name);
|
|
131
|
+
const Name = (0, AgentGuideContent_1.projectName)(model);
|
|
132
|
+
const targets = (0, AgentGuideContent_1.activeTargets)(model);
|
|
133
|
+
const features = (0, AgentGuideContent_1.activeFeatures)(model);
|
|
134
|
+
const entities = (0, AgentGuideContent_1.activeEntities)(model);
|
|
135
|
+
const s = { Name, model, targets, features, entities };
|
|
136
|
+
(0, jostraca_1.File)({ name: 'AGENTS.md' }, () => {
|
|
137
|
+
AgentGuideTopIntro({ s });
|
|
138
|
+
AgentGuideTopTargets({ s });
|
|
139
|
+
AgentGuideTopFeatures({ s });
|
|
140
|
+
AgentGuideTopEntities({ s });
|
|
141
|
+
AgentGuideTopStation({ s });
|
|
142
|
+
AgentGuideTopWorkflow({ s });
|
|
143
|
+
AgentGuideTopFeatureGuide({ s });
|
|
144
|
+
AgentGuideTopCustomise({ s });
|
|
145
|
+
AgentGuideTopAontu({ s });
|
|
146
|
+
AgentGuideTopLayout({ s });
|
|
109
147
|
});
|
|
110
148
|
(0, jostraca_1.File)({ name: 'CLAUDE.md' }, () => {
|
|
111
149
|
(0, jostraca_1.Content)((0, AgentGuideContent_1.claudePointer)(`${Name} SDK`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentGuideTop.js","sourceRoot":"","sources":["../../src/cmp/AgentGuideTop.ts"],"names":[],"mappings":";;;AACA,uCAA+C;AAC/C,oDAA0C;
|
|
1
|
+
{"version":3,"file":"AgentGuideTop.js","sourceRoot":"","sources":["../../src/cmp/AgentGuideTop.ts"],"names":[],"mappings":";;;AACA,uCAA+C;AAC/C,oDAA0C;AAC1C,4C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C,IAAA,iCAAa,EAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,CAAC,CAAA;AAC9E,CAAC,CAAC,CAAA;QAIA,aAAa"}
|
package/dist/cmp/Changelog.js
CHANGED
|
@@ -3,10 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Changelog = void 0;
|
|
4
4
|
const jostraca_1 = require("jostraca");
|
|
5
5
|
const component_1 = require("../helpers/component");
|
|
6
|
+
const packageMeta_1 = require("../helpers/packageMeta");
|
|
7
|
+
const types_1 = require("../types");
|
|
6
8
|
const Changelog = (0, component_1.cmp)(function Changelog(props) {
|
|
7
9
|
const { ctx$ } = props;
|
|
8
10
|
const { model } = ctx$;
|
|
9
11
|
const name = model.Name || model.name;
|
|
12
|
+
// Written once, so the first entry is the version the targets start at; a
|
|
13
|
+
// heading with no number when they start at different ones.
|
|
14
|
+
const versions = new Set();
|
|
15
|
+
(0, jostraca_1.each)((0, types_1.getModelPath)(model, `main.${types_1.KIT}.target`) || {}, (t) => {
|
|
16
|
+
if (false !== t.active)
|
|
17
|
+
versions.add((0, packageMeta_1.packageVersion)(model, t.name));
|
|
18
|
+
});
|
|
19
|
+
const first = 1 < versions.size ? 'Initial release' :
|
|
20
|
+
`[${[...versions][0] || (0, packageMeta_1.packageVersion)(model, '')}]`;
|
|
10
21
|
(0, jostraca_1.File)({ name: 'CHANGELOG.md', exclude: true }, () => {
|
|
11
22
|
(0, jostraca_1.Content)(`# Changelog
|
|
12
23
|
|
|
@@ -16,7 +27,7 @@ This project follows [Keep a Changelog](https://keepachangelog.com) and
|
|
|
16
27
|
|
|
17
28
|
## [Unreleased]
|
|
18
29
|
|
|
19
|
-
##
|
|
30
|
+
## ${first}
|
|
20
31
|
|
|
21
32
|
- Initial generated release of the ${name} SDK (TypeScript, Python, PHP, Go,
|
|
22
33
|
Ruby, and Lua, plus CLI and MCP surfaces), generated from the upstream
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Changelog.js","sourceRoot":"","sources":["../../src/cmp/Changelog.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Changelog.js","sourceRoot":"","sources":["../../src/cmp/Changelog.ts"],"names":[],"mappings":";;;AAAA,uCAA8C;AAC9C,oDAA0C;AAC1C,wDAAuD;AACvD,oCAA4C;AAG5C,MAAM,SAAS,GAAG,IAAA,eAAG,EAAC,SAAS,SAAS,CAAC,KAAU;IACjD,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IACtB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IAEtB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAA;IAErC,0EAA0E;IAC1E,4DAA4D;IAC5D,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAA;IAClC,IAAA,eAAI,EAAC,IAAA,oBAAY,EAAC,KAAK,EAAE,QAAQ,WAAG,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAM,EAAE,EAAE;QAC/D,IAAI,KAAK,KAAK,CAAC,CAAC,MAAM;YAAE,QAAQ,CAAC,GAAG,CAAC,IAAA,4BAAc,EAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IACF,MAAM,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;QACnD,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,IAAA,4BAAc,EAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAA;IAEtD,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,E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