@uipath/uipath-extensions-sdk 0.1.22 → 0.1.24

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.
Files changed (56) hide show
  1. package/README.md +70 -23
  2. package/dist/adopt.d.ts +6 -0
  3. package/dist/adopt.js +512 -104
  4. package/dist/adopt.js.map +1 -1
  5. package/dist/cli.d.ts +0 -3
  6. package/dist/cli.js +7 -43
  7. package/dist/cli.js.map +1 -1
  8. package/dist/commands/check-project.d.ts +17 -0
  9. package/dist/commands/check-project.js +67 -0
  10. package/dist/commands/check-project.js.map +1 -0
  11. package/dist/commands/new.js +12 -20
  12. package/dist/commands/new.js.map +1 -1
  13. package/dist/commands/pack.d.ts +14 -1
  14. package/dist/commands/pack.js +153 -95
  15. package/dist/commands/pack.js.map +1 -1
  16. package/dist/commands/submit.d.ts +14 -1
  17. package/dist/commands/submit.js +149 -40
  18. package/dist/commands/submit.js.map +1 -1
  19. package/dist/commands/upload.d.ts +10 -1
  20. package/dist/commands/upload.js +191 -43
  21. package/dist/commands/upload.js.map +1 -1
  22. package/dist/commands/validate-python.d.ts +15 -0
  23. package/dist/commands/validate-python.js +360 -0
  24. package/dist/commands/validate-python.js.map +1 -0
  25. package/dist/commands/validate.d.ts +1 -0
  26. package/dist/commands/validate.js +4 -2
  27. package/dist/commands/validate.js.map +1 -1
  28. package/dist/connector.js +14 -2
  29. package/dist/connector.js.map +1 -1
  30. package/dist/github.d.ts +1 -1
  31. package/dist/github.js +7 -4
  32. package/dist/github.js.map +1 -1
  33. package/dist/lib.d.ts +8 -3
  34. package/dist/lib.js +223 -23
  35. package/dist/lib.js.map +1 -1
  36. package/dist/pyproject.d.ts +1 -0
  37. package/dist/pyproject.js +16 -0
  38. package/dist/pyproject.js.map +1 -0
  39. package/dist/python-source.d.ts +25 -0
  40. package/dist/python-source.js +372 -0
  41. package/dist/python-source.js.map +1 -0
  42. package/dist/registrationFile.js +2 -2
  43. package/dist/registrationFile.js.map +1 -1
  44. package/dist/sourceWalk.d.ts +2 -1
  45. package/dist/sourceWalk.js +5 -3
  46. package/dist/sourceWalk.js.map +1 -1
  47. package/dist/uip.d.ts +1 -0
  48. package/dist/uip.js +11 -2
  49. package/dist/uip.js.map +1 -1
  50. package/dist/verdict.d.ts +6 -0
  51. package/dist/verdict.js +13 -0
  52. package/dist/verdict.js.map +1 -0
  53. package/package.json +3 -2
  54. package/dist/commands/build-check.d.ts +0 -34
  55. package/dist/commands/build-check.js +0 -121
  56. package/dist/commands/build-check.js.map +0 -1
package/README.md CHANGED
@@ -4,15 +4,21 @@ The author-facing SDK for community Maestro nodes. It holds the `new`, `init`, `
4
4
 
5
5
  ## Commands
6
6
 
7
- None of the commands logs in to UiPath.
7
+ None of the commands logs in to UiPath. The commands run on Linux and macOS only. On Windows, `new`, `pack` and `upload` exit 1 with `Windows is not supported yet`.
8
+
8
9
  - `uipath-extensions new <publisher/name> [--kind function|agent] [--dir <parent dir>] [--skip-install]` runs `uip function new <name> --language ts` in the parent directory (the current one by default). It keeps the layout `uip` writes: the functions stay in `functions/`, and `tsconfig.json` and the `uipath.json` function entries are not changed. The Maestro files go in `maestro/`. It removes `method` and `path` from every `defineFunction` call, sets the `name` in `package.json` to the package id `uipath-extensions.<publisher>.<name>` and the `version` to `0.1.0`, deletes the `.env.example` that `uip` writes (`submit` refuses it, and it holds credential placeholders), adds `tests` to `packOptions.directoriesExcluded` in `uipath.json` (`submit` accepts a `tests` folder, but the package gate does not accept it inside the package), keeps `@uipath/coded-functions-js-sdk` in `devDependencies`, adds `@types/node` to `devDependencies` (the connection helper reads `process.env`, so `validate` needs the Node types), writes the script `pack: uip function pack` and no `validate` script, replaces `functions/hello.ts` with a starter function whose input and output are JSON Schema literals, and writes the template `uipath-extensions.json` at the project root, the connection helper `maestro/connection.ts` and a starter fixture `fixtures/example.json` (`{ "operation": "run", "input": { "name": "World" } }`, a placeholder to replace with real cases). The project does not depend on this SDK, so `pack: uip function pack` is the only script. It then runs `npm install --include=dev` in the new project, so the type packages are ready for `validate` even when `NODE_ENV=production` or `omit=dev` is set. `--skip-install` leaves that step out, and `new` then prints `npm install` as the first of the next steps. If that `npm install` fails, `new` keeps the project, prints the npm error and exits with code 1. The starter template has no `repository`, because the node folder goes to the index repo as one pull request and no author repo exists. It writes `author` with the publisher as the name, in title case, and `https://github.com/<publisher>` as the url, for the author to correct. If any step before that `npm install` fails after `uip` ran, `new` deletes the project directory it created. `uip function new` runs its own install first, before the SDK is added, and it has no option to skip that install. When that install fails, `uip` removes the project and `new` reports the `uip` error.
