@uipath/context-grounding-tool 0.1.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/dist/index.js +10 -0
- package/dist/tool.js +121 -0
- package/package.json +55 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// @bun
|
|
3
|
+
|
|
4
|
+
// src/index.ts
|
|
5
|
+
import { Command } from "commander";
|
|
6
|
+
import { metadata, registerCommands } from "./tool.js";
|
|
7
|
+
var program = new Command;
|
|
8
|
+
program.name(metadata.name).version(metadata.version).description(metadata.description);
|
|
9
|
+
await registerCommands(program);
|
|
10
|
+
program.parse(process.argv);
|
package/dist/tool.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// src/tool.ts
|
|
2
|
+
import {
|
|
3
|
+
createCommandForwarder,
|
|
4
|
+
createDefaultAction,
|
|
5
|
+
createExecuteCommand,
|
|
6
|
+
createHelpCommand,
|
|
7
|
+
createSetupCommand
|
|
8
|
+
} from "@uipath/uipath-python-bridge";
|
|
9
|
+
// package.json
|
|
10
|
+
var package_default = {
|
|
11
|
+
name: "@uipath/context-grounding-tool",
|
|
12
|
+
version: "0.1.0",
|
|
13
|
+
description: "Tool for context grounding operations via the UiPath Python SDK",
|
|
14
|
+
keywords: [
|
|
15
|
+
"uipcli-tool",
|
|
16
|
+
"context-grounding",
|
|
17
|
+
"wrapper"
|
|
18
|
+
],
|
|
19
|
+
type: "module",
|
|
20
|
+
main: "./dist/tool.js",
|
|
21
|
+
exports: {
|
|
22
|
+
".": "./dist/tool.js"
|
|
23
|
+
},
|
|
24
|
+
private: false,
|
|
25
|
+
bin: {
|
|
26
|
+
"context-grounding-tool": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
files: [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
repository: {
|
|
32
|
+
type: "git",
|
|
33
|
+
url: "https://github.com/UiPath/cli.git",
|
|
34
|
+
directory: "packages/context-grounding-tool"
|
|
35
|
+
},
|
|
36
|
+
publishConfig: {
|
|
37
|
+
registry: "https://npm.pkg.github.com/@uipath"
|
|
38
|
+
},
|
|
39
|
+
scripts: {
|
|
40
|
+
build: "bun ../../tools/build-tool.ts",
|
|
41
|
+
package: "bun run build && bun pm pack",
|
|
42
|
+
test: "vitest run",
|
|
43
|
+
"test:coverage": "vitest run --coverage",
|
|
44
|
+
lint: "biome check .",
|
|
45
|
+
"lint:fix": "biome check --write ."
|
|
46
|
+
},
|
|
47
|
+
peerDependencies: {
|
|
48
|
+
"@uipath/auth": "^1.0.0",
|
|
49
|
+
"@uipath/common": "^1.0.0",
|
|
50
|
+
"@uipath/filesystem": "^1.0.0",
|
|
51
|
+
"@uipath/uipath-python-bridge": "^1.0.0",
|
|
52
|
+
commander: "^14.0.3"
|
|
53
|
+
},
|
|
54
|
+
devDependencies: {
|
|
55
|
+
"@types/bun": "^1.3.11",
|
|
56
|
+
"@uipath/auth": "workspace:*",
|
|
57
|
+
"@uipath/common": "workspace:*",
|
|
58
|
+
"@uipath/filesystem": "workspace:*",
|
|
59
|
+
"@uipath/uipath-python-bridge": "workspace:*",
|
|
60
|
+
commander: "^14.0.3",
|
|
61
|
+
typescript: "^6.0.2"
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// src/config.ts
|
|
66
|
+
var COMMAND_RULES = [
|
|
67
|
+
{
|
|
68
|
+
pattern: ["auth"],
|
|
69
|
+
action: "filter",
|
|
70
|
+
filterMessage: "Use 'uip login' for authentication."
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
// src/telemetry-events.ts
|
|
75
|
+
var ContextGroundingTelemetryEvents = {
|
|
76
|
+
DefaultAction: "ContextGrounding.DefaultAction",
|
|
77
|
+
Setup: "ContextGrounding.Setup",
|
|
78
|
+
Exec: "ContextGrounding.Exec",
|
|
79
|
+
Help: "ContextGrounding.Help"
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// src/tool.ts
|
|
83
|
+
var COMMAND_PREFIX = "context-grounding";
|
|
84
|
+
var metadata = {
|
|
85
|
+
name: "context-grounding-tool",
|
|
86
|
+
version: package_default.version,
|
|
87
|
+
description: "A tool for context grounding operations via the UiPath Python SDK.",
|
|
88
|
+
commandPrefix: COMMAND_PREFIX
|
|
89
|
+
};
|
|
90
|
+
var { executeCommand, registerExecCommand } = createExecuteCommand({
|
|
91
|
+
commandPrefix: COMMAND_PREFIX,
|
|
92
|
+
telemetryEvent: ContextGroundingTelemetryEvents.Exec,
|
|
93
|
+
commandRules: COMMAND_RULES
|
|
94
|
+
});
|
|
95
|
+
var registerSetupCommand = createSetupCommand({
|
|
96
|
+
telemetryEvent: ContextGroundingTelemetryEvents.Setup,
|
|
97
|
+
successCode: "ContextGroundingSetup"
|
|
98
|
+
});
|
|
99
|
+
var registerDefaultAction = createDefaultAction({
|
|
100
|
+
defaultTelemetryEvent: ContextGroundingTelemetryEvents.DefaultAction,
|
|
101
|
+
helpTelemetryEvent: ContextGroundingTelemetryEvents.Help
|
|
102
|
+
}, executeCommand);
|
|
103
|
+
var registerHelpCommand = createHelpCommand({
|
|
104
|
+
defaultTelemetryEvent: ContextGroundingTelemetryEvents.DefaultAction,
|
|
105
|
+
helpTelemetryEvent: ContextGroundingTelemetryEvents.Help
|
|
106
|
+
}, executeCommand);
|
|
107
|
+
var registerCommands = async (program) => {
|
|
108
|
+
program.allowUnknownOption(true);
|
|
109
|
+
program.allowExcessArguments(true);
|
|
110
|
+
program.helpOption(false);
|
|
111
|
+
registerDefaultAction(program);
|
|
112
|
+
registerSetupCommand(program);
|
|
113
|
+
registerExecCommand(program);
|
|
114
|
+
registerHelpCommand(program);
|
|
115
|
+
createCommandForwarder(executeCommand)(program);
|
|
116
|
+
program.showHelpAfterError(false);
|
|
117
|
+
};
|
|
118
|
+
export {
|
|
119
|
+
registerCommands,
|
|
120
|
+
metadata
|
|
121
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@uipath/context-grounding-tool",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Tool for context grounding operations via the UiPath Python SDK",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"uipcli-tool",
|
|
7
|
+
"context-grounding",
|
|
8
|
+
"wrapper"
|
|
9
|
+
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/tool.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./dist/tool.js"
|
|
14
|
+
},
|
|
15
|
+
"private": false,
|
|
16
|
+
"bin": {
|
|
17
|
+
"context-grounding-tool": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/UiPath/cli.git",
|
|
25
|
+
"directory": "packages/context-grounding-tool"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"registry": "https://registry.npmjs.org/"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "bun ../../tools/build-tool.ts",
|
|
32
|
+
"package": "bun run build && bun pm pack",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"test:coverage": "vitest run --coverage",
|
|
35
|
+
"lint": "biome check .",
|
|
36
|
+
"lint:fix": "biome check --write ."
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@uipath/auth": "^1.0.0",
|
|
40
|
+
"@uipath/common": "^1.0.0",
|
|
41
|
+
"@uipath/filesystem": "^1.0.0",
|
|
42
|
+
"@uipath/uipath-python-bridge": "^1.0.0",
|
|
43
|
+
"commander": "^14.0.3"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/bun": "^1.3.11",
|
|
47
|
+
"@uipath/auth": "1.0.0",
|
|
48
|
+
"@uipath/common": "1.0.0",
|
|
49
|
+
"@uipath/filesystem": "1.0.0",
|
|
50
|
+
"@uipath/uipath-python-bridge": "1.0.0",
|
|
51
|
+
"commander": "^14.0.3",
|
|
52
|
+
"typescript": "^6.0.2"
|
|
53
|
+
},
|
|
54
|
+
"gitHead": "d982977e86057fd9d0846c955595c64865aeecab"
|
|
55
|
+
}
|