@uipath/uipath-extensions-sdk 0.1.21 → 0.1.23

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 +64 -14
  2. package/dist/adopt.d.ts +6 -0
  3. package/dist/adopt.js +462 -101
  4. package/dist/adopt.js.map +1 -1
  5. package/dist/cli.js +42 -7
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/build-check.d.ts +2 -2
  8. package/dist/commands/build-check.js +43 -18
  9. package/dist/commands/build-check.js.map +1 -1
  10. package/dist/commands/new.d.ts +1 -0
  11. package/dist/commands/new.js +44 -2
  12. package/dist/commands/new.js.map +1 -1
  13. package/dist/commands/pack.d.ts +12 -0
  14. package/dist/commands/pack.js +96 -30
  15. package/dist/commands/pack.js.map +1 -1
  16. package/dist/commands/submit.d.ts +41 -1
  17. package/dist/commands/submit.js +484 -23
  18. package/dist/commands/submit.js.map +1 -1
  19. package/dist/commands/upload.d.ts +4 -0
  20. package/dist/commands/upload.js +98 -26
  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 +334 -0
  24. package/dist/commands/validate-python.js.map +1 -0
  25. package/dist/commands/validate.js +2 -1
  26. package/dist/commands/validate.js.map +1 -1
  27. package/dist/connector.d.ts +23 -0
  28. package/dist/connector.js +258 -0
  29. package/dist/connector.js.map +1 -0
  30. package/dist/github.d.ts +6 -0
  31. package/dist/github.js +12 -0
  32. package/dist/github.js.map +1 -1
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.js.map +1 -1
  35. package/dist/lib.d.ts +4 -1
  36. package/dist/lib.js +307 -27
  37. package/dist/lib.js.map +1 -1
  38. package/dist/pyproject.d.ts +1 -0
  39. package/dist/pyproject.js +16 -0
  40. package/dist/pyproject.js.map +1 -0
  41. package/dist/python-source.d.ts +25 -0
  42. package/dist/python-source.js +359 -0
  43. package/dist/python-source.js.map +1 -0
  44. package/dist/registrationFile.d.ts +10 -0
  45. package/dist/registrationFile.js +51 -1
  46. package/dist/registrationFile.js.map +1 -1
  47. package/dist/sourceWalk.d.ts +2 -1
  48. package/dist/sourceWalk.js +5 -3
  49. package/dist/sourceWalk.js.map +1 -1
  50. package/dist/symlinkProblem.d.ts +1 -0
  51. package/dist/symlinkProblem.js +25 -0
  52. package/dist/symlinkProblem.js.map +1 -0
  53. package/dist/verdict.d.ts +6 -0
  54. package/dist/verdict.js +13 -0
  55. package/dist/verdict.js.map +1 -0
  56. package/package.json +6 -2