9
- With `--kind agent`, `new` runs `uip codedagent new <name> --dir <name>` instead (run `uip codedagent setup` first, in an environment with an agent framework package such as `uipath-langchain` installed: without one `uip codedagent new` exits 1 with "No agent framework is installed"), sets `name` in the `[project]` table of `pyproject.toml` to the package id and `version` to `0.1.0`, and writes the template `uipath-extensions.json`. It writes no `package.json` and no connection helper, and runs no install. `--kind` takes `function` (the default) or `agent`.
10
- - `uipath-extensions init [--id <publisher>.<name>] [--yes] [--dir <project dir>] [--index <owner/repo>]` calls the library `init`. It plans the adopt (see Adopt) and prints the plan as a diff. Without `--yes` it writes nothing and exits 1. With `--yes` it writes the plan and prints the files it wrote and the defaults it generated. A project that needs no write prints `Nothing to write, the project is already adopted.` and exits 0, so a second run changes nothing. `--id` names the node when the `package.json` name is not a package id and the command does not run in a terminal. In a terminal `init` asks for it. `--index` picks the repository whose `policy/gate-library.yaml` sets the schema of a new template. It needs `uip` because it packs. It also needs `gh` signed in when the project has no `uipath-extensions.json`, because it reads that policy file from the index repo.
11
- - `uipath-extensions validate [--dir <project dir>]` calls the library `validate`. It plans the adopt (see Adopt) on the project folder with `offline: true`, with no call to `gh` or the index. When the plan holds any write, or its only error is the missing id, `validate` stops. It runs no gate, writes nothing, exits 1 and tells the author to run `init` on that folder. Any other plan error exits 1 with the error. When the plan holds no write, `validate` loads `uipath-extensions.json`, packs the project folder and runs all 21 gates in local mode on the completed manifest, which it builds in memory from the template and the package. It prints one line per gate and exits 1 when a gate fails. A gate that needs an input a local run does not have prints `skipped`. A skipped gate has not checked anything. It needs `uip` because it packs, and the pack leaves its build output in the project folder.
10
+ With `--kind agent`, `new` runs `uip codedagent new <name> --dir <name>` instead (run `uip codedagent setup` first, in an environment with an agent framework package such as `uipath-langchain` installed: without one `uip codedagent new` exits 1 with "No agent framework is installed"), sets `name` in the `[project]` table of `pyproject.toml` to the package id and `version` to `0.1.0`, replaces the scaffold's placeholder `authors` with the publisher name, and writes the template `uipath-extensions.json`. It writes no `package.json` and no connection helper, and runs no install. `--kind` takes `function` (the default) or `agent`. The next steps for an agent are `uip codedagent init`, `uipath-extensions init --yes` and `uipath-extensions validate`.
11
+ - `uipath-extensions init [--id <publisher>.<name>] [--kind function|agent] [--yes] [--dir <project dir>] [--index <owner/repo>]` calls the library `init`. It plans the adopt (see Adopt) and prints the plan as a diff. Without `--yes` it writes nothing and exits 1. With `--yes` it writes the plan and prints the files it wrote and the defaults it generated. A project that needs no write prints `Nothing to write, the project is already adopted.` and exits 0, so a second run changes nothing. `--id` names the node when the `package.json` name is not a package id and the command does not run in a terminal. In a terminal `init` asks for it. When the project already has a package id, an `--id` that names another id fails and writes nothing. `--index` picks the repository whose `policy/gate-library.yaml` sets the schema of a new template. It needs `uip` because it packs. It also needs `gh` signed in when the project has no `uipath-extensions.json`, because it reads that policy file from the index repo.
12
+ For a Python coded function with one entry in `uipath.json.functions`, run `uip function init` first, then `extension init` and `uv lock`. `init` sets `packOptions.includeUvLock` to `true` and `packOptions.directoriesExcluded` to `["fixtures"]` in `uipath.json`, because the index packs the committed file, and writes a starter `fixtures/example.json` when the project has no fixture. `submit` sends the `fixtures/*.json` files at the top of that folder and refuses a project with no fixture that is not a `.fault.json`. The package leaves `fixtures/` out. `init` decides whether the project is a `function` or an `agent` and records it in `pyproject.toml` as `kind` under `[tool.uipath-extensions]`, which `submit` copies into a new registration. It decides in this order: `--kind`, then a `kind` already in `pyproject.toml`, then `entry-points.json` (every entry has `type` `function`, as `uip function init` writes, or `agent`), then `uipath.json` (a `.py` entry under `functions` means a function). It prints the kind and where it came from. `--kind` or a recorded kind that disagrees with `entry-points.json` or `uipath.json` fails. When nothing decides, `init` asks in a terminal and fails off one with `pass --kind function|agent`. The kind is a write, so it needs `--yes`. On a coded agent project (no Python function in `uipath.json`), `--kind agent` is accepted and nothing is recorded, because the index reads a `pyproject.toml` folder with no kind as an agent, and `--kind function` fails. `--kind` on a project with no `pyproject.toml` fails. `extension validate` checks a fresh native package from an isolated source snapshot. Its source scan parses the Python files with the interpreter `uv python find` returns for the project, and with `python3` on the PATH when uv finds none, so syntax the project's Python accepts is not reported because an older `python3` comes first. The scan fails with a message that names both versions when that interpreter is older than `requires-python`, and a file it cannot parse names the Python version that parsed it. The index CI parses with its own pinned Python. It uses `uv lock --check` offline and does not refresh the lock, install dependencies, run the user function, or approve catalog publishing. `extension submit --dry-run` validates the files and previews the registry submission without writing to GitHub. `extension upload` sends the checked archive only to your personal workspace, using the version in `pyproject.toml`; bump that version and refresh `uv.lock` before re-uploading. `extension submit` opens the registry pull request the same way as for a Node function, with `kind: function` in a new registration. Shared release upload stays blocked. `extension validate` also runs `python-source-scan` and `python-function-shape` locally and prints each finding as `file:line: message`. The scan allows only a built-in list of standard library modules (`abc`, `collections`, `dataclasses`, `datetime`, `json`, `logging`, `os`, `pathlib`, `re`, `typing` and similar; `os`, `sys`, `asyncio`, `io`, `logging`, `typing`, `inspect`, `types` and `urllib` also have member lists, so `os.listdir`, `sys.exit` and `urllib.request` are refused) and refuses any other standard library import such as `timeit`, `pdb` or `unittest.mock`; the registry policy `pythonAllowedStdlib` can only add modules. It also bans risky calls, undeclared third-party imports and hard-coded URLs, and it also bans network access, because connector support for Python functions is a planned follow-up; the ban is a source scan and cannot see a call built at run time. The registry's allow list of dependencies and bans is not read locally. It is enforced only in CI, so a function that passes `validate` can still be refused there.
13
+ - `uipath-extensions validate [--dir <project dir>]` calls the library `validate`. It plans the adopt (see Adopt) on the project folder with `offline: true`, with no call to `gh` or the index. When the plan holds any write, or its only error is the missing id, `validate` stops. It runs no gate, writes nothing, exits 1 and tells the author to run `init` on that folder. Any other plan error exits 1 with the error. For a JavaScript coded function, when the plan holds no write, `validate` loads `uipath-extensions.json`, packs the project folder and runs the registered JavaScript gates in local mode on the completed manifest, which it builds in memory from the template and the package. It prints one line per gate and exits 1 when a gate fails. A gate that needs an input a local run does not have prints `skipped`. A skipped gate has not checked anything. It needs `uip` because it packs. The pack runs in a temporary copy, so it leaves only the nupkg in the project folder.
12
14
  - `uipath-extensions pack [--dir <project dir>]` runs the `pack` steps below.
13
- - `uipath-extensions upload [--id <publisher>.<name>] [--yes] [--dir <project dir>] [--input <json>] [--run] [--feed-id <id>]` calls the library `upload` in its default mode and runs the `upload` steps below. On a project that is not adopted it plans the adopt first, as `submit` does (see Adopt). `--yes` applies the adopt writes and then goes on to the upload in the same run. Without it a plan with writes prints as a diff and the command exits 1 and writes none of the adopt files. Running `init` first writes the same files without the upload. `--id` names the node when the `package.json` name is not a package id and the command does not run in a terminal. It needs `uip login`. It starts a job only with `--run`.
14
- - `uipath-extensions submit [--id <publisher>.<name>] [--yes] [--security-contact <email>] [--dir <project dir>] [--index <owner/repo>] [--dry-run]` calls the library `submit` and runs the `submit` steps below after the adopt step. `--id` names the node when the `package.json` name is not a package id and the command does not run in a terminal. In a terminal `submit` asks for it. `--yes` applies the adopt writes and then goes on to the checks and the pull request in the same run. Without it a plan with writes prints as a diff and exits 1. `--security-contact` is needed for a first registration and replaces the stored contact on a later version. `--index` defaults to `UiPath/uipath-extensions`, and a sandbox index repo can stand in for it. `--dry-run` prints what `submit` would do and writes nothing to GitHub.
15
- - `uipath-extensions build-check --project <dir> --tag <tag> --out <dir>` packs the project, runs the 14 build gates in CI mode against the tag, and copies the nupkg and `gate-report.json` into `--out`. It exits 1 when a gate is not met and 2 on a usage error. When `GITHUB_OUTPUT` is set and every gate is met, it appends `nupkg=<path>`. The reusable build workflow runs this command in CI, so a node author normally does not call it.
15
+
16
+ For an adopted Python coded function, `validate` and `pack` use a private copy of the checked project files and verify the resulting archive, rather than running the JavaScript gates. `validate` discards its working files; `pack` returns the path to the checked archive. These commands need `uv` and the Python-capable `uip`. The lockfile must pass an offline consistency check. Python upload uses the checked archive and requires a uniquely mapped Personal workspace feed; Python does not support an explicit `--feed-id`. Upload starts a job only if you pass `--run`. Python `submit --dry-run` is read-only; live submit is not enabled for Python coded functions.
17
+
18
+ The private copy normalizes CRLF and CR line endings to LF in text, matching the native packer. It does not change the original files or icon bytes. The archive must contain well-formed NuGet metadata with the project's name and version.
19
+
20
+ - `uipath-extensions upload [--id <publisher>.<name>] [--yes] [--dir <project dir>] [--input <json>] [--run] [--feed-id <id>]` calls the library `uploadWithResult` in its default mode and runs the `upload` steps below. On a project that is not adopted it plans the adopt first, as `submit` does (see Adopt). `--yes` applies the adopt writes and then goes on to the upload in the same run. Without it a plan with writes prints as a diff and the command exits 1 and writes none of the adopt files. Running `init` first writes the same files without the upload. `--id` names the node when the `package.json` name is not a package id and the command does not run in a terminal. It needs `uip login`. It starts a job only with `--run`.
21
+ - `uipath-extensions submit [--id <publisher>.<name>] [--yes] [--security-contact <email>] [--dir <project dir>] [--index <owner/repo>] [--dry-run]` calls the library `submitWithResult` and runs the `submit` steps below after the adopt step. `--id` names the node when the `package.json` name is not a package id and the command does not run in a terminal. In a terminal `submit` asks for it. `--yes` applies the adopt writes and then goes on to the checks and the pull request in the same run. Without it a plan with writes prints as a diff and exits 1. `--security-contact` is needed for a first registration and replaces the stored contact on a later version. `--index` defaults to `UiPath/uipath-extensions`, and a sandbox index repo can stand in for it. `--dry-run` prints what `submit` would do and writes nothing to GitHub.
16
22
 
