@laitszkin/apollo-toolkit 3.14.0 → 3.14.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/CHANGELOG.md +15 -0
- package/dist/lib/tools/architecture.js +0 -11
- package/dist/lib/tools/validate-openai-agent-config.js +9 -3
- package/init-project-html/lib/atlas/cli.js +30 -4
- package/lib/tools/architecture.ts +0 -14
- package/lib/tools/validate-openai-agent-config.ts +7 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this repository are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v3.14.2] - 2026-05-15
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Support flags before verb in architecture atlas dispatch, preventing silent default to `open` when `--spec` precedes the verb (e.g., `apltk architecture --spec docs/plans/xxx feature add ...`).
|
|
10
|
+
|
|
11
|
+
## [v3.14.1] - 2026-05-15
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Replace non-existent `cli.main()` with `cli.dispatch()` in architecture handler, fixing `apltk architecture --help` crash.
|
|
16
|
+
- Correct `repoRoot()` path resolution in `validate-openai-agent-config` tool (3 levels up from `dist/lib/tools/` instead of 2) so CI validation finds skill directories.
|
|
17
|
+
- Add missing `npm run build` step to publish CI workflow so tests importing from `dist/` resolve correctly.
|
|
18
|
+
- Replace removed Python validation scripts (`validate_skill_frontmatter.py`, `validate_openai_agent_config.py`) in CI workflow with their TypeScript CLI equivalents.
|
|
19
|
+
|
|
5
20
|
## [v3.14.0] - 2026-05-15
|
|
6
21
|
|
|
7
22
|
### Added
|
|
@@ -5,23 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.architectureHandler = architectureHandler;
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
const LEGACY_VERBS = new Set(['open', 'diff']);
|
|
9
8
|
function architectureHandler(args, context) {
|
|
10
9
|
const sourceRoot = context.sourceRoot || node_path_1.default.resolve(__dirname, '..', '..', '..');
|
|
11
10
|
// Delegate to the existing atlas CLI (still in JS)
|
|
12
11
|
const cliPath = node_path_1.default.join(sourceRoot, 'init-project-html', 'lib', 'atlas', 'cli.js');
|
|
13
12
|
try {
|
|
14
13
|
const cli = require(cliPath);
|
|
15
|
-
const verb = args[0];
|
|
16
|
-
if (!verb || verb.startsWith('-') || LEGACY_VERBS.has(verb)) {
|
|
17
|
-
// Sync execution for legacy verbs
|
|
18
|
-
const code = cli.main(args, {
|
|
19
|
-
stdout: context.stdout || process.stdout,
|
|
20
|
-
stderr: context.stderr || process.stderr,
|
|
21
|
-
});
|
|
22
|
-
return Promise.resolve(code);
|
|
23
|
-
}
|
|
24
|
-
// Async dispatch for declarative verbs
|
|
25
14
|
return cli.dispatch(args, {
|
|
26
15
|
stdout: context.stdout || process.stdout,
|
|
27
16
|
stderr: context.stderr || process.stderr,
|
|
@@ -14,8 +14,14 @@ const INTERFACE_ALLOWED_KEYS = new Set([
|
|
|
14
14
|
'icon_small', 'icon_large', 'brand_color',
|
|
15
15
|
]);
|
|
16
16
|
const HEX_COLOR_PATTERN = /^#[0-9A-Fa-f]{6}$/;
|
|
17
|
-
function repoRoot() {
|
|
18
|
-
|
|
17
|
+
function repoRoot(context) {
|
|
18
|
+
if (context?.sourceRoot)
|
|
19
|
+
return context.sourceRoot;
|
|
20
|
+
// __dirname is dist/lib/tools/; need to go up 3 levels to project root
|
|
21
|
+
const fromDirname = node_path_1.default.resolve(__dirname, '..', '..', '..');
|
|
22
|
+
if (node_fs_1.default.existsSync(node_path_1.default.join(fromDirname, 'package.json')))
|
|
23
|
+
return fromDirname;
|
|
24
|
+
return node_path_1.default.resolve(__dirname, '..', '..', '..');
|
|
19
25
|
}
|
|
20
26
|
function iterSkillDirs(root) {
|
|
21
27
|
return node_fs_1.default.readdirSync(root)
|
|
@@ -162,7 +168,7 @@ function validateSkill(skillDir) {
|
|
|
162
168
|
return errors;
|
|
163
169
|
}
|
|
164
170
|
function validateOpenaiAgentConfigHandler(args, context) {
|
|
165
|
-
const root = repoRoot();
|
|
171
|
+
const root = repoRoot(context);
|
|
166
172
|
const skillDirs = iterSkillDirs(root);
|
|
167
173
|
if (!skillDirs.length) {
|
|
168
174
|
context.stdout?.write('No top-level skill directories found.\n');
|
|
@@ -968,6 +968,26 @@ function splitList(value) {
|
|
|
968
968
|
return String(value).split(',').map((s) => s.trim()).filter(Boolean);
|
|
969
969
|
}
|
|
970
970
|
|
|
971
|
+
function findFirstPositional(args) {
|
|
972
|
+
const booleanFlags = new Set(['no-render', 'no-open', 'help', 'force']);
|
|
973
|
+
let i = 0;
|
|
974
|
+
while (i < args.length) {
|
|
975
|
+
const token = args[i];
|
|
976
|
+
if (token === '--') return i + 1 < args.length ? i + 1 : -1;
|
|
977
|
+
if (token.startsWith('--')) {
|
|
978
|
+
const eq = token.indexOf('=');
|
|
979
|
+
if (eq !== -1) { i++; continue; }
|
|
980
|
+
const name = token.slice(2);
|
|
981
|
+
if (booleanFlags.has(name)) { i++; continue; }
|
|
982
|
+
if (i + 1 < args.length && !args[i + 1].startsWith('-')) { i += 2; } else { i++; }
|
|
983
|
+
continue;
|
|
984
|
+
}
|
|
985
|
+
if (token === '-h') { i++; continue; }
|
|
986
|
+
return i;
|
|
987
|
+
}
|
|
988
|
+
return -1;
|
|
989
|
+
}
|
|
990
|
+
|
|
971
991
|
function parseFlags(args) {
|
|
972
992
|
const positional = [];
|
|
973
993
|
const flags = Object.create(null);
|
|
@@ -1920,14 +1940,20 @@ async function dispatch(argv, io = { stdout: process.stdout, stderr: process.std
|
|
|
1920
1940
|
const args = [...argv];
|
|
1921
1941
|
let verb = 'open';
|
|
1922
1942
|
let explicitVerb = false;
|
|
1923
|
-
|
|
1924
|
-
|
|
1943
|
+
const verbIdx = findFirstPositional(args);
|
|
1944
|
+
if (verbIdx >= 0) {
|
|
1945
|
+
verb = args[verbIdx];
|
|
1925
1946
|
explicitVerb = true;
|
|
1947
|
+
args.splice(verbIdx, 1);
|
|
1926
1948
|
}
|
|
1927
1949
|
let subverb = null;
|
|
1928
1950
|
const multiVerbs = new Set(['feature', 'submodule', 'function', 'variable', 'dataflow', 'error', 'edge', 'meta', 'actor']);
|
|
1929
|
-
if (multiVerbs.has(verb)
|
|
1930
|
-
|
|
1951
|
+
if (multiVerbs.has(verb)) {
|
|
1952
|
+
const subverbIdx = findFirstPositional(args);
|
|
1953
|
+
if (subverbIdx >= 0) {
|
|
1954
|
+
subverb = args[subverbIdx];
|
|
1955
|
+
args.splice(subverbIdx, 1);
|
|
1956
|
+
}
|
|
1931
1957
|
}
|
|
1932
1958
|
const { flags } = parseFlags(args);
|
|
1933
1959
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import type { ToolContext } from '../types';
|
|
3
3
|
|
|
4
|
-
const LEGACY_VERBS = new Set(['open', 'diff']);
|
|
5
|
-
|
|
6
4
|
export function architectureHandler(args: string[], context: ToolContext): Promise<number> {
|
|
7
5
|
const sourceRoot = context.sourceRoot || path.resolve(__dirname, '..', '..', '..');
|
|
8
6
|
|
|
@@ -11,18 +9,6 @@ export function architectureHandler(args: string[], context: ToolContext): Promi
|
|
|
11
9
|
|
|
12
10
|
try {
|
|
13
11
|
const cli = require(cliPath);
|
|
14
|
-
|
|
15
|
-
const verb = args[0];
|
|
16
|
-
if (!verb || verb.startsWith('-') || LEGACY_VERBS.has(verb)) {
|
|
17
|
-
// Sync execution for legacy verbs
|
|
18
|
-
const code = cli.main(args, {
|
|
19
|
-
stdout: context.stdout || process.stdout,
|
|
20
|
-
stderr: context.stderr || process.stderr,
|
|
21
|
-
});
|
|
22
|
-
return Promise.resolve(code);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Async dispatch for declarative verbs
|
|
26
12
|
return cli.dispatch(args, {
|
|
27
13
|
stdout: context.stdout || process.stdout,
|
|
28
14
|
stderr: context.stderr || process.stderr,
|
|
@@ -11,8 +11,12 @@ const INTERFACE_ALLOWED_KEYS = new Set([
|
|
|
11
11
|
]);
|
|
12
12
|
const HEX_COLOR_PATTERN = /^#[0-9A-Fa-f]{6}$/;
|
|
13
13
|
|
|
14
|
-
function repoRoot(): string {
|
|
15
|
-
|
|
14
|
+
function repoRoot(context?: ToolContext): string {
|
|
15
|
+
if (context?.sourceRoot) return context.sourceRoot;
|
|
16
|
+
// __dirname is dist/lib/tools/; need to go up 3 levels to project root
|
|
17
|
+
const fromDirname = path.resolve(__dirname, '..', '..', '..');
|
|
18
|
+
if (fs.existsSync(path.join(fromDirname, 'package.json'))) return fromDirname;
|
|
19
|
+
return path.resolve(__dirname, '..', '..', '..');
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
function iterSkillDirs(root: string): string[] {
|
|
@@ -183,7 +187,7 @@ function validateSkill(skillDir: string): string[] {
|
|
|
183
187
|
}
|
|
184
188
|
|
|
185
189
|
export function validateOpenaiAgentConfigHandler(args: string[], context: ToolContext): Promise<number> {
|
|
186
|
-
const root = repoRoot();
|
|
190
|
+
const root = repoRoot(context);
|
|
187
191
|
const skillDirs = iterSkillDirs(root);
|
|
188
192
|
|
|
189
193
|
if (!skillDirs.length) {
|
package/package.json
CHANGED