package/README.md CHANGED
@@ -4,11 +4,17 @@ The author-facing SDK for community Maestro nodes. It holds the `new`, `init`, `
4
4
 
5
5
  ## Commands
6
6
 
7
- The `uipath-extensions` command is a placeholder name until the final name is chosen. None of the commands logs in to UiPath.
8
- - `uipath-extensions new <publisher/name> [--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
- - `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.
10
- - `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.
7
+ None of the commands logs in to UiPath.
8
+ - `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`, 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`.
10
+ - `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. `--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
+ For a Python coded function with one entry in `uipath.json.functions`, run `uip function init` first, then `extension init` and `uv lock`. `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. 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. Shared release upload and live registry submit stay blocked until Python function publication gates are available.
12
+ - `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, and the pack leaves its build output in the project folder.
11
13
  - `uipath-extensions pack [--dir <project dir>]` runs the `pack` steps below.
14
+
15
+ 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 and index build-check are not enabled for Python coded functions.
16
+
17
+ 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.
12
18
  - `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`.
13
19
  - `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.
14
20
  - `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.
@@ -47,7 +53,7 @@ The display fields are bounded. The SDK and the `contract` gate enforce these ru
47
53
  - `display.label` is 1 to 40 characters and `display.description` is 1 to 200 characters. Neither may contain `<` or `>`.
48
54
  - `tags` holds at most 8 tags. Each tag is 1 to 24 characters of lowercase letters, digits and single hyphens.
49
55
  - `display.iconBackground`, `display.iconBackgroundDark` and `display.iconColor` are optional, and each must be a color in the form `#RRGGBB`.
50
- - `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.
56
+ - `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.
51
57
  - Nothing displays these fields yet. Flow does not read `uipath-extensions.json` (flow-workbench `fb24f7e` has no reference to `uipath-extensions`).
52
58
 
53
59
  `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.
@@ -153,6 +159,23 @@ return api.post("/search", { body: { query: input.query } });
153
159
 
154
160
  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.
155
161
 
162
+ ## Dependencies
163
+
164
+ 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.
165
+
166
+ The list exists in two places.
167
+
168
+ - 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.
169
+ - The gates package holds a copy as `DEFAULT_POLICY` in `packages/gates/src/policy.ts`. `validate` and `build-check` use this copy, because they cannot read the index file.
170
+
171
+ 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.
172
+
173
+ 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.
174
+
175
+ 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.
176
+
177
+ 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.
178
+
156
179
  ## Pack
157
180
 
158
181
  `pack({ projectDir })` does these steps in order.
@@ -160,10 +183,20 @@ In a job, `connection()` sends each request through the Integration Service `htt
160
183
  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.
161
184
  3. Runs `uip function pack` in the project directory.
162
185
 
163
- 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.
186
+ 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`. `validate` and `build-check` read the entry point from the nupkg and fail unless it lists exactly one.
164
187
 
165
188
  `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.
166
189
 
190
+ ### Agents
191
+
192
+ A folder with a `pyproject.toml` and no `package.json` is an agent project (`projectKind`). The same commands then take the agent path.
193
+
194
+ - **`pack`** reads `name` and `version` from the `[project]` table of `pyproject.toml` and runs `uip codedagent pack`, which writes `.uipath/<package id>.<version>.nupkg`. With a `version`, it sets the `[project]` version for that call and puts `pyproject.toml` and `uv.lock` back afterwards, because `uip codedagent pack` runs `uv lock`.
195
+ - **`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.
196
+ - **`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.
197
+ - **`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.
198
+ - **`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.
199
+
167
200
  ## Upload
168
201
 
169
202
  `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.
@@ -185,7 +218,7 @@ The output ends with the destination.
185
218
 
186
219
  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.
187
220
 
188
- - `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.
221
+ - `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.
189
222
  - `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.
190
223
  - `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.
191
224
  - `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.
@@ -199,7 +232,7 @@ A project is adopted when it has a template, a package name that is a package id
199
232
  - 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.
200
233
  - 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`.
201
234
  - 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.
202
- - 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.
235
+ - 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.
203
236
  - 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.
204
237
  - 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.
205
238
  - 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.
@@ -217,9 +250,9 @@ A project is adopted when it has a template, a package name that is a package id
217
250
  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.
218
251
  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.
219
252
  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.`
220
- 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.
253
+ 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.
221
254
  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.
222
- 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` and `approved`, and `id` and `package` come from the `name` in `package.json`. A later version keeps every field of the existing file and appends the entry. 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>/`.
255
+ 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>/`.
223
256
  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.
224
257
 
225
258
  The version comes from the folder.
@@ -233,25 +266,42 @@ When a pull request from that branch is already open, `submit` updates it instea
233
266
  - The files removed are the ones that the default branch holds or the pull request branch holds, and that your folder no longer has. A file that only an earlier submit added is listed too.
234
267
  - An approval stays after an update while the index ruleset does not dismiss stale reviews. When a reviewer's latest decision is an approval, `submit` prints `Warning: <logins> approved this pull request, and the approval stays after this update. Ask for a new review.` Only `APPROVED`, `CHANGES_REQUESTED` and `DISMISSED` count as a decision.
235
268
 
236
- `--dry-run` runs the pre-check, the access check, the folder collection and the lookup of an open pull request with its owner check, then stops before the first write. It prints the index, branch, title, `Action: open` or `Action: update #<number>`, the files, the files not sent, the files removed, and for an update the approvals that would stay. `validate` still packs the project in the folder, as it does on its own, so build output such as `.uipath/` can appear there.
269
+ `--dry-run` runs the pre-check, the access check, the folder collection and the lookup of an open pull request with its owner check, then stops before the first write. It prints the index, branch, title, `Action: open` or `Action: update #<number>`, the files, the files not sent, the files removed, the `Security contact` and the `Maintainers` that the registration file would hold, and for an update the approvals that would stay. Each maintainer shows its id and where it came from, the signed-in account for a first registration and the index for a later version. When no maintainer was written, the line says so and gives the reason. `validate` still packs the project in the folder, as it does on its own, so build output such as `.uipath/` can appear there.
237
270
 
238
271
  A run that writes ends with the pull request URL, the number of files sent and removed, the local files not sent, and `Next: CI runs the gates and a reviewer approves. Watch: gh pr checks <number> --repo <index> --watch`.
239
272
 
240
273
  All GitHub calls go through a `GitHubClient`. `ghClient()` implements it with `gh api`, and the tests use a fake.
241
274
 
275
+ ## Submit a connector
276
+
277
+ A connector node is an Integration Service connector, not a function. Its folder holds `app/element/element.json`, the `app/element/element-metadata.json` that the CB CLI writes, an `image.svg`, and either V3 `standard-resources/<name>.json` files or V4 `v4/activities.json`, `v4/objects/<name>/metadata.json` and `v4/scripts/<name>.js`. Build it with `uip is connectors builder` and publish it to your tenant first with `uip is connectors publish`. The folder keeps your own key, `design-<org>-<name>` from the builder or `custom-<org>-<name>` from an export, and your own version. validate and submit set the community key of the node id in the copy they check and send, never in the folder, so you can keep importing and publishing the same folder to your tenant. Files that Integration Service generates on import, such as `swagger.json`, `objects.json` or `*.swagger.json`, are refused.
278
+
279
+ - **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>`.
280
+ - **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.
281
+ - **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`.
282
+ - **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.
283
+ - **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.
284
+ - **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.
285
+ - **Upload.** `upload` takes functions and agents only.
286
+
242
287
  ## Limits
243
288
 
289
+ - 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.
290
+ - 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.
291
+ - `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.
292
+ - `build-check` supports functions only. On an agent it runs the function build gates, which fail.
293
+ - 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`.
244
294
  - `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.
245
295
  - `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.
246
296
  - `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.
247
297
  - `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.
248
298
  - 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.
249
299
  - The manifest follows the shape in the registry design. The Flow node contract owner has not confirmed it yet, so it can still change.
250
- - `pack` needs `uip` on the path, and so do `validate` and `submit`, which run `pack`. `pack` takes the output file name `<package id>.<version>.nupkg` from it. `UIP_VERSION_RANGE` pins the tested `uip` versions, `1.205.0-preview.290` to `1.206.0-preview.292`. A version outside it is a warning, not an error, because `uip` upgrades itself. `src/uip.compat.test.ts` runs `new` and `pack` with a real `uip` at each bound. It finds the binary in `UIP_LOWER_BIN` and `UIP_UPPER_BIN` (or on the PATH when its version matches). When a bound is missing the test is skipped with a `FINDING` line locally, and it fails when the `CI` variable is set. The CI workflow installs both bounds. To move a bound, change `UIP_LOWER_BOUND` or `UIP_UPPER_BOUND` in `src/uip.ts` and the versions in `.github/workflows/ci.yml` together, and a test checks that they agree.
300
+ - `pack` needs `uip` on the path, and so do `validate` and `submit`, which run `pack`. `pack` takes the output file name `<package id>.<version>.nupkg` from it. `UIP_VERSION_RANGE` pins the tested `uip` versions, `1.205.0-preview.290` to `1.206.0-preview.292`. A version outside it is a warning, not an error, because `uip` upgrades itself. `src/uip.compat.test.ts` runs `new` and `pack` with a real `uip` at each bound. It finds the binary in `UIP_LOWER_BIN` and `UIP_UPPER_BIN` (or on the PATH when its version matches). When a bound is missing the test is skipped with a `FINDING` line locally, and it fails when the `CI` variable is set. The CI workflow installs both bounds. To move a bound, change `UIP_LOWER_BOUND` or `UIP_UPPER_BOUND` in `src/uip.ts` and the versions in `.github/tools/uip-lower` and `.github/tools/uip-upper` together, and a test checks that they agree.
251
301
  - `upload` in its default mode sends a package that is not the package the build workflow produces, because the version differs. Each run leaves one more version in the personal feed, and `upload` does not delete old ones. It uses the first entry point only, which is right for a node with one function. The upload also makes Orchestrator create a second process named after the package id, with no entry point set. Use the `<publisher>__<name>__dev` release. The output names the extra process and the command that removes it. A feed that refuses a SemVer prerelease version, or a tenant with no personal workspace feed, stops `upload` with the `uip` message.
252
- - The tests run `new`, `validate` and `pack` against a fake `uip` shaped like the real scaffold (`functions/hello.ts`, `uipath.json`, `include` of `**/*.ts`). A manual run with a real `uip` 1.206.0 on 2026-11-17 showed that `uip function pack` keeps the paths, so the nupkg holds `content/functions/hello.ts` and `content/maestro/connection.ts`. An earlier run had to drop the `@uipath/uipath-extensions-sdk` dependency, because the SDK is not on npm yet and `npm install` and `uip function pack` fail with a 404 on it. The compat test above is the automated run. `uip` upgrades itself on first run, so do not rely on one version.
302
+ - The tests run `new`, `validate` and `pack` against a fake `uip` shaped like the real scaffold (`functions/hello.ts`, `uipath.json`, `include` of `**/*.ts`). A manual run with a real `uip` 1.206.0 on 2026-11-17 showed that `uip function pack` keeps the paths, so the nupkg holds `content/functions/hello.ts` and `content/maestro/connection.ts`. An earlier run, made before the SDK was on npmjs, had to drop the `@uipath/uipath-extensions-sdk` dependency, because `npm install` and `uip function pack` failed with a 404 on it. The compat test above is the automated run. `uip` upgrades itself on first run, so do not rely on one version.
253
303
  - `validate` skips the seven gates that need GitHub, the npm registry, the index or a license scanner. It checks the `fixtures/` folder, but it has no fixture runner, so the `fixtures` gate skips the run of each fixture and prints `skipped` when the folder is fine. It packs the project, so the gates that read the nupkg run. The package it builds from the project folder leaves out a `registration.yaml`, because only the index owns that file. The same holds for the package that `submit` checks and `upload` sends: `pack` adds the file to `packOptions.filesExcluded` of `uipath.json` while `uip function pack` runs and puts `uipath.json` back afterwards. The result says so and the file stays as it was. A `registration.yaml` that is there is also checked for format, the required keys, the `approved` entries and a match with the `package.json` name, and a problem shows as a `review` result named `registration-file`, which does not fail validate. Without the file, nothing is checked. The index repo CI runs the skipped ones.
254
- - The starter template, packed by `uip` 1.205.0-preview.290 with this repo's SDK linked in place of the unpublished package, passes `dependency-policy` (the SDK package is not allow-listed, and the starter template does not depend on it), `runtime-shape` and `package-contents`. The gates accept `@uipath/coded-functions-js-sdk` and the GUIDs that `uip` writes into `entry-points.json`, `operate.json` and `uipath.json`.
304
+ - The starter template, packed by `uip` 1.205.0-preview.290 with this repo's SDK linked in place of the registry copy, which did not exist yet, passes `dependency-policy` (the SDK package is not allow-listed, and the starter template does not depend on it), `runtime-shape` and `package-contents`. The gates accept `@uipath/coded-functions-js-sdk` and the GUIDs that `uip` writes into `entry-points.json`, `operate.json` and `uipath.json`.
255
305
  - `new` fails, and removes the project it created, when there is no `functions/` directory, `tsconfig.json` or `uipath.json`, when the scaffold already has a `uipath-extensions.json` or has no `functions/hello.ts`, or when it finds no `defineFunction` call, or one it cannot edit safely (not an object literal, or one that spreads another object). It removes `method` and `path` only as direct properties of the call.
256
306
  - `submit` runs `validate`, which skips the gates that need GitHub, the npm registry, the index or a license scanner. A pass does not promise that the index CI passes, because the CI runs every gate on the pull request. `submit` reads at most 100 reviews of a pull request, so on a pull request with more than 100 an old decision can show as the latest. The allow list, the size limits and the local-only list are copies of the index rules, so a change to the index rules needs the same change in `submit`. The `registration` label may need triage rights on the index repo, so a missing label is a warning.
257
307
  - The tests of `submit` use a fake `GitHubClient`, and the `gh` argument lists and request bodies of `ghClient` are tested with a fake exec. No test calls GitHub, so a run against a sandbox index repo is still to be done.
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>;