@aigne/platform-helpers 0.1.0 → 0.1.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 +14 -0
- package/lib/cjs/nodejs/index.browser.d.ts +9 -0
- package/lib/cjs/nodejs/index.browser.js +20 -0
- package/lib/cjs/nodejs/index.d.ts +1 -0
- package/lib/cjs/nodejs/index.js +17 -0
- package/lib/cjs/nodejs/index.node.d.ts +9 -0
- package/lib/cjs/nodejs/index.node.js +31 -0
- package/lib/esm/nodejs/index.browser.d.ts +9 -0
- package/lib/esm/nodejs/index.browser.js +17 -0
- package/lib/esm/nodejs/index.d.ts +1 -0
- package/lib/esm/nodejs/index.js +1 -0
- package/lib/esm/nodejs/index.node.d.ts +9 -0
- package/lib/esm/nodejs/index.node.js +25 -0
- package/package.json +9 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.2](https://github.com/AIGNE-io/aigne-framework/compare/platform-helpers-v0.1.1...platform-helpers-v0.1.2) (2025-06-19)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* use `inputKey` instead of implicit $message for AIAgent ([#165](https://github.com/AIGNE-io/aigne-framework/issues/165)) ([8b6e589](https://github.com/AIGNE-io/aigne-framework/commit/8b6e5896bba8209fd2eecb0f5b9263618bffdaf8))
|
9
|
+
|
10
|
+
## [0.1.1](https://github.com/AIGNE-io/aigne-framework/compare/platform-helpers-v0.1.0...platform-helpers-v0.1.1) (2025-05-30)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* respect DEBUG env for logger ([#142](https://github.com/AIGNE-io/aigne-framework/issues/142)) ([f84738a](https://github.com/AIGNE-io/aigne-framework/commit/f84738acb382d9fb4f47253fcf91c92c02200053))
|
16
|
+
|
3
17
|
## [0.1.0](https://github.com/AIGNE-io/aigne-framework/compare/platform-helpers-v0.0.1...platform-helpers-v0.1.0) (2025-05-29)
|
4
18
|
|
5
19
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare const nodejs: {
|
2
|
+
customInspect: symbol;
|
3
|
+
isStdoutATTY: boolean;
|
4
|
+
isStderrATTY: boolean;
|
5
|
+
readonly env: typeof process.env;
|
6
|
+
readonly fs: typeof import("node:fs/promises");
|
7
|
+
readonly fsSync: typeof import("node:fs");
|
8
|
+
readonly path: typeof import("node:path");
|
9
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.nodejs = void 0;
|
4
|
+
exports.nodejs = {
|
5
|
+
customInspect: Symbol("inspect"),
|
6
|
+
isStdoutATTY: false,
|
7
|
+
isStderrATTY: false,
|
8
|
+
get env() {
|
9
|
+
return {};
|
10
|
+
},
|
11
|
+
get fs() {
|
12
|
+
throw new Error("This code must run in a Node.js environment.");
|
13
|
+
},
|
14
|
+
get fsSync() {
|
15
|
+
throw new Error("This code must run in a Node.js environment.");
|
16
|
+
},
|
17
|
+
get path() {
|
18
|
+
throw new Error("This code must run in a Node.js environment.");
|
19
|
+
},
|
20
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./index.browser.js";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./index.browser.js"), exports);
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare const nodejs: {
|
2
|
+
customInspect: symbol;
|
3
|
+
readonly isStdoutATTY: boolean;
|
4
|
+
readonly isStderrATTY: boolean;
|
5
|
+
readonly env: NodeJS.ProcessEnv;
|
6
|
+
readonly fs: typeof import("node:fs/promises");
|
7
|
+
readonly fsSync: typeof import("node:fs");
|
8
|
+
readonly path: typeof import("node:path");
|
9
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.nodejs = void 0;
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
8
|
+
const promises_1 = __importDefault(require("node:fs/promises"));
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
10
|
+
const node_util_1 = require("node:util");
|
11
|
+
exports.nodejs = {
|
12
|
+
customInspect: node_util_1.inspect.custom,
|
13
|
+
get isStdoutATTY() {
|
14
|
+
return process.stdout?.isTTY;
|
15
|
+
},
|
16
|
+
get isStderrATTY() {
|
17
|
+
return process.stderr?.isTTY;
|
18
|
+
},
|
19
|
+
get env() {
|
20
|
+
return process.env;
|
21
|
+
},
|
22
|
+
get fs() {
|
23
|
+
return promises_1.default;
|
24
|
+
},
|
25
|
+
get fsSync() {
|
26
|
+
return node_fs_1.default;
|
27
|
+
},
|
28
|
+
get path() {
|
29
|
+
return node_path_1.default;
|
30
|
+
},
|
31
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare const nodejs: {
|
2
|
+
customInspect: symbol;
|
3
|
+
isStdoutATTY: boolean;
|
4
|
+
isStderrATTY: boolean;
|
5
|
+
readonly env: typeof process.env;
|
6
|
+
readonly fs: typeof import("node:fs/promises");
|
7
|
+
readonly fsSync: typeof import("node:fs");
|
8
|
+
readonly path: typeof import("node:path");
|
9
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export const nodejs = {
|
2
|
+
customInspect: Symbol("inspect"),
|
3
|
+
isStdoutATTY: false,
|
4
|
+
isStderrATTY: false,
|
5
|
+
get env() {
|
6
|
+
return {};
|
7
|
+
},
|
8
|
+
get fs() {
|
9
|
+
throw new Error("This code must run in a Node.js environment.");
|
10
|
+
},
|
11
|
+
get fsSync() {
|
12
|
+
throw new Error("This code must run in a Node.js environment.");
|
13
|
+
},
|
14
|
+
get path() {
|
15
|
+
throw new Error("This code must run in a Node.js environment.");
|
16
|
+
},
|
17
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./index.browser.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./index.browser.js";
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare const nodejs: {
|
2
|
+
customInspect: symbol;
|
3
|
+
readonly isStdoutATTY: boolean;
|
4
|
+
readonly isStderrATTY: boolean;
|
5
|
+
readonly env: NodeJS.ProcessEnv;
|
6
|
+
readonly fs: typeof import("node:fs/promises");
|
7
|
+
readonly fsSync: typeof import("node:fs");
|
8
|
+
readonly path: typeof import("node:path");
|
9
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import fsSync from "node:fs";
|
2
|
+
import fs from "node:fs/promises";
|
3
|
+
import path from "node:path";
|
4
|
+
import { inspect } from "node:util";
|
5
|
+
export const nodejs = {
|
6
|
+
customInspect: inspect.custom,
|
7
|
+
get isStdoutATTY() {
|
8
|
+
return process.stdout?.isTTY;
|
9
|
+
},
|
10
|
+
get isStderrATTY() {
|
11
|
+
return process.stderr?.isTTY;
|
12
|
+
},
|
13
|
+
get env() {
|
14
|
+
return process.env;
|
15
|
+
},
|
16
|
+
get fs() {
|
17
|
+
return fs;
|
18
|
+
},
|
19
|
+
get fsSync() {
|
20
|
+
return fsSync;
|
21
|
+
},
|
22
|
+
get path() {
|
23
|
+
return path;
|
24
|
+
},
|
25
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aigne/platform-helpers",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.2",
|
4
4
|
"description": "AIGNE core library for building AI-powered applications",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -28,6 +28,14 @@
|
|
28
28
|
"import": "./lib/esm/mcp/stdio-client-transport.node.js"
|
29
29
|
},
|
30
30
|
"default": "./lib/esm/mcp/stdio-client-transport.js"
|
31
|
+
},
|
32
|
+
"./nodejs/index.js": {
|
33
|
+
"browser": "./lib/esm/nodejs/index.browser.js",
|
34
|
+
"node": {
|
35
|
+
"require": "./lib/cjs/nodejs/index.node.js",
|
36
|
+
"import": "./lib/esm/nodejs/index.node.js"
|
37
|
+
},
|
38
|
+
"default": "./lib/esm/nodejs/index.js"
|
31
39
|
}
|
32
40
|
},
|
33
41
|
"typesVersions": {
|