17
23
  Each command accepts only its own options. An option of another command exits 2 and prints the usage text.
18
24
 
@@ -48,7 +54,7 @@ The display fields are bounded. The SDK and the `contract` gate enforce these ru
48
54
  - `display.label` is 1 to 40 characters and `display.description` is 1 to 200 characters. Neither may contain `<` or `>`.
49
55
  - `tags` holds at most 8 tags. Each tag is 1 to 24 characters of lowercase letters, digits and single hyphens.
50
56
  - `display.iconBackground`, `display.iconBackgroundDark` and `display.iconColor` are optional, and each must be a color in the form `#RRGGBB`.
51
- - `display.icon` is required when the template holds `"schema": 2`, and the template check answers `display.icon is required` when it is missing. `new` writes the legacy shape and leaves it out. To use your own icon, put a PNG at `assets/icon.png` and set `display.icon` to `"assets/icon.png"`. Any other path is a finding from SDK 0.1.9, and the package check fails a template that names an icon the package does not have. `adopt` sets `display.icon` in a template it writes, except a legacy template when `icon.png` is excluded in `uipath.json`, adds it to a schema 2 template that lacks it, and writes a default icon to `assets/icon.png` when the template names an icon the project does not have. It never touches an icon the project already has. The body of a new pull request that `submit` opens lists the default icon under the fields adopt generated, so replace it with your own. A later `submit` that updates the same pull request does not change its body. When the package holds `assets/icon.png`, from SDK 0.1.9 the package check requires a PNG file of at most 32768 bytes. `validate` packs the project, so it runs that check too.
57
+ - `display.icon` is required when the template holds `"schema": 2`, and the template check answers `display.icon is required` when it is missing. `new` writes the legacy shape and leaves it out. To use your own icon, put a PNG under `assets/` and set `display.icon` to its path. From SDK 0.1.23 the file name is free, as long as the path matches `assets/<name>.png`, where `<name>` is 1 to 64 letters, digits, `_` or `-`. The match is case sensitive, so `assets/Coins.png` does not name `assets/coins.png`. Only that one file may sit under `assets/`, and `submit` and `validate` report a second one. Before that release only `assets/icon.png` was accepted. A path outside the pattern is a finding from SDK 0.1.9, and the package check fails a template that names an icon the package does not have. `adopt` sets `display.icon` in a template it writes, except a legacy template when `icon.png` is excluded in `uipath.json`, adds it to a schema 2 template that lacks it, and writes a default icon to `assets/icon.png` when the template names an icon the project does not have. It never touches an icon the project already has, and from SDK 0.1.23 it writes nothing for a template that names an icon other than `assets/icon.png`. The body of a new pull request that `submit` opens lists the default icon under the fields adopt generated, so replace it with your own. A later `submit` that updates the same pull request does not change its body. When the package holds the icon that `display.icon` names (`assets/icon.png` by default), from SDK 0.1.9 the package check requires a PNG file of at most 32768 bytes. From SDK 0.1.23 it runs that check on the file the template names. `validate` packs the project, so it runs that check too.
52
58
  - Nothing displays these fields yet. Flow does not read `uipath-extensions.json` (flow-workbench `fb24f7e` has no reference to `uipath-extensions`).
53
59
 
54
60
  `author` is optional and says who publishes the node, for Flow to show next to the badge. `author.name` is 1 to 80 characters with no `<` or `>`. `author.url` is optional, an `https://` URL of at most 200 characters with no credentials or backslash. No other key is allowed. The manifest carries the object as given. `security_contact` in the registration is the contact for UiPath and is not the author. The SDK and the `contract` gate enforce these rules from the release after SDK 0.1.14, and Flow does not show the field yet.
@@ -57,7 +63,7 @@ The display fields are bounded. The SDK and the `contract` gate enforce these ru
57
63
 
58
64
  The template holds no schema. The function in `functions/` is the one source of the input and output schemas.
59
65
 
60
- `pack` runs `uip function pack` and does not change the nupkg. The package holds the template as `uipath-extensions.json`. `validate` and `build-check` read `content/entry-points.json` from the nupkg and require exactly one entry point. They copy that entry point's `input` and `output` into `operations[0]` of the completed manifest, and they list each `Connection` input in `credential.inputs`. They build the manifest in memory with the `version` from `package.json`, so the gates read the schemas that the package holds.
66
+ `pack` runs `uip function pack` and does not change the nupkg. The package holds the template as `uipath-extensions.json`. `validate` reads `content/entry-points.json` from the nupkg and requires exactly one entry point. They copy that entry point's `input` and `output` into `operations[0]` of the completed manifest, and they list each `Connection` input in `credential.inputs`. They build the manifest in memory with the `version` from `package.json`, so the gates read the schemas that the package holds.
61
67
 
62
68
  Flow reads the same schemas. It takes the input and output schemas of a Function from the entry point of the release (flow-workbench `fb24f7e`, `packages/flow-core/src/manifest/shared/argument-utils.ts`). The `entry-points-match` gate still compares the shape of the schemas in the manifest with `entry-points.json` in the package.
63
69
 
