@robota-sdk/agent-command-settings 3.0.0-beta.63
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/LICENSE +21 -0
- package/dist/node/index.cjs +71 -0
- package/dist/node/index.d.cts +10 -0
- package/dist/node/index.d.ts +10 -0
- package/dist/node/index.js +42 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Robota Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
SettingsCommandSource: () => SettingsCommandSource,
|
|
24
|
+
createSettingsCommandEntry: () => createSettingsCommandEntry,
|
|
25
|
+
createSettingsCommandModule: () => createSettingsCommandModule
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
|
|
29
|
+
// src/settings-command-module.ts
|
|
30
|
+
function createSettingsCommandEntry() {
|
|
31
|
+
return {
|
|
32
|
+
name: "settings",
|
|
33
|
+
description: "Open transport settings \u2014 enable/disable transports and configure options",
|
|
34
|
+
source: "settings",
|
|
35
|
+
modelInvocable: false
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function createSettingsSystemCommand() {
|
|
39
|
+
const entry = createSettingsCommandEntry();
|
|
40
|
+
return {
|
|
41
|
+
name: entry.name,
|
|
42
|
+
description: entry.description,
|
|
43
|
+
userInvocable: true,
|
|
44
|
+
modelInvocable: false,
|
|
45
|
+
lifecycle: "inline",
|
|
46
|
+
execute: async () => ({
|
|
47
|
+
success: true,
|
|
48
|
+
message: "Opening settings...",
|
|
49
|
+
effects: [{ type: "settings-tui-requested" }]
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
var SettingsCommandSource = class {
|
|
54
|
+
name = "settings";
|
|
55
|
+
getCommands() {
|
|
56
|
+
return [createSettingsCommandEntry()];
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
function createSettingsCommandModule() {
|
|
60
|
+
return {
|
|
61
|
+
name: "agent-command-settings",
|
|
62
|
+
commandSources: [new SettingsCommandSource()],
|
|
63
|
+
systemCommands: [createSettingsSystemCommand()]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
SettingsCommandSource,
|
|
69
|
+
createSettingsCommandEntry,
|
|
70
|
+
createSettingsCommandModule
|
|
71
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICommandSource, ICommand, ICommandModule } from '@robota-sdk/agent-sdk';
|
|
2
|
+
|
|
3
|
+
declare function createSettingsCommandEntry(): ICommand;
|
|
4
|
+
declare class SettingsCommandSource implements ICommandSource {
|
|
5
|
+
readonly name = "settings";
|
|
6
|
+
getCommands(): ICommand[];
|
|
7
|
+
}
|
|
8
|
+
declare function createSettingsCommandModule(): ICommandModule;
|
|
9
|
+
|
|
10
|
+
export { SettingsCommandSource, createSettingsCommandEntry, createSettingsCommandModule };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICommandSource, ICommand, ICommandModule } from '@robota-sdk/agent-sdk';
|
|
2
|
+
|
|
3
|
+
declare function createSettingsCommandEntry(): ICommand;
|
|
4
|
+
declare class SettingsCommandSource implements ICommandSource {
|
|
5
|
+
readonly name = "settings";
|
|
6
|
+
getCommands(): ICommand[];
|
|
7
|
+
}
|
|
8
|
+
declare function createSettingsCommandModule(): ICommandModule;
|
|
9
|
+
|
|
10
|
+
export { SettingsCommandSource, createSettingsCommandEntry, createSettingsCommandModule };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/settings-command-module.ts
|
|
2
|
+
function createSettingsCommandEntry() {
|
|
3
|
+
return {
|
|
4
|
+
name: "settings",
|
|
5
|
+
description: "Open transport settings \u2014 enable/disable transports and configure options",
|
|
6
|
+
source: "settings",
|
|
7
|
+
modelInvocable: false
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function createSettingsSystemCommand() {
|
|
11
|
+
const entry = createSettingsCommandEntry();
|
|
12
|
+
return {
|
|
13
|
+
name: entry.name,
|
|
14
|
+
description: entry.description,
|
|
15
|
+
userInvocable: true,
|
|
16
|
+
modelInvocable: false,
|
|
17
|
+
lifecycle: "inline",
|
|
18
|
+
execute: async () => ({
|
|
19
|
+
success: true,
|
|
20
|
+
message: "Opening settings...",
|
|
21
|
+
effects: [{ type: "settings-tui-requested" }]
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
var SettingsCommandSource = class {
|
|
26
|
+
name = "settings";
|
|
27
|
+
getCommands() {
|
|
28
|
+
return [createSettingsCommandEntry()];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
function createSettingsCommandModule() {
|
|
32
|
+
return {
|
|
33
|
+
name: "agent-command-settings",
|
|
34
|
+
commandSources: [new SettingsCommandSource()],
|
|
35
|
+
systemCommands: [createSettingsSystemCommand()]
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
SettingsCommandSource,
|
|
40
|
+
createSettingsCommandEntry,
|
|
41
|
+
createSettingsCommandModule
|
|
42
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@robota-sdk/agent-command-settings",
|
|
3
|
+
"version": "3.0.0-beta.63",
|
|
4
|
+
"description": "/settings command module for Robota sessions — transport enable/disable TUI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/node/index.js",
|
|
7
|
+
"types": "dist/node/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/node/index.d.ts",
|
|
11
|
+
"source": "./src/index.ts",
|
|
12
|
+
"node": {
|
|
13
|
+
"import": "./dist/node/index.js",
|
|
14
|
+
"require": "./dist/node/index.cjs"
|
|
15
|
+
},
|
|
16
|
+
"default": {
|
|
17
|
+
"import": "./dist/node/index.js",
|
|
18
|
+
"require": "./dist/node/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/woojubb/robota.git",
|
|
25
|
+
"directory": "packages/agent-command-settings"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://robota.io/",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/woojubb/robota/issues"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@robota-sdk/agent-sdk": "3.0.0-beta.63"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"rimraf": "^5.0.5",
|
|
39
|
+
"tsup": "^8.0.1",
|
|
40
|
+
"typescript": "^5.3.3",
|
|
41
|
+
"vitest": "^1.6.1"
|
|
42
|
+
},
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --out-dir dist/node --clean",
|
|
49
|
+
"build:js": "tsup src/index.ts --format esm,cjs --out-dir dist/node --clean --no-dts",
|
|
50
|
+
"build:types": "tsup src/index.ts --format esm,cjs --dts-only --out-dir dist/node",
|
|
51
|
+
"test": "vitest run --passWithNoTests",
|
|
52
|
+
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"lint": "eslint src/ --ext .ts",
|
|
55
|
+
"clean": "rimraf dist"
|
|
56
|
+
}
|
|
57
|
+
}
|