@alphafox/cli 0.3.16 → 0.3.18
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/catalog/allowlist.d.ts +6 -6
- package/dist/catalog/allowlist.js +15 -6
- package/dist/catalog/generated/registry.json +32 -8
- package/dist/catalog/generated/schemas.json +611 -514
- package/dist/commands/run.js +12 -7
- package/dist/skills-manifest.json +40 -40
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/account/SKILL.md +1 -1
- package/skills/admin/SKILL.md +25 -2
- package/skills/alphafox/SKILL.md +1 -1
- package/skills/alphafox-shared/SKILL.md +1 -1
- package/skills/auth/SKILL.md +1 -1
- package/skills/cache/SKILL.md +1 -1
- package/skills/engine-backtest/SKILL.md +1 -1
- package/skills/exchange/SKILL.md +1 -1
- package/skills/market/SKILL.md +1 -1
- package/skills/notification/SKILL.md +1 -1
- package/skills/strategy/SKILL.md +1 -1
- package/skills/trading/SKILL.md +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Unknown
|
|
2
|
+
* Finite set: infrastructure catalog paths, CLI-included operation facade paths,
|
|
3
|
+
* and explicitly documented direct admin paths.
|
|
4
|
+
* Unknown paths are denied — raw API cannot bypass the catalog or admin allowlist.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* Infra paths always allowed (exact, except `/api/v1/operations/*`).
|
|
@@ -17,9 +17,9 @@ export declare function normalizeApiPath(path: string): string;
|
|
|
17
17
|
export declare function isInternalDisallowedPath(path: string): boolean;
|
|
18
18
|
/** Match OpenAPI-style templates: /api/v1/engine-backtest/experiments/{experimentId}. */
|
|
19
19
|
export declare function pathTemplateMatches(template: string, actual: string, catchAll?: boolean): boolean;
|
|
20
|
+
export declare function isDirectAdminAllowlistedPath(path: string): boolean;
|
|
20
21
|
/**
|
|
21
|
-
* Finite allow set:
|
|
22
|
-
*
|
|
23
|
-
* Matching always uses the segment-resolved path (no `..` prefix smuggling).
|
|
22
|
+
* Finite allow set: infrastructure paths, generated facade paths, and exact
|
|
23
|
+
* direct admin paths. Matching always uses the segment-resolved path.
|
|
24
24
|
*/
|
|
25
25
|
export declare function isFacadeAllowlistedPath(path: string, extraAllow?: readonly string[]): boolean;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Unknown
|
|
3
|
+
* Finite set: infrastructure catalog paths, CLI-included operation facade paths,
|
|
4
|
+
* and explicitly documented direct admin paths.
|
|
5
|
+
* Unknown paths are denied — raw API cannot bypass the catalog or admin allowlist.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.FACILITY_ALWAYS_ALLOW = void 0;
|
|
9
9
|
exports.normalizeApiPath = normalizeApiPath;
|
|
10
10
|
exports.isInternalDisallowedPath = isInternalDisallowedPath;
|
|
11
11
|
exports.pathTemplateMatches = pathTemplateMatches;
|
|
12
|
+
exports.isDirectAdminAllowlistedPath = isDirectAdminAllowlistedPath;
|
|
12
13
|
exports.isFacadeAllowlistedPath = isFacadeAllowlistedPath;
|
|
13
14
|
const operations_1 = require("./operations");
|
|
14
15
|
const INTERNAL_PREFIXES = [
|
|
@@ -29,6 +30,9 @@ exports.FACILITY_ALWAYS_ALLOW = [
|
|
|
29
30
|
"/api/v1/openapi",
|
|
30
31
|
"/api/v1/operations",
|
|
31
32
|
];
|
|
33
|
+
const DIRECT_ADMIN_ALLOW = {
|
|
34
|
+
"/api/admin/passivbot-paper-acceptance-traders": true,
|
|
35
|
+
};
|
|
32
36
|
/**
|
|
33
37
|
* Decode percent-encoded path segments (up to twice for double-encoding)
|
|
34
38
|
* without turning encoded slashes into separators mid-segment incorrectly:
|
|
@@ -128,6 +132,9 @@ function isInfraAllowlisted(n) {
|
|
|
128
132
|
}
|
|
129
133
|
return false;
|
|
130
134
|
}
|
|
135
|
+
function isDirectAdminAllowlistedPath(path) {
|
|
136
|
+
return DIRECT_ADMIN_ALLOW[normalizeApiPath(path)] === true;
|
|
137
|
+
}
|
|
131
138
|
function isCatalogPathMatch(n) {
|
|
132
139
|
for (const op of operations_1.CATALOG_OPERATIONS) {
|
|
133
140
|
if (pathTemplateMatches(op.path, n, Boolean(op.catchAll))) {
|
|
@@ -145,15 +152,17 @@ function isExtraAllowMatch(n, extraAllow) {
|
|
|
145
152
|
return false;
|
|
146
153
|
}
|
|
147
154
|
/**
|
|
148
|
-
* Finite allow set:
|
|
149
|
-
*
|
|
150
|
-
* Matching always uses the segment-resolved path (no `..` prefix smuggling).
|
|
155
|
+
* Finite allow set: infrastructure paths, generated facade paths, and exact
|
|
156
|
+
* direct admin paths. Matching always uses the segment-resolved path.
|
|
151
157
|
*/
|
|
152
158
|
function isFacadeAllowlistedPath(path, extraAllow = []) {
|
|
153
159
|
const n = normalizeApiPath(path);
|
|
154
160
|
if (isInternalDisallowedPath(n)) {
|
|
155
161
|
return false;
|
|
156
162
|
}
|
|
163
|
+
if (isDirectAdminAllowlistedPath(n)) {
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
157
166
|
if (n !== "/api/v1" && !n.startsWith("/api/v1/")) {
|
|
158
167
|
return false;
|
|
159
168
|
}
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
"source": {
|
|
3
3
|
"package": "@alphafoxai/contracts",
|
|
4
4
|
"export": "public-api",
|
|
5
|
-
"contractsSha": "
|
|
6
|
-
"registryVersion": "
|
|
7
|
-
"contractVersion": "2026-08-
|
|
8
|
-
"scannedAt": "2026-08-
|
|
9
|
-
"totalOperations":
|
|
10
|
-
"cliOperations":
|
|
5
|
+
"contractsSha": "c2b17780baea3236ab1b7c0ec982f3f93f1ae08d",
|
|
6
|
+
"registryVersion": "3.0.0",
|
|
7
|
+
"contractVersion": "2026-08-31",
|
|
8
|
+
"scannedAt": "2026-08-31",
|
|
9
|
+
"totalOperations": 277,
|
|
10
|
+
"cliOperations": 258
|
|
11
11
|
},
|
|
12
12
|
"compatibility": {
|
|
13
|
-
"contractVersion": "2026-08-
|
|
14
|
-
"registryVersion": "
|
|
13
|
+
"contractVersion": "2026-08-31",
|
|
14
|
+
"registryVersion": "3.0.0",
|
|
15
15
|
"minCliVersion": "0.0.0",
|
|
16
16
|
"maxCliVersion": "0.99.99",
|
|
17
17
|
"openapi": "3.1.0"
|
|
@@ -4469,6 +4469,30 @@
|
|
|
4469
4469
|
"responseSchema": "JsonValue",
|
|
4470
4470
|
"errorSchema": "ProblemDetails"
|
|
4471
4471
|
},
|
|
4472
|
+
{
|
|
4473
|
+
"operationId": "signal_sources.byId.trade_events.list",
|
|
4474
|
+
"method": "GET",
|
|
4475
|
+
"path": "/api/v1/signal-sources/{id}/trade-events",
|
|
4476
|
+
"role": "user",
|
|
4477
|
+
"risk": "read",
|
|
4478
|
+
"auth": "bearer",
|
|
4479
|
+
"scopes": [
|
|
4480
|
+
"openid",
|
|
4481
|
+
"profile",
|
|
4482
|
+
"signal-sources:read"
|
|
4483
|
+
],
|
|
4484
|
+
"stream": false,
|
|
4485
|
+
"file": false,
|
|
4486
|
+
"pagination": true,
|
|
4487
|
+
"idempotent": true,
|
|
4488
|
+
"mvp": false,
|
|
4489
|
+
"catchAll": false,
|
|
4490
|
+
"contractStatus": "envelope",
|
|
4491
|
+
"requestBodySchema": null,
|
|
4492
|
+
"querySchema": "JsonObject",
|
|
4493
|
+
"responseSchema": "JsonValue",
|
|
4494
|
+
"errorSchema": "ProblemDetails"
|
|
4495
|
+
},
|
|
4472
4496
|
{
|
|
4473
4497
|
"operationId": "spread_radar.episodes.list",
|
|
4474
4498
|
"method": "GET",
|