@@ -74,7 +80,7 @@ The `name` in `package.json` names a node. It is `uipath-extensions.<publisher>.
74
80
 
75
81
  The node id `publisher/name` comes from the package name. The template and the manifest hold no node type, so there is no second copy of the identity to keep in step. Flow builds its own node type from the id.
76
82
 
77
- A rename makes a new node. Saved flows keep pointing at the old id. To send people to the new node, set `deprecated.alternative` in the registration of the old id in the index. A new version, including a major one, keeps the id.
83
+ A rename makes a new node. Saved flows keep pointing at the old id. A new version, including a major one, keeps the id.
78
84
 
79
85
  These rules about renames describe planned Flow behavior and are not shipped yet. Flow has no community node support on its `develop` branch (flow-workbench `fb24f7e` has no reference to `uipath-extensions`). That support is in the open pull request #6081.
80
86
 
@@ -154,20 +160,52 @@ return api.post("/search", { body: { query: input.query } });
154
160
 
155
161
  In a job, `connection()` sends each request through the Integration Service `http-request` passthrough with the robot token, so the vendor key stays in Integration Service. A vendor error status throws a `VendorError` with the vendor's message. Without a robot (a local run), it calls `baseUrl` directly with the key from the named environment variable. `localEnv()` reads only `MAESTRO_LOCAL_*` variables, so a job cannot use it to read the robot's environment.
156
162
 
163
+ ## Dependencies
164
+
165
+ A node may depend only on npm packages that are on the allow list. The `dependency-policy` gate reads `dependencies`, `optionalDependencies` and `peerDependencies` in `package.json` and fails each name that is not on the list, except an `@uipath/` package from a trusted publisher (see below). Today the list holds one package, `@uipath/coded-functions-js-sdk`. A library such as `pdfkit` is blocked, even though the Functions runtime can install any public npm package. The limit comes from the submit gates, not from the runtime.
166
+
167
+ The list exists in two places.
168
+
169
+ - The index repo `UiPath/uipath-extensions` holds `policy/allowed-dependencies.yaml`. The index CI uses this file, so it decides whether a node is accepted.
170
+ - The gates package holds a copy as `DEFAULT_POLICY` in `packages/gates/src/policy.ts`. `validate` uses this copy, because it cannot read the index file.
171
+
172
+ The two lists can differ. A package that passes `validate` can still fail in the index CI, and a package that the index later allows still fails `validate` until a new SDK release carries the change. For a blocked name outside `@uipath/`, the gate message names the package and these two locations.
173
+
174
+ `submit` sets `deferAllowList` on the gate context. In that mode, `dependency-policy` reports a name that is not on the SDK copy of a list as a `review` finding. The finding names the package and says that the index CI decides. A `review` finding does not stop `submit`. The version spec checks still fail, for example an npm alias or a git or file spec. A change to the list cannot fix them. The index CI does not set `deferAllowList`, so it fails a name that is not in the index file. A reviewer then decides about the package on the pull request. `validate` does not set it, so it fails on the SDK copy as before.
175
+
176
+ Any other `@uipath/` package needs a publisher that the policy trusts, and no publisher is trusted by default. The `dependency-tree` and `license-cve` gates then check every package in the lockfile, not only the direct ones. `validate` skips both of them, and the index CI runs them. So a package on the allow list can still be refused for its own dependencies.
177
+
178
+ To ask for a new package, open a pull request against `UiPath/uipath-extensions` that adds the package name to `policy/allowed-dependencies.yaml`. Say in the description which node needs it and why no allowed package or plain code can do the job. The owners in the `CODEOWNERS` entry for `/policy/` review it. The SDK copy follows the index file in a later SDK release, and an author cannot change it from a node repo.
179
+
180
+ Check the list before you pick a library for a node. If the package is not on it, either write the code without it or ask for the package first.
181
+
157
182
  ## Pack
158
183
 
159
184
  `pack({ projectDir })` does these steps in order.
185
+
160
186
  1. Loads `uipath-extensions.json` and checks it.
161
187
  2. Fails unless the `name` in `package.json` is a package id `uipath-extensions.<publisher>.<name>`, which the packer turns into the nuspec id, and the `version` is a string.
162
- 3. Runs `uip function pack` in the project directory.
188
+ 3. Copies the files the source scan selects into a temporary folder `uipath-pack-XXXX` under the system temp directory, and links the project's `node_modules` into it. A `node_modules` folder is not copied, and `.git`, `dist`, `.env` and `.uipath` are left out.
189
+ 4. Runs `uip function pack` in that copy, then copies the nupkg back into the project (`.uipath/` or the project root, where `uip` wrote it) and removes the copy.
190
+
191
+ It returns the nupkg path, the version, the package id and the kind (`function` or `agent`). It does not read or write the nupkg, so it injects no manifest. The package holds the template file as it is. It writes no manifest into the project and does not change `package.json` or `uipath.json`. A folder that holds `registration.yaml` gets the file added to `packOptions.filesExcluded` in the copy's `uipath.json` only. `validate` reads the entry point from the nupkg and fails unless it lists exactly one.
192
+
193
+ `pack({ projectDir, version })` packs under a different semver while `uip function pack` runs. It sets `version` in the copy's `package.json`, so the project's `package.json` is never edited, also when `uip` fails or the process is killed. The template is not changed, and a schema 2 template holds no version to differ.
194
+
195
+ ### Agents
163
196
 
164
- It returns the nupkg path, the version and the package id. It does not read or write the nupkg, so it injects no manifest. The package holds the template file as it is. It writes no manifest into the project and does not change `package.json`. `validate` and `build-check` read the entry point from the nupkg and fail unless it lists exactly one.
197
+ A folder with a `pyproject.toml` and no `package.json` is an agent project (`projectKind`). The same commands then take the agent path.
165
198
 
166
- `pack({ projectDir, version })` packs under a different semver while `uip function pack` runs. It sets `version` in `package.json` for that call and puts the node version back afterwards, also when `uip` fails. The template is not changed, and a schema 2 template holds no version to differ.
199
+ - **`pack`** reads `name` and `version` from the `[project]` table of `pyproject.toml` and runs `uip codedagent pack`, which writes `.uipath/<package id>.<version>.nupkg`. It packs in a temporary copy, so `uv lock` (which `uip codedagent pack` runs) cannot change the project's `uv.lock`. With a `version`, it sets the `[project]` version in the copy only.
200
+ - **`init`** (adopt) runs `uip codedagent init` first when `uipath.json` or `entry-points.json` is missing, and `uv lock` when `uv.lock` is missing (so it needs `uv` on the path), with yes only: without yes it stops with `ConfirmationRequired` and changes nothing. `validate` does not run it and stops until `init` has. `upload` and `submit` run it as part of their adopt step. It reads the single entry point from the source file and runs no pack. It sets `[project].name` from `--id` when the name is not a package id, writes the template and a default icon when they are missing, lists the icon the template names in `packOptions.filesIncluded` (`assets/icon.png` unless the template names another file, from SDK 0.1.23), and sets `packOptions.includeUvLock`. It writes no fixture and no connection helper.
201
+ - **`validate`** runs `PYTHON_AGENT_GATES` (`uv-lockfile`, `pack-options`, `pypi-dependency-tree`, `agent-shape`, `package-id`) on a manifest built from the template and `content/entry-points.json` of the nupkg.
202
+ - **`upload`** packs under the dev version, sends the nupkg with `uip or packages upload --feed-id <feed>`, then creates or moves the release and starts the job as for a function.
203
+ - **`submit`** collects the folder with the agent source list (`isAllowedSourcePath(path, "agent")` in the gates package), reads the identity from `pyproject.toml`, and asks for no fixture.
167
204
 
168
205
  ## Upload
169
206
 
170
207
  `upload({ projectDir })` tests a node in the personal workspace of the logged in tenant. It never writes to GitHub or to the index. It does these steps in order.
208
+
171
209
  1. Checks `uip login status`, and stops with `Run: uip login` when there is no session.
172
210
  2. Finds the process feed whose name contains "Personal Workspace". `--feed-id` skips the lookup.
173
211
  3. Packs with the version `<node version>-dev.<UTC time as YYYYMMDDHHmmss>`, so a feed that refuses a repeated version never blocks a second run.
@@ -177,6 +215,7 @@ It returns the nupkg path, the version and the package id. It does not read or w
177
215
  7. Looks in the personal folder for the process that Orchestrator created for the package id (see Limits), and prints its key in the note below.
178
216
 
179
217
  The output ends with the destination.
218
+
180
219
  - `Destination:` is `personal workspace feed, only you can see this build`, or `feed <id> (from --feed-id)` when you passed `--feed-id`.
181
220
  - `Release:` names the release and says `in your personal workspace`, because the release always goes to the personal folder, whatever the feed.
182
221
  - `Run:` is the exact `uip or jobs start <release key> --folder-key <folder key>` command. With `--run` the job result lines take its place.
@@ -186,21 +225,23 @@ The output ends with the destination.
186
225
 
187
226
  The `@uipath/uipath-extensions-sdk/lib` export runs four commands from code. Each takes options and `LibDeps` (`exec`, `io`, an optional `github` client and an optional `now` clock) and returns `{ code, data, instructions? }`. `io` has `out`, `err`, `canPrompt` and `ask`. `code` is one of `Success`, `GatesFailed`, `ConfirmationRequired`, `InputRequired` and `Failed`. Only `Success` is a pass, and the `uipath-extensions` command exits 0 for `Success` and 1 for every other code.
188
227
 
189
- - `init({ dir, id, index, yes })` plans the adopt writes, as `submit` does, and prints the diff once. It asks for the id in a terminal when the `package.json` name is not a package id, and off a terminal a missing id returns `Failed` with the plan and `pass <publisher>.<name>`. A template that exists and is malformed returns `Failed` with the message in `instructions`, before any diff or write. A plan with writes needs `yes` (else `ConfirmationRequired` with the plan, and nothing is written). With `yes` it applies the writes and returns `Success` with `{ written, generated }`. A file that changed after the plan returns `Failed` with the plan and the instruction to run `init` again, and nothing is written. A project whose plan holds no write returns `Success` with both lists empty. There is no confirmation prompt.
228
+ - `init({ dir, id, index, kind, yes })` plans the adopt writes, as `submit` does, and prints the diff once. For a Python function project it also decides and records the kind (see `init` under Commands). It asks for the id in a terminal when the `package.json` name is not a package id, and off a terminal a missing id returns `Failed` with the plan and `pass <publisher>.<name>`. A template that exists and is malformed returns `Failed` with the message in `instructions`, before any diff or write. A plan with writes needs `yes` (else `ConfirmationRequired` with the plan, and nothing is written). With `yes` it applies the writes and returns `Success` with `{ written, generated }`. A file that changed after the plan returns `Failed` with the plan and the instruction to run `init` again, and nothing is written. A project whose plan holds no write returns `Success` with both lists empty. There is no confirmation prompt.
190
229
  - `validate({ dir })` plans the adopt writes on the project folder with `offline: true`. It returns `Failed` with the plan in `data` and the instruction to run `init` on the project folder when the plan holds any write or its only error is the missing id. It writes nothing and runs no gate in that case. Any other plan error returns `Failed` with the plan and the errors. A plan with no write and no error runs the gates in local mode on the project folder and returns `Success` or `GatesFailed` with the report. A malformed template, a package that cannot be packed or read, and a missing `uip` return `Failed` with the message in `instructions`, in all four commands.
191
- - `upload({ dir, id, yes, run, input, feedId })` plans the adopt writes when the project has no template or its `package.json` name is not a package id, as `submit` does. It never reads the index, so it needs no `gh` and writes schema 2. A plan with writes needs `yes` (else `ConfirmationRequired`). With `yes` it applies the writes and then runs the `upload` steps below in the same call. Any other template or `package.json` problem returns `Failed` before any write. The release input checks below run before the adopt writes. A run whose job does not end `Successful` returns `Failed` with the upload result and the job in `data`. With `release: true` it needs exactly one of `folderPath` and `folderKey` (else `InputRequired`), rejects `feedId`, packs once and runs the gates on that package (`GatesFailed` uploads nothing), needs `yes` (else `ConfirmationRequired`), then runs `uip or packages upload <nupkg>` with the folder flag on the package that passed the gates, under the `package.json` version.
192
- - `submit({ dir, id, yes, securityContact, index, dryRun })` plans the adopt writes. A plan with writes needs `yes` (else `ConfirmationRequired`). With `yes` it applies the writes and then runs the `submit` steps below in the same call. `index` also picks the repository whose `policy/gate-library.yaml` sets the schema of a new template. The pull request body lists the fields that the adopt step generated in this run (the license when `package.json` declares none, the label, both descriptions, the operation name and the tags), and ends with the line `Gate library: <version>`. A project that an earlier run adopted has no such list.
230
+ - `uploadWithResult({ dir, id, yes, run, input, feedId })` plans the adopt writes when the project has no template or its `package.json` name is not a package id, as `submit` does. It never reads the index, so it needs no `gh` and writes schema 2. A plan with writes needs `yes` (else `ConfirmationRequired`). With `yes` it applies the writes and then runs the `upload` steps below in the same call. Any other template or `package.json` problem returns `Failed` before any write. The release input checks below run before the adopt writes. A run whose job does not end `Successful` returns `Failed` with the upload result and the job in `data`. With `release: true` it needs exactly one of `folderPath` and `folderKey` (else `InputRequired`), rejects `feedId`, packs once and runs the gates on that package (`GatesFailed` uploads nothing), needs `yes` (else `ConfirmationRequired`), then runs `uip or packages upload <nupkg>` with the folder flag on the package that passed the gates, under the `package.json` version.
231
+ - `submitWithResult({ dir, id, yes, securityContact, index, dryRun })` plans the adopt writes. A plan with writes needs `yes` (else `ConfirmationRequired`). With `yes` it applies the writes and then runs the `submit` steps below in the same call. `index` also picks the repository whose `policy/gate-library.yaml` sets the schema of a new template. The pull request body lists the fields that the adopt step generated in this run (the license when `package.json` declares none, the label, both descriptions, the operation name and the tags), and ends with the line `Gate library: <version>`. A project that an earlier run adopted has no such list.
193
232
 
194
233
  The `release` command and its exports (`release`, `ReleaseError`, `ReleaseOptions`, `ReleaseResult`, `GatesFailedError`) are gone from the root export. A gates failure is the result code `GatesFailed`.
195
234
 
235
+ The root export also has `submit` and `upload`, which take other options and throw on a failure, so the two result-returning functions here are named `submitWithResult` and `uploadWithResult`. Version 0.1.23 and earlier exported them as `submit` and `upload`. This release keeps those two names as deprecated aliases of the new functions, and the next release removes them.
236
+
196
237
  ## Adopt
197
238
 
198
- A project is adopted when it has a template, a package name that is a package id and the files its node needs. `planAdopt` reads the project and lists what is missing. It writes none of the adopt files, but it runs `uip function pack` in the project folder. That leaves the pack build output (`.uipath/`, `entry-points.json`, `bindings_v2.json`) and can add fields such as `projectId` to `uipath.json`. `init`, `submit` and `upload` apply a plan to the project folder. `validate` never applies one, it stops and names `init` when the plan holds a write. When the plan holds the template or the package name, a write that fails halfway leaves the project looking unadopted, because `package.json` and the template are written last, so the next run plans everything again.
239
+ A project is adopted when it has a template, a package name that is a package id and the files its node needs. `planAdopt` reads the project and lists what is missing. It writes none of the adopt files, but it runs `uip function pack` in a temporary copy of the project folder. That leaves only the nupkg in the project folder (`.uipath/` or the project root), and no field that `uip` adds to `uipath.json` reaches the project. `init`, `submit` and `upload` apply a plan to the project folder. `validate` never applies one, it stops and names `init` when the plan holds a write. When the plan holds the template or the package name, a write that fails halfway leaves the project looking unadopted, because `package.json` and the template are written last, so the next run plans everything again.
199
240
 
200
241
  - It needs `uipath.json`, and it stops with `not a uip project, run uip function new or uip codedagent new first` when that file is missing.
201
242
  - A `package.json` name that is not `uipath-extensions.<publisher>.<name>` becomes a write of the name from `id`, or the error `pass <publisher>.<name>` when there is no `id`.
202
243
  - A missing `uipath-extensions.json` becomes a write of a template that passes the gates, from the one operation in `entry-points.json`. It sets `license` to the one `package.json` declares, or to `MIT` when `package.json` declares none, `display.label` to the node name in title case cut to 40 characters, a one-sentence `display.description` and operation description that ask the author to describe the node, and an empty `tags` list. It sets `display.icon` to `assets/icon.png`, except in a legacy template when `icon.png` is excluded. Its shape follows `template_schema` in `policy/gate-library.yaml` of the index repo: schema 2 gets `"schema": 2` and no `version`, an absent key gets the legacy shape with the `package.json` version, and any other value is an error. The index repo is the one `--index` names, and `UiPath/uipath-extensions` by default.
203
- - A missing `assets/icon.png` becomes a write of the default icon, a PNG of 256 by 256 pixels (the `language` glyph of `@uipath/apollo-core`, whose MIT notice ships in `THIRD-PARTY-NOTICES.txt`). The plan holds it as a base64 string with `encoding: "base64"`, and the diff prints one line with its size. An icon the project already has is never touched. Adopt writes the icon only when the template names it, so a legacy template with no `display.icon` gets no icon file.
244
+ - A missing `assets/icon.png` that the template names, or that a new template will name, becomes a write of the default icon, a PNG of 256 by 256 pixels (the `language` glyph of `@uipath/apollo-core`, whose MIT notice ships in `THIRD-PARTY-NOTICES.txt`). The plan holds it as a base64 string with `encoding: "base64"`, and the diff prints one line with its size. An icon the project already has is never touched. Adopt writes the icon only when the template names it, so a legacy template with no `display.icon` gets no icon file.
204
245
  - A schema 2 template with no `display.icon` becomes a write of the same template with `display.icon` set to `assets/icon.png`. The write keeps the indent and every other key, and `upload` adopts this case in the same run as it adopts a missing template.
205
246
  - When `uipath.json` lists `icon.png` or `assets` in `packOptions.filesExcluded` or `packOptions.directoriesExcluded`, the packer would leave the icon out. Adopt then returns an error for a schema 2 template that names the icon or needs it added, and names the entry to remove. For a legacy template it skips the icon.
206
247
  - A missing `maestro/connection.ts` becomes a write when an input is a connection. The helper reads `process.env`, so the plan adds `@types/node` to the `devDependencies` of `package.json` whenever an input is a connection and neither dependency list holds it, also when the helper already exists, and reports that `npm install` has to run.
@@ -210,22 +251,24 @@ A project is adopted when it has a template, a package name that is a package id
210
251
  - A file named `.DS_Store`, `.env.example`, `.env.local`, `Thumbs.db` or `desktop.ini`, or a folder named `.idea` or `.vscode`, at any depth, becomes one write of `uipath.json` that adds the name to `packOptions.filesExcluded` or `packOptions.directoriesExcluded`. `uip function pack` and `submit` skip an entry by its bare name, and a `uip function new` project holds `.env.example`. `.env.local` can hold secrets, and the package check rejects any env file other than `.env.example`. The write keeps every other key, the indent and the trailing newline of `uipath.json`. Adopt deletes no file. When `packOptions` is not an object or the list it needs is not a list, the plan gets the error `uipath.json packOptions.<list> is not a list` and no write.
211
252
  - Files outside the source list and an input with no description are reports, not writes. Each report names its remedy. An input with no description does not stop `submit`, because `validate` lists it as a `review` finding. A file or folder outside the source list can be deleted or added to `packOptions.filesExcluded` or `packOptions.directoriesExcluded` in `uipath.json`, and `submit` names the same remedy when it refuses to send one. An input needs a JSON Schema literal in `defineFunction({ input })` or a `.describe()` call on the validator, because `defineSchema<T>()` drops every description.
212
253
 
213
- `submit` with writes in the plan and no `--yes` prints the diff, returns `ConfirmationRequired`, exits 1 and writes none of the adopt files. With `--yes` it writes the files and goes on to the checks and the pull request in the same run, so a fresh project needs one `submit --yes` and no second run. Use `--dry-run` with `--yes` to adopt the project and see the plan without opening a pull request. Replace the default license, label and descriptions with your own before the pull request is merged. `upload` on an unadopted project does the same with its own `--yes`. It prints the diff, writes the files and goes on to the upload in the same run, and it reads no index, so it needs no `gh`. The `submit` pull request body lists each field that the adopt step generated, so a reviewer can tell tool text from author text. That list covers only the run that adopts.
254
+ `submit` with writes in the plan and no `--yes` prints the diff, returns `ConfirmationRequired`, exits 1 and writes none of the adopt files. With `--yes` it writes the files and goes on to the checks and the pull request in the same run, so a fresh project needs one `submit --yes` and no second run. Use `--dry-run` with `--yes` to adopt the project and see the plan without opening a pull request. Replace the default license, label and descriptions with your own before the pull request is merged. `validate` shows a description that still holds the generated text as a `review` finding of the `contract` gate, and does not fail. `upload` on an unadopted project does the same with its own `--yes`. It prints the diff, writes the files and goes on to the upload in the same run, and it reads no index, so it needs no `gh`. The `submit` pull request body lists each field that the adopt step generated, so a reviewer can tell tool text from author text. That list covers only the run that adopts.
214
255
 
215
256
  ## Submit
216
257
 
217
258
  `submit({ projectDir, github, securityContact })` sends the node folder to the index repo as one pull request. It needs no author repo, no release and no App or org secret. It uses the token of the signed-in `gh` account, so the account must be allowed to create `register/**` branches in the index repo. It does every check before it writes anything, and it runs every check that does not depend on a failed one, so one run lists every failure, one per line. When a gate failed, the result code is `GatesFailed`, with the gate report as `data` and the other lines in `instructions`. When only other checks failed, the code is `Failed` and `instructions` holds every line.
259
+
218
260
  1. Plans the adopt writes (see Adopt). It stops when the plan has an error, or has a write and no `--yes`. With `--yes` it applies the writes and goes on. When it then needs `--security-contact` and has none, it returns `InputRequired` and says the adopt files were written. Loads `uipath-extensions.json`. Takes the version and the node id from the sent `package.json`, and fails when its `name` is not a package id or its `version` is not a string.
219
261
  2. Runs `validate` in local mode. It packs the project, so `uip` must be on the PATH. A `fail` stops `submit` before it writes anything, after the checks below have run. A `review` or `skipped` result is printed and does not stop it. The index CI runs every gate with more inputs than a local run has, so a pass here is not a pass there.
220
262
  3. Reads the index repo and checks that the signed-in account can push to it. Without that right it stops before it writes anything, with `you cannot push branches to <index>. Ask in #feat-maestro-community-node for write access, then run submit again.`
221
- 4. Collects the files of the project folder. Only the allow list is sent: `uipath-extensions.json`, `package.json`, `package-lock.json`, `uipath.json`, `tsconfig.json`, `tsconfig.typecheck.json`, `project.uiproj`, `README.md`, `LICENSE`, `assets/icon.png`, `functions/**/*.ts`, `maestro/**/*.ts`, `tests/**/*.ts` and `fixtures/**/*.json`. A file under a folder whose name starts with a dot, such as `fixtures/.vscode/tasks.json`, is not on the list, because the index refuses it. Local files that the index refuses or that a build writes are left out and listed in the output. They are `node_modules/`, `dist/`, `.git/`, `.uipath/`, `.github/`, `docs/`, `.gitignore`, `.npmrc`, `biome.json`, `commitlint.config.mjs`, `AGENTS.md`, `CHANGELOG.md`, `CLAUDE.md`, `entry-points.json`, `bindings_v2.json`, `registration.yaml` and `*.nupkg`. A `registration.yaml` in the folder, for example one copied from the index, is never sent: submit writes the registration from the index copy plus the new version. The same checks as in `validate` run on it, and a problem is a warning in the output. At any depth the collector also skips an entry whose name is in `packOptions.filesExcluded` or `packOptions.directoriesExcluded` of `uipath.json`, and the names `node_modules`, `.git`, `.env`, `.deno`, `dist` and `.uipath`, as `uip function pack` does. A source folder of the allow list at the project root (`tests`, `fixtures`) is still collected when `packOptions` excludes it, because `new` excludes `tests` only to keep it out of the package, and the index keeps those files. A `uip function pack` run writes the last three, and `validate`, `pack` and `upload` all start one, so they can sit in the folder when you submit. Any other file, a symlink, a file over 5 MiB, more than 200 files with `registration.yaml`, or more than 20 MiB in all stops submit with the list of paths and the reason for each. In `package-lock.json`, every package that is not `@uipath/uipath-extensions-sdk` or `@uipath/uipath-extensions-gates` and whose `resolved` URL is on `npm.pkg.github.com` is sent with the matching `registry.npmjs.org` tarball URL, because the index gate takes everything but those two from the public registry. The `integrity` value is not changed, and the file on disk is not touched.
263
+ 4. Collects the files of the project folder. Only the allow list is sent: `uipath-extensions.json`, `package.json`, `package-lock.json`, `uipath.json`, `tsconfig.json`, `tsconfig.typecheck.json`, `project.uiproj`, `README.md`, `LICENSE`, one icon at `assets/<name>.png` (the name is free from SDK 0.1.23, and `assets/icon.png` before it), `maestro/connection.ts`, `functions/**/*.ts`, `tests/**/*.ts` and `fixtures/**/*.json`. Names under the last three must use only letters, digits, `_`, `-` and `.`, and may not start with a dot. A file under a folder whose name starts with a dot, such as `fixtures/.vscode/tasks.json`, is not on the list, because the index refuses it. Local files that the index refuses or that a build writes are left out and listed in the output. They are `node_modules/`, `dist/`, `.git/`, `.uipath/`, `.github/`, `docs/`, `.gitignore`, `.npmrc`, `biome.json`, `commitlint.config.mjs`, `AGENTS.md`, `CHANGELOG.md`, `CLAUDE.md`, `entry-points.json`, `bindings_v2.json`, `registration.yaml` and `*.nupkg`. A `registration.yaml` in the folder, for example one copied from the index, is never sent: submit writes the registration from the index copy plus the new version. The same checks as in `validate` run on it, and a problem is a warning in the output. At any depth the collector also skips an entry whose name is in `packOptions.filesExcluded` or `packOptions.directoriesExcluded` of `uipath.json`, and the names `node_modules`, `.git`, `.env`, `.deno`, `dist` and `.uipath`, as `uip function pack` does. A source folder of the allow list at the project root (`tests`, `fixtures`) is still collected when `packOptions` excludes it, because `new` excludes `tests` only to keep it out of the package, and the index keeps those files. A `uip function pack` run writes the last three, and `validate`, `pack` and `upload` all start one, so they can sit in the folder when you submit. Any other file, a second file under `assets/`, a symlink, a file over 5 MiB, more than 200 files with `registration.yaml`, or more than 20 MiB in all stops submit with the list of paths and the reason for each. In `package-lock.json`, every package that is not `@uipath/uipath-extensions-sdk` or `@uipath/uipath-extensions-gates` and whose `resolved` URL is on `npm.pkg.github.com` is sent with the matching `registry.npmjs.org` tarball URL, because the index gate takes everything but those two from the public registry. The `integrity` value is not changed, and the file on disk is not touched.
222
264
  5. Refuses when the index holds both the flat file `nodes/<publisher>/<name>.yaml` and the folder for the node, or when the version is already in the registration file. It then looks for an open pull request from the branch `register/<publisher>__<name>`. When there is one, it updates that pull request (see below). When there is none, it refuses if the branch already exists in the index repo.
223
- 6. Reads the default branch head of the index repo, and builds one tree commit on it through the git data API. The commit holds the files under `nodes/<publisher>/<name>/` and `registration.yaml` with the new version as a `listed` entry dated today (UTC). A first registration writes `id`, `package`, `security_contact`, `deprecated`, `approved` and `maintainers`, and `id` and `package` come from the `name` in `package.json`. `maintainers` holds one entry, the signed-in `gh` account, with its login in lowercase and its numeric GitHub id. The index lets only a listed maintainer, or someone with write access to the index repo, submit new versions of the node. When the signed-in account is not a normal user, `submit` writes no `maintainers` block and does not fail. That happens when the login has brackets or another shape that the index schema refuses, when the account type is not `User`, and when GitHub does not answer the identity or the user lookup. A node without the list is not checked by the index. A later version keeps every field of the existing file, `maintainers` included, appends the entry and never adds the submitter. To add people, edit `maintainers` in the registration file by hand in a pull request. The list holds 1 to 20 entries and the index checks the shape of each one. It deletes files that the index folder holds and your folder no longer has. When the node is still a flat file `nodes/<publisher>/<name>.yaml`, the same commit deletes that file and writes the folder, so the pull request never holds both. The commit touches nothing outside `nodes/<publisher>/<name>/`.
265
+ 6. Reads the default branch head of the index repo, and builds one tree commit on it through the git data API. The commit holds the files under `nodes/<publisher>/<name>/` and `registration.yaml` with the new version as a `listed` entry dated today (UTC). A first registration writes `id`, `package`, `security_contact`, `approved` and `maintainers`, and `id` and `package` come from the `name` in `package.json`. `maintainers` holds one entry, the signed-in `gh` account, with its login in lowercase and its numeric GitHub id. The index lets only a listed maintainer, or someone with write access to the index repo, submit new versions of the node. When the signed-in account is not a normal user, `submit` writes no `maintainers` block and does not fail. That happens when the login has brackets or another shape that the index schema refuses, when the account type is not `User`, and when GitHub does not answer the identity or the user lookup. A node without the list is not checked by the index. A later version keeps every field of the existing file, `maintainers` included, appends the entry and never adds the submitter. To add people, edit `maintainers` in the registration file by hand in a pull request. The list holds 1 to 20 entries and the index checks the shape of each one. It deletes files that the index folder holds and your folder no longer has. When the node is still a flat file `nodes/<publisher>/<name>.yaml`, the same commit deletes that file and writes the folder, so the pull request never holds both. The commit touches nothing outside `nodes/<publisher>/<name>/`.
224
266
  7. Creates the branch `register/<publisher>__<name>` at that commit, so a failure before this step leaves no branch. It opens the pull request with the body of the index `.github/PULL_REQUEST_TEMPLATE.md`. It fills the `Node id` and `Version` lines and ticks "Registers a new node" or "Adds a version to an existing node". It then tries to add the `registration` label, and warns when it cannot. The pull request title and the commit message are both `Register <id> <version>`, because the index lints every commit and the title with the same rule.
225
267
 
226
268
  The version comes from the folder.
227
269
 
228
270
  When a pull request from that branch is already open, `submit` updates it instead of opening a second one.
271
+
229
272
  - It updates only a pull request that the signed-in `gh` user opened. For another author it stops before any write with `<url> was opened by <author>, and gh is signed in as <you>. Run submit as <author> (gh auth switch), or ask them to update it.`
230
273
  - It builds the tree from the default branch head exactly as for a new pull request. A file you deleted since the last submit is gone, a version bump leaves the pull request registering only the new version, and a resubmit of the same version is allowed.
231
274
  - The new commit has the current branch head as its first parent, so the branch moves forward and keeps its history. When the default branch head is not yet in the branch, it is the second parent. Without it the file list of the pull request would show files that other registrations changed, and the index refuses a source pull request that touches anything outside the node folder.
@@ -247,16 +290,20 @@ A connector node is an Integration Service connector, not a function. Its folder
247
290
  - **Identity.** A connector has no `package.json`, so pass the node id with `--id <publisher>.<name>`, or type it at the prompt. Publisher and name hold lowercase letters and digits only, at most 70 characters together. The package id is `uipath-extensions.<publisher>.<name>`.
248
291
  - **Key.** The key comes from the node id. `uipath.<name>` is the shared connector of a vendor, key `custom-community-<name>`, which UiPath builds first and anyone improves with a pull request. Any other publisher makes a fork, key `custom-community-<name>_<publisher>`, and submit refuses a fork until `nodes/uipath/<name>` is in the index as a connector. A shared function or agent, or a legacy flat `nodes/uipath/<name>.yaml`, does not count, because submit decides the shared node's kind from its files the same way it does for the node it sends. validate and submit rewrite every copy of the folder's key as text in the copy they check and send: `key`, the `design-` twin in `metadata.key`, the `metadata.image` path, every `elementKey` and any other JSON value that holds it. The folder is not changed, and init writes only the template and the icon.
249
292
  - **Version.** The index holds the version history. The first submit of a node is `1.0.0`. After that, pass `--bump patch|minor|major`, and submit takes the highest approved version in `registration.yaml`, yanked and blocked ones included, adds the bump, and writes it to `latestVersion` in `element-metadata.json` and to the top-level `version` in `element.json` of the files it sends. The folder keeps the version it had, which is the one your tenant publishes, so the two versions count separately. A pull request that is still open adds no approved version, so running submit again with the same `--bump` sends the same version. A connector version only goes up, so submit refuses one that is not higher than every approved version. `--bump` takes only `patch`, `minor` or `major`, and submit refuses it for a function or agent, which takes its version from `package.json`.
250
- - **Validate.** `validate --dir <folder> [--id <publisher>.<name>]` runs the connector gates, without packing, on a copy of the files submit would send, with the community key of the node id. Without `--id` it checks the folder as the shared connector `uipath.<name>`, taking `<name>` from the last part of the folder's key, and a folder that already holds a community key is checked as it is. A file the folder walk refuses, such as one off the allow list, is reported under `connector-contents`. Fix every finding in the folder. When `uipath-extensions.json` or `assets/icon.png` is missing, validate stops and asks you to run init.
293
+ - **Validate.** `validate --dir <folder> [--id <publisher>.<name>]` runs the connector gates, without packing, on a copy of the files submit would send, with the community key of the node id. Without `--id` it checks the folder as the shared connector `uipath.<name>`, taking `<name>` from the last part of the folder's key, and a folder that already holds a community key is checked as it is. A file the folder walk refuses, such as one off the allow list, is reported under `connector-contents`. A local run has no registered version and no packed archive, so `connector-version` and `connector-package` show as `skipped`. Fix every finding in the folder. When `uipath-extensions.json` or `assets/icon.png` is missing, validate stops and asks you to run init.
251
294
  - **Submit.** `submit --dir <folder> --id <publisher>.<name> --yes [--bump patch|minor|major]` writes the generated template and the default icon on the first run, runs the connector gates on the exact bytes it sends, with the node id and the earlier versions, and opens the `register/<publisher>__<name>` pull request as for a function. It sends `uipath-extensions.json`, `README.md`, `LICENSE`, `assets/icon.png` and the allowed `app/element/**` files. A `registration.yaml` in the folder is not sent and is checked as for a function.
252
295
  - **Kind.** submit refuses a connector whose id is already registered as a function or agent, including a legacy flat file, and a function or agent whose id is already a connector. Use a new id.
253
296
  - **Upload.** `upload` takes functions and agents only.
254
297
 
255
298
  ## Limits
256
299
 
300
+ - For an agent, `validate` runs four Python gates only. Nothing checks the Python source for risky calls, imports, secrets in logs or a vendor host, and there is no contract, license or CVE gate, so a reviewer reads those. `pypi-dependency-tree` is skipped locally, because `validate` has no PyPI client. `validate` does not run `uip codedagent init`, so it does not catch an `entry-points.json` that is stale against the code. The index CI regenerates it and refuses a difference.
301
+ - For an agent, `uip codedagent init` writes `AGENTS.md`, `CLAUDE.md` and `agent.mermaid` into the project, and `uip codedagent pack` puts them in the nupkg. `submit` does not send them, so the package that the index builds holds its own copies from its `init` run.
302
+ - `new --kind agent` replaces the scaffold's placeholder `authors` (`John Doe`), which would otherwise go into the nuspec. `init` does not change `authors`, so a project made with `uip codedagent new` directly keeps the placeholder until the author edits it.
303
+ - The agent paths were run by hand against `uip` 1.208.0-dev.10110 on 2026-11-25: `new`, `init`, `validate`, `pack`, `upload --run` (a job on alpha returned its output) and `submit --dry-run`. The tests use a fake `uip`.
257
304
  - `repository` is optional. A template that sets it must write `owner/repo`, not a URL, and the completed manifest then lists it as a `https://github.com/` URL. A template without it gets no `repository` in the manifest. The `release`, `attestation` and `identity-match` gates fail in `ci` mode for such a manifest when a caller gives them every input, because they look up the author repository, and `source` mode skips them. Nothing else in the gate library or the SDK reads the field.
258
305
  - `author` is checked for shape only. The gates do not check that the name belongs to the publisher or that the url is theirs, so a reviewer reads it. The index can later refuse a name that impersonates another publisher.
259
- - `pack` and `upload` do not compare a legacy template `version` with `package.json`. `validate` and `build-check` do, because they build the manifest. `template-match` compares bytes only, so it cannot tell a stale template from a new one, it only proves that the package carries the source file.
306
+ - `pack` and `upload` do not compare a legacy template `version` with `package.json`. `validate` does, because it builds the manifest. `template-match` compares bytes only, so it cannot tell a stale template from a new one, it only proves that the package carries the source file.
260
307
  - `credential.inputs` lists each top-level operation input whose schema, or the local `$ref` target of its schema, has `x-uipath-resource-kind: "Connection"`, as an `ICredentialType` input. A nested property, a `$ref` chain and an asset kind are not listed.
261
308
  - The connection helper calls Integration Service only from a UiPath cloud host (`uipath.com` or a subdomain). It does not run on Automation Suite. A node can pass a fixed connection id to `connection()` instead of its input, and the gates do not catch that. The helper only reaches connections the job's robot can already read.
262
309
  - The manifest follows the shape in the registry design. The Flow node contract owner has not confirmed it yet, so it can still change.
package/dist/adopt.d.ts CHANGED
@@ -5,5 +5,11 @@ export declare class StaleAdoptPlanError extends Error {
5
5
  readonly path: string;
6
6
  constructor(path: string);
7
7
  }
8
+ export { isPythonFunctionProject } from "./python-source.js";
9
+ export declare function pythonFunctionNeedsId(dir: string): Promise<boolean>;
10
+ export declare const AGENT_INIT = "uipath.json and entry-points.json are missing. Run init, which runs uip codedagent init to write them";
11
+ export declare const AGENT_LOCK = "uv.lock is missing. Run init, which runs uv lock to write it";
12
+ export declare function needsAgentInit(dir: string): Promise<boolean>;
13
+ export declare function runAgentInit(dir: string, exec: LibDeps["exec"]): Promise<string | undefined>;
8
14
  export declare function planAdopt(opts: AdoptOptions, deps: LibDeps): Promise<AdoptPlan>;
9
15
  export declare function applyAdopt(plan: AdoptPlan, opts: AdoptOptions): Promise<void>;