dataiku-sdk 0.12.6 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +60 -14
  2. package/bin/dss.js +1 -1
  3. package/dist/packages/types/src/index.d.ts +128 -3
  4. package/dist/packages/types/src/index.js +106 -3
  5. package/dist/src/cli/coerce.d.ts +2 -1
  6. package/dist/src/cli/coerce.js +84 -26
  7. package/dist/src/cli/commands/app.js +6 -6
  8. package/dist/src/cli/commands/code.js +2 -2
  9. package/dist/src/cli/commands/dashboard.js +102 -13
  10. package/dist/src/cli/commands/data-quality.js +8 -8
  11. package/dist/src/cli/commands/dataset.js +11 -7
  12. package/dist/src/cli/commands/folder.js +5 -4
  13. package/dist/src/cli/commands/future.js +2 -2
  14. package/dist/src/cli/commands/index.js +2 -0
  15. package/dist/src/cli/commands/job.js +11 -11
  16. package/dist/src/cli/commands/notebook.js +1 -1
  17. package/dist/src/cli/commands/project-git.d.ts +2 -0
  18. package/dist/src/cli/commands/project-git.js +563 -0
  19. package/dist/src/cli/commands/project.js +2 -2
  20. package/dist/src/cli/commands/recipe.js +14 -17
  21. package/dist/src/cli/commands/scenario.js +4 -4
  22. package/dist/src/cli/contract.d.ts +5 -4
  23. package/dist/src/cli/contract.js +432 -62
  24. package/dist/src/cli/doctor.js +6 -6
  25. package/dist/src/cli/flags.js +25 -2
  26. package/dist/src/cli/helpers/dataset.js +1 -1
  27. package/dist/src/cli/output.d.ts +2 -1
  28. package/dist/src/cli/output.js +2 -6
  29. package/dist/src/cli/usage.d.ts +1 -1
  30. package/dist/src/cli/usage.js +2 -1
  31. package/dist/src/cli/version.d.ts +2 -2
  32. package/dist/src/cli/version.js +2 -2
  33. package/dist/src/cli.js +43 -26
  34. package/dist/src/client.d.ts +4 -0
  35. package/dist/src/client.js +12 -0
  36. package/dist/src/errors.d.ts +1 -1
  37. package/dist/src/index.d.ts +3 -2
  38. package/dist/src/index.js +2 -1
  39. package/dist/src/resources/connections.d.ts +3 -1
  40. package/dist/src/resources/connections.js +82 -21
  41. package/dist/src/resources/dashboards.d.ts +14 -0
  42. package/dist/src/resources/dashboards.js +156 -4
  43. package/dist/src/resources/datasets.js +42 -2
  44. package/dist/src/resources/folders.js +7 -3
  45. package/dist/src/resources/project-git.d.ts +154 -0
  46. package/dist/src/resources/project-git.js +427 -0
  47. package/dist/src/resources/recipes.js +4 -4
  48. package/dist/src/schemas.d.ts +2 -2
  49. package/dist/src/schemas.js +1 -1
  50. package/dist/src/skill.js +9 -211
  51. package/package.json +7 -4
  52. package/packages/types/dist/index.d.ts +128 -3
  53. package/packages/types/dist/index.js +106 -3
  54. package/plugin.json +15 -0
  55. package/skills/dataiku-dss/SKILL.md +220 -0
package/dist/src/skill.js CHANGED
@@ -2,218 +2,16 @@ import { execFileSync, } from "node:child_process";
2
2
  import * as fs from "node:fs";
3
3
  import * as os from "node:os";
4
4
  import * as path from "node:path";
5
- const SKILL_BODY = `# Dataiku DSS agent CLI
6
-
7
- Use \`dss\` when an agent needs to inspect or change Dataiku DSS resources: projects, datasets, recipes, jobs, scenarios, folders, notebooks, SQL, variables, code envs, and connections.
8
- If the installed \`dss\` binary is unavailable but the repository checkout is the current workspace, prefer \`bun --no-env-file src/cli.ts ...\` or \`bun --no-env-file ./bin/dss.js ...\`. Node users can invoke the same cross-runtime launcher as \`node ./bin/dss.js ...\`; when \`dist/\` has not been built, it delegates to Bun. From another working directory, pass the checkout's absolute \`bin/dss.js\` path to Bun or Node.
9
- \`--no-env-file\` disables Bun's automatic preloading only; the CLI still applies its documented \`.env\` handling unless \`DATAIKU_DISABLE_ENV=1\` is set.
10
-
11
- ## Contract
12
-
13
- - Command results write exactly one JSON value to stdout, including \`doctor\`, \`batch\`, and \`cleanup\` failure reports; use the exit code and result fields.
14
- - Dispatch/runtime failures write one JSONL error event to stderr with \`type:"error"\`, \`ok:false\`, \`error\`, \`code\`, and \`exitCode\`, while stdout stays empty.
15
- - Non-fatal warnings and \`--verbose\` HTTP traces are JSONL stderr events (\`type:"warning"\` / \`type:"trace"\`), never prose.
16
- - No prompts, help screens, tables, banners, or prose output are part of the contract.
17
- - Exit codes: 0 success, 1 usage/configuration error, 2 DSS or internal error, 3 transient/retryable DSS error, 4 a failed long-running result or synchronous assertion.
18
- - Pass \`--json\` for compact single-line JSON on stdout; use it for agent discovery and other JSON results to minimize tokens. Without it, success JSON is pretty-printed.
19
- - \`--raw\` is the only stdout escape hatch: recipe payload commands emit raw bytes to stdout unless \`--output PATH\` is also set; with \`--output\`, stdout is the JSON string equal to \`PATH\` and the file receives exact raw bytes.
20
- - \`--fields a,b,c\` projects those fields from object or array-of-objects results; dotted paths (\`a.b.c\`) drill into nested objects, and missing fields become \`null\`; string and scalar results pass through unchanged.
21
-
22
- ## Discover commands
23
-
24
- \`\`\`text
25
- dss agent contract --fields protocol,agentContractVersion,cli,stdio,planning,compatibility --json
26
- dss commands run --fields dataset.create --json
27
- dss commands run --fields dataset.create.usage,dataset.create.description,dataset.create.flags,dataset.create.examples --json
28
- dss commands run --fields dataset --json
29
- dss agent contract --fields commands.actions --json
30
- \`\`\`
31
-
32
- Bootstrap with the scoped \`agent contract\` call above: \`protocol,agentContractVersion,cli,stdio,planning,compatibility\` cover protocol/schema compatibility, stderr event semantics, preferred discovery commands, non-JSON escape hatches, planning rules, and compatibility guarantees in ~250 tokens. Request \`schemas\` (the JSON schemas) or \`commands\` (the contract's discovery section) only when you actually need them.
33
-
34
- Before choosing command syntax, look the action up in the command registry: \`--fields RESOURCE.ACTION\` returns one complete entry, and appended \`.FIELD\` paths return only the metadata you need. Prefer the four-field projection \`usage,description,flags,examples\` by default — it is the smallest self-sufficient starting point for constructing an invocation. The registry entry is the canonical schema for flags, positional arguments, side effects, auth requirements, output shape, idempotency, dry-run support, structured examples, payload schemas, unsafe outputs, cleanup hints, and exit codes.
35
-
36
- \`--fields\` takes a comma-separated list, so request several actions in one call. Each key is echoed exactly as requested (\`--fields dataset.create\` returns \`{"dataset.create": {...}}\`). Enumerate every resource and action with \`dss agent contract --fields commands.actions --json\` (~1k tokens); the hundreds-of-thousands-token unscoped registry is compatibility-only. An unknown resource or action exits with code 1 and a JSON error envelope on stderr containing the valid options.
37
- Credential lookup order is flags first, then \`DATAIKU_*\` environment variables, then saved credentials.
38
- Set \`DATAIKU_DISABLE_ENV=1\` when a test must ignore both \`.env\` files and \`DATAIKU_*\` environment variables.
39
- When \`.env\` loading is enabled, the CLI reads \`.env\` from the command's current working directory first and then the CLI build/root directory; the invocation directory wins on conflicting keys. Put test-specific \`.env\` files in the directory where you invoke \`dss\`.
40
- For disposable agent tests, set \`DSS_CONFIG_DIR\` to a temporary directory so saved credentials never touch the real profile.
41
-
42
- ## Planning, safety, and generic inputs
43
-
44
- - Before any registry entry with \`sideEffect:"write"\`, run the exact argv with \`--plan\` first. Planning is local: it returns the derived operation without resolving credentials or calling DSS. Check \`destructive\`, \`idempotency\`, \`async\`, \`unsafeOutputs\`, and \`exitCodes\` before execution.
45
- - Use \`--dry-run\` only when that action's registry entry has \`dryRun:true\`. \`--plan\` explains the operation; \`--dry-run\` exercises the action-specific simulation path. Never add an unsupported flag.
46
- - When a create/upload action advertises \`--record-cleanup\`, pass \`--record-cleanup cleanup.jsonl\`. \`dss cleanup --file cleanup.jsonl\` previews the recorded cleanup steps in reverse order and does not mutate DSS; add \`--apply\` only after checking the preview.
47
- - For JSON payload actions, follow \`inputContract\`, \`requiredFlags\`, and \`requiredOneOf\`. Prefer \`--data-file PATH\` or \`--stdin\` when advertised instead of inline \`--data\`; this preserves exact JSON across shells and keeps large or sensitive payloads out of process arguments.
48
- - Authenticated actions advertise \`--request-timeout MS\` and \`--retries N\`; \`--retries\` applies to idempotent GET requests. Long-running actions separately advertise controls such as \`--timeout MS\`, \`--poll-interval MS\`, and log limits; use only the flags in that action's registry entry.
49
- - Before live mutation tests, use \`dss fixtures --json\` to discover compatible test resources instead of guessing project objects.
50
-
51
- ## Authentication
52
-
53
- Prefer environment variables for ephemeral agent runs. Use the syntax for the active shell:
54
-
55
- POSIX shell:
56
-
57
- \`\`\`sh
58
- export DATAIKU_URL=https://dss.example.com
59
- export DATAIKU_API_KEY=your-api-key
60
- export DATAIKU_PROJECT_KEY=MYPROJ
61
- \`\`\`
62
-
63
- PowerShell:
64
-
65
- \`\`\`powershell
66
- $env:DATAIKU_URL = "https://dss.example.com"
67
- $env:DATAIKU_API_KEY = "your-api-key"
68
- $env:DATAIKU_PROJECT_KEY = "MYPROJ"
69
- \`\`\`
70
-
71
- Windows Command Prompt:
72
-
73
- \`\`\`bat
74
- set "DATAIKU_URL=https://dss.example.com"
75
- set "DATAIKU_API_KEY=your-api-key"
76
- set "DATAIKU_PROJECT_KEY=MYPROJ"
77
- \`\`\`
78
-
79
- To persist credentials for later invocations:
80
-
81
- \`\`\`bash
82
- dss auth login --url https://dss.example.com --api-key YOUR_KEY --project-key MYPROJ
83
- \`\`\`
84
-
85
- The command saves credentials and returns \`{"saved":true,"path":"..."}\`. \`DSS_CONFIG_DIR\` wins when set. Otherwise credentials use \`XDG_CONFIG_HOME/dataiku/credentials.json\`, the \`dataiku/credentials.json\` directory under \`APPDATA\` on Windows, or \`~/.config/dataiku/credentials.json\`.
86
- \`auth login\` validates by listing accessible projects before saving credentials, so the API key must be allowed to call DSS project-list APIs.
87
-
88
- TLS flags: \`--insecure\` disables certificate verification; \`--ca-cert PATH\` adds a PEM CA bundle. Environment equivalents: \`NODE_TLS_REJECT_UNAUTHORIZED\`, \`NODE_EXTRA_CA_CERTS\`.
89
-
90
- ## Common workflows
91
-
92
- \`\`\`text
93
- dss version
94
- dss project list
95
- dss dataset list --project-key MYPROJ
96
- dss recipe get-payload compute_orders --raw --output code.py --project-key MYPROJ
97
- dss recipe diff compute_orders --file code.py --project-key MYPROJ
98
- dss recipe set-payload compute_orders --file code.py --project-key MYPROJ
99
- dss job build-and-wait orders --include-logs --project-key MYPROJ
100
- dss sql query --connection analytics --sql "select 1" --project-key MYPROJ
101
- dss batch --data-file steps.json
102
- \`\`\`
103
- For fake-DSS smoke tests, return project lists as JSON arrays such as \`[{"projectKey":"MYPROJ","name":"My Project"}]\` from \`/public/api/projects/\`; recipe payload commands read \`/public/api/projects/<PROJECT>/recipes/<NAME>?includePayload=true\` and expect a JSON object shaped like \`{"recipe":{"name":"<NAME>","type":"python"},"payload":"..."}\`.
104
-
105
- ## Application release safety
106
-
107
- Treat app release as explicit validate, compare, version, successor, verify, and permission gates.
108
- The public app-manifest \`version\` field is raw metadata: writing it is NOT a publish transaction.
109
- New instances inherit the template's raw \`version\`; existing instances are never upgraded in
110
- place — create an additive successor (the old instance is preserved), verify it, then retire the
111
- old one as a separate guarded step. Never infer private publish/recreate/rename,
112
- recipient-sharing, or UI-click operations that the public DSS API does not expose.
113
-
114
- \`\`\`text
115
- dss app validate-manifest --project-key APP_TEMPLATE
116
- dss app compare-manifest APP_ID --project-key RELEASE_INSTANCE
117
- dss app manifest-version --project-key APP_TEMPLATE
118
- dss app set-manifest-version --manifest-version 1.4.0 --project-key APP_TEMPLATE
119
- # targetProjectKey in instance.json must be confirmed absent
120
- dss app create-instance APP_ID --data-file instance.json --wait --record-cleanup cleanup.jsonl
121
- dss app create-successor-instance APP_ID --from RELEASE_INSTANCE --to RELEASE_INSTANCE_V2 --copy-permissions --record-cleanup cleanup.jsonl
122
- dss app verify-instance APP_ID --project-key RELEASE_INSTANCE_V2 --expect-version 1.4.0
123
- dss cleanup --file cleanup.jsonl
124
- dss app permissions-snapshot --project-key RELEASE_INSTANCE --output permissions.json
125
- dss app permissions-diff --project-key RELEASE_INSTANCE --file permissions.json
126
- dss app permissions-restore --project-key RELEASE_INSTANCE --file permissions.json --dry-run
127
- \`\`\`
128
-
129
- An invalid manifest exits non-zero with the validation result in the structured error details.
130
- Review the cleanup preview before \`dss cleanup --file cleanup.jsonl --apply\`. Every new entry is
131
- bound to the canonical DSS URL. App cleanup records a \`creationTag\` hash observed after the DSS
132
- future identifies its target key; unconfirmed creation stops unresolved. The future target and
133
- later \`creationTag\` are independent, non-atomic observations because the public API exposes
134
- neither an immutable project ID joined to the future nor a conditional DELETE. Cleanup rechecks
135
- type and \`creationTag\` immediately before deletion, rejecting detected key reuse but unable to
136
- eliminate replacement in the remaining check-to-DELETE gap. Apply validates the full ledger before
137
- any request and rejects legacy, mixed-server, mismatched-server, or unbound app cleanup entries.
138
- The successor's cleanup ledger entry targets only the new project key;
139
- the predecessor is never targeted. Some DSS deployments return 403 for an unknown target project:
140
- instance creation requires confirmed target absence before POST, so an inaccessible target absent
141
- from the visible project list is still rejected as unconfirmed rather than risking cleanup against
142
- a pre-existing project. A definitive create rejection never produces a cleanup entry.
143
-
144
- \`app set-manifest-version\` reports
145
- \`concurrencyControl:"client-side-non-atomic-stale-read-check"\`. \`--expect-hash SHA256\` refuses the
146
- write when the manifest already changed, but the PUT itself stays unconditional: this command can
147
- overwrite a writer that commits inside the read-then-write window, and the post-write read cannot
148
- detect that lost update when this command's payload wins. Never treat the hash as a serializing lock.
149
- An ambiguous manifest PUT or verification read exits non-zero with \`persisted:null\`,
150
- \`after:null\`, and \`outcome:"indeterminate"\`; it never claims success or rejection.
151
-
152
- The API key authenticates public REST only. \`app verify-instance\` reports \`apiReady:true\`,
153
- \`status:"API_VERIFIED_UI_PENDING"\`, and \`uiPublicationVerified:false\`. Its \`visual-ui\` gate
154
- requires a pre-authenticated SSO browser session or dedicated UI test identity and evidence from
155
- exercising the affected tiles, forms, and actions; the CLI never marks that external gate complete.
156
- Permission snapshots have an integrity hash bound to the canonical DSS URL, project key, and
157
- observed concrete project incarnation from \`creationTag\`; diff and restore reject detected server,
158
- key, or incarnation mismatches. DSS exposes no conditional permission PUT, so these client-side checks
159
- narrow and detect key-reuse races but cannot serialize the final check with the write. Snapshots
160
- contain access-control identities; keep them mode \`0600\` and commit them only when repository
161
- policy permits.
162
-
163
- ## Confirming mutations
164
-
165
- Mutations print a small JSON ack to stdout and exit 0 on success (e.g. \`{"updated":"NAME","resource":"recipe"}\`); on failure they print the error envelope to stderr and exit non-zero. The exit code is the source of truth.
166
-
167
- - For portable multi-step writes, prefer \`dss batch\` (payload: a JSON array of argv arrays). It runs fail-fast, returns one envelope with per-step \`ok\`/\`result\`/\`error\`, and exits non-zero if any step fails.
168
- - If separate processes are required, inspect each exit code and stop before launching the next step. Do not rely on shell chaining: syntax differs between POSIX shells, Windows PowerShell 5.1, PowerShell 7, and Command Prompt.
169
- - Never pipe a mutation into a command that prints a fixed string or merges stderr: a pipeline may return the helper's exit code and report a failed mutation as success.
170
- - To branch in code, key off the exit code or the JSON ack on stdout — never a hardcoded label.
171
-
172
- ## Platform & debugging notes
173
-
174
- - Pass code and SQL via \`--file\`/\`--sql-file\`, not inline: shells (especially PowerShell) mangle quotes, \`$\`, and newlines in multi-line snippets.
175
- - On a non-UTF-8 console (e.g. Windows cp1252), don't print non-ASCII results; write them to a UTF-8 file and read that, or use \`--output PATH\`.
176
- - Build failures: \`dss job log <id> --errors-only\` surfaces just error/traceback lines, and \`--output PATH\` saves the full log to a file. Logs are one long line with JVM noise; the \`Error in Python process: At line <N>\` marker maps \`<N>\` straight to your recipe payload's source line.
177
- - Schema changes aren't automatic for code recipes: after changing a python/SQL/prepare recipe's output columns run \`dss dataset refresh-schema\` (or rebuild) before downstream reads, and \`dss dataset validate-build\` to catch file-backed misconfig before launching a build. Exception: \`dss recipe create --type sync\` copies the input schema onto a schemaless dataset output at create time (see \`syncOutputSchemaPropagated\` in the result), so a fresh sync output builds populated without a manual refresh.
178
- - \`dss dataset download\` is capped (default 100k rows) and returns \`{ path, rows, truncated, limit }\`: check \`truncated\` and raise \`--limit N\` when you need more — treat it as a sample, not a guaranteed full export. Without \`--output\` the file lands in the current working directory (and a \`dataset_download_default_location\` warning names that path); pass \`--output PATH\` to control the destination. For very large tables, aggregate in SQL or read inside a recipe instead.
179
- - \`dss api-service list-packages SERVICE\` first verifies the parent service through its settings. A \`not_found\` error means the service is missing (verify the service ID and project key); an empty array means the service exists but has no deployable packages. Do not reinterpret \`not_found\` as an empty package list or retry the lower-level packages route.
180
- - \`dss notebook clear-jupyter-outputs NAME --dry-run\` returns the full \`current\` and \`next\` notebook states. Applying it clears \`outputs\` and resets \`execution_count\` to \`0\` only on code cells, preserving markdown and raw cells unchanged.
181
- - \`dss sql query ... --dataset PROJECT.NAME\` first queries through the dataset. If DSS rejects that dataset connection as neither SQL nor HDFS, the CLI reads dataset metadata and retries with \`params.connection\` (using its schema or catalog as the database when available). A readable dataset with no usable connection exits with \`validation_failed\` and advises \`--connection\`; dataset metadata \`404\` and \`403\` errors propagate as \`not_found\` and \`permission_denied\`.
182
- - \`dss sql query ... --start-retries N\` opts the query-start POST into transient retries with exponential backoff. A lost response can cause DSS to execute the SQL more than once, so use it only for SQL whose repetition is safe; ordinary \`--retries N\` remains GET-only.
183
-
184
- ## Error envelope
185
-
186
- For dispatch/runtime failures, parse stderr as JSONL; the final line is an error event:
187
-
188
- \`\`\`json
189
- {
190
- "type": "error",
191
- "ok": false,
192
- "error": "Missing API key.",
193
- "code": "usage_error",
194
- "category": "usage",
195
- "exitCode": 1,
196
- "resource": "dataset",
197
- "action": "list"
198
- }
199
- \`\`\`
200
-
201
- \`doctor\`, \`batch\`, and \`cleanup\` report command-level failures on stdout and leave stderr empty. Use the exit code before choosing a stream.
202
- Use \`code\`, \`category\`, \`exitCode\`, \`retryable\`, \`status\`, and \`details\` for recovery logic. Do not scrape message text when a structured field is available.
203
- Treat \`details.body\` as sanitized metadata only: it contains at most \`requestId\`/\`request_id\`/\`errorId\`/\`elapsedMs\` plus locally trusted target/timing fields, not the arbitrary DSS response body. \`details.statusText\` is canonical text derived from the numeric status, not a remote reason phrase. Base recovery on top-level \`code\`, \`category\`, \`status\`, \`retryable\`, \`requestId\`, \`hint\`, and \`details.dssCategory\`; never parse or expose assumed server-body fields.
204
- `;
205
- const SKILL_FRONTMATTER = `---
206
- name: dataiku-dss
207
- description: >-
208
- Agent-only JSON CLI for Dataiku DSS. Use to inspect or mutate DSS projects,
209
- datasets, recipes, jobs, scenarios, folders, notebooks, SQL, variables,
210
- code envs, and connections. Discover scoped command metadata with
211
- dss commands run --fields RESOURCE.ACTION --json.
212
- ---
213
-
214
- `;
5
+ const SKILL_URLS = [
6
+ new URL("../skills/dataiku-dss/SKILL.md", import.meta.url),
7
+ new URL("../../skills/dataiku-dss/SKILL.md", import.meta.url),
8
+ ];
215
9
  function skillContent() {
216
- return SKILL_FRONTMATTER + SKILL_BODY;
10
+ for (const skillUrl of SKILL_URLS) {
11
+ if (fs.existsSync(skillUrl))
12
+ return fs.readFileSync(skillUrl, "utf-8");
13
+ }
14
+ throw new Error(`Bundled Dataiku skill not found. Checked: ${SKILL_URLS.map((url) => url.pathname).join(", ")}`);
217
15
  }
218
16
  export const AGENTS = {
219
17
  claude: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dataiku-sdk",
3
- "version": "0.12.6",
3
+ "version": "1.0.0",
4
4
  "description": "Dataiku DSS SDK and CLI for programmatic access to DSS REST APIs",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -13,6 +13,8 @@
13
13
  },
14
14
  "files": [
15
15
  "dist/",
16
+ "plugin.json",
17
+ "skills/",
16
18
  "bin/dss.js",
17
19
  "packages/types/dist/"
18
20
  ],
@@ -22,9 +24,10 @@
22
24
  },
23
25
  "scripts": {
24
26
  "build": "tsc && tsc -p packages/types/tsconfig.json",
25
- "prepack": "tsc && tsc -p packages/types/tsconfig.json",
26
- "prepublishOnly": "tsc && tsc -p packages/types/tsconfig.json",
27
- "check": "tsc --noEmit",
27
+ "prepack": "node scripts/sync-plugin-version.mjs --check && tsc && tsc -p packages/types/tsconfig.json",
28
+ "prepublishOnly": "node scripts/sync-plugin-version.mjs --check && tsc && tsc -p packages/types/tsconfig.json",
29
+ "check": "tsc --noEmit && node scripts/sync-plugin-version.mjs --check",
30
+ "version": "node scripts/sync-plugin-version.mjs && git add plugin.json",
28
31
  "lint": "oxlint src/",
29
32
  "lint:fix": "oxlint --fix src/",
30
33
  "format": "dprint fmt",
@@ -66,6 +66,7 @@ export declare const DatasetSummarySchema: import("@sinclair/typebox").TObject<{
66
66
  managed: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
67
67
  params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
68
68
  connection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
69
+ uploadConnection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
69
70
  schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
70
71
  catalog: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
71
72
  }>>;
@@ -86,6 +87,7 @@ export declare const DatasetDetailsSchema: import("@sinclair/typebox").TObject<{
86
87
  managed: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
87
88
  params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
88
89
  connection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
90
+ uploadConnection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
89
91
  path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
90
92
  table: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
91
93
  schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -111,7 +113,7 @@ export declare const DatasetDetailsSchema: import("@sinclair/typebox").TObject<{
111
113
  export type DatasetDetails = Static<typeof DatasetDetailsSchema>;
112
114
  export declare const DatasetCreateOptionsSchema: import("@sinclair/typebox").TObject<{
113
115
  datasetName: import("@sinclair/typebox").TString;
114
- connection: import("@sinclair/typebox").TString;
116
+ connection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
115
117
  dsType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
116
118
  table: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
117
119
  dbSchema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -382,8 +384,8 @@ export declare const FlowZoneUpdateOptionsSchema: import("@sinclair/typebox").TO
382
384
  export type FlowZoneUpdateOptions = Static<typeof FlowZoneUpdateOptionsSchema>;
383
385
  export declare const FolderCreateOptionsSchema: import("@sinclair/typebox").TObject<{
384
386
  name: import("@sinclair/typebox").TString;
385
- type: import("@sinclair/typebox").TString;
386
- connection: import("@sinclair/typebox").TString;
387
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
388
+ connection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
387
389
  path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
388
390
  params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
389
391
  projectKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -677,6 +679,128 @@ export declare const FlowMapOptionsSchema: import("@sinclair/typebox").TObject<{
677
679
  includeRaw: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
678
680
  }>;
679
681
  export type FlowMapOptions = Static<typeof FlowMapOptionsSchema>;
682
+ /**
683
+ * Git working-copy status of a project. Stable fields are documented in the
684
+ * DSS 14.7.3 source; DSS additionally returns extension fields, which are
685
+ * preserved by `additionalProperties: true`.
686
+ */
687
+ export declare const ProjectGitStatusSchema: import("@sinclair/typebox").TObject<{
688
+ currentBranch: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
689
+ remotes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
690
+ name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
691
+ url: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
692
+ }>>>;
693
+ trackingCount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
694
+ ahead: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
695
+ behind: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
696
+ }>>;
697
+ clean: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
698
+ hasUncommittedChanges: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
699
+ added: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
700
+ changed: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
701
+ removed: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
702
+ missing: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
703
+ modified: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
704
+ conflicting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
705
+ untracked: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
706
+ untrackedFolders: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
707
+ originProjectKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
708
+ trackingCountWithOriginProject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
709
+ ahead: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
710
+ behind: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
711
+ }>>;
712
+ }>;
713
+ export type ProjectGitStatus = Static<typeof ProjectGitStatusSchema>;
714
+ export declare const ProjectGitRemoteSchema: import("@sinclair/typebox").TObject<{
715
+ url: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
716
+ }>;
717
+ export type ProjectGitRemote = Static<typeof ProjectGitRemoteSchema>;
718
+ /**
719
+ * Result of a Git mutation. DSS answers with HTTP 200 even for failures, so
720
+ * `success` is the field callers must inspect before trusting the operation.
721
+ */
722
+ export declare const ProjectGitActionResultSchema: import("@sinclair/typebox").TObject<{
723
+ success: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
724
+ output: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
725
+ logs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
726
+ messages: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
727
+ }>;
728
+ export type ProjectGitActionResult = Static<typeof ProjectGitActionResultSchema>;
729
+ export declare const ProjectGitTagSchema: import("@sinclair/typebox").TObject<{
730
+ name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
731
+ shortName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
732
+ commit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
733
+ annotations: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
734
+ readOnly: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
735
+ }>;
736
+ export type ProjectGitTag = Static<typeof ProjectGitTagSchema>;
737
+ export declare const ProjectGitTagsSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
738
+ name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
739
+ shortName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
740
+ commit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
741
+ annotations: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
742
+ readOnly: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
743
+ }>>;
744
+ export type ProjectGitTags = Static<typeof ProjectGitTagsSchema>;
745
+ /**
746
+ * Paginated commit log. `nextCommit` is the cursor DSS expects back to fetch
747
+ * the following page; entries stay unpinned because commit payloads vary.
748
+ */
749
+ export declare const ProjectGitLogResultSchema: import("@sinclair/typebox").TObject<{
750
+ entries: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>;
751
+ nextCommit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
752
+ }>;
753
+ export type ProjectGitLogResult = Static<typeof ProjectGitLogResultSchema>;
754
+ /**
755
+ * Diff between two revisions. Stable fields are documented in the DSS 14.7.3
756
+ * source; DSS additionally returns extension fields, which are preserved by
757
+ * `additionalProperties: true`.
758
+ */
759
+ export declare const ProjectGitDiffResultSchema: import("@sinclair/typebox").TObject<{
760
+ commitFrom: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
761
+ commitTo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
762
+ addedLines: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
763
+ removedLines: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
764
+ changedFiles: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
765
+ entries: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>>;
766
+ }>;
767
+ export type ProjectGitDiffResult = Static<typeof ProjectGitDiffResultSchema>;
768
+ export declare const ProjectGitLibrarySchema: import("@sinclair/typebox").TObject<{
769
+ repository: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
770
+ login: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
771
+ pathInGitRepository: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
772
+ localTargetPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
773
+ checkout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
774
+ addToPythonPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
775
+ }>;
776
+ export type ProjectGitLibrary = Static<typeof ProjectGitLibrarySchema>;
777
+ export declare const ProjectGitLibrariesSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
778
+ repository: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
779
+ login: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
780
+ pathInGitRepository: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
781
+ localTargetPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
782
+ checkout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
783
+ addToPythonPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
784
+ }>>;
785
+ export type ProjectGitLibraries = Static<typeof ProjectGitLibrariesSchema>;
786
+ /** Handle returned by Git operations that run asynchronously as a DSS future. */
787
+ export declare const ProjectGitFutureResponseSchema: import("@sinclair/typebox").TObject<{
788
+ jobId: import("@sinclair/typebox").TString;
789
+ }>;
790
+ export type ProjectGitFutureResponse = Static<typeof ProjectGitFutureResponseSchema>;
791
+ export declare const ProjectGitFutureStateSchema: import("@sinclair/typebox").TObject<{
792
+ jobId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
793
+ hasResult: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
794
+ result: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
795
+ alive: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
796
+ aborted: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
797
+ abortable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
798
+ unknown: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
799
+ startTime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
800
+ runningTime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
801
+ error: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
802
+ }>;
803
+ export type ProjectGitFutureState = Static<typeof ProjectGitFutureStateSchema>;
680
804
  export declare const ProjectSummaryArraySchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
681
805
  projectKey: import("@sinclair/typebox").TString;
682
806
  name: import("@sinclair/typebox").TString;
@@ -689,6 +813,7 @@ export declare const DatasetSummaryArraySchema: import("@sinclair/typebox").TArr
689
813
  managed: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
690
814
  params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
691
815
  connection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
816
+ uploadConnection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
692
817
  schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
693
818
  catalog: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
694
819
  }>>;
@@ -123,6 +123,7 @@ export const DatasetSummarySchema = Type.Object({
123
123
  managed: Type.Optional(Type.Boolean()),
124
124
  params: Type.Optional(Type.Object({
125
125
  connection: Type.Optional(Type.String()),
126
+ uploadConnection: Type.Optional(Type.String()),
126
127
  schema: Type.Optional(Type.String()),
127
128
  catalog: Type.Optional(Type.String()),
128
129
  }, { additionalProperties: true, })),
@@ -141,6 +142,7 @@ export const DatasetDetailsSchema = Type.Object({
141
142
  managed: Type.Optional(Type.Boolean()),
142
143
  params: Type.Optional(Type.Object({
143
144
  connection: Type.Optional(Type.String()),
145
+ uploadConnection: Type.Optional(Type.String()),
144
146
  path: Type.Optional(Type.String()),
145
147
  table: Type.Optional(Type.String()),
146
148
  schema: Type.Optional(Type.String()),
@@ -159,7 +161,7 @@ export const DatasetDetailsSchema = Type.Object({
159
161
  }, { additionalProperties: true, });
160
162
  export const DatasetCreateOptionsSchema = Type.Object({
161
163
  datasetName: Type.String(),
162
- connection: Type.String(),
164
+ connection: Type.Optional(Type.String()),
163
165
  dsType: Type.Optional(Type.String()),
164
166
  table: Type.Optional(Type.String()),
165
167
  dbSchema: Type.Optional(Type.String()),
@@ -393,8 +395,8 @@ export const FlowZoneUpdateOptionsSchema = Type.Object({
393
395
  // ---------------------------------------------------------------------------
394
396
  export const FolderCreateOptionsSchema = Type.Object({
395
397
  name: Type.String(),
396
- type: Type.String(),
397
- connection: Type.String(),
398
+ type: Type.Optional(Type.String()),
399
+ connection: Type.Optional(Type.String()),
398
400
  path: Type.Optional(Type.String()),
399
401
  params: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
400
402
  projectKey: Type.Optional(Type.String()),
@@ -642,6 +644,107 @@ export const FlowMapOptionsSchema = Type.Object({
642
644
  includeRaw: Type.Optional(Type.Boolean()),
643
645
  });
644
646
  // ---------------------------------------------------------------------------
647
+ // Project Git
648
+ // ---------------------------------------------------------------------------
649
+ /**
650
+ * Git working-copy status of a project. Stable fields are documented in the
651
+ * DSS 14.7.3 source; DSS additionally returns extension fields, which are
652
+ * preserved by `additionalProperties: true`.
653
+ */
654
+ export const ProjectGitStatusSchema = Type.Object({
655
+ currentBranch: Type.Optional(Type.String()),
656
+ remotes: Type.Optional(Type.Array(Type.Object({
657
+ name: Type.Optional(Type.String()),
658
+ url: Type.Optional(Type.String()),
659
+ }, { additionalProperties: true, }))),
660
+ trackingCount: Type.Optional(Type.Object({
661
+ ahead: Type.Optional(Type.Number()),
662
+ behind: Type.Optional(Type.Number()),
663
+ }, { additionalProperties: true, })),
664
+ clean: Type.Optional(Type.Boolean()),
665
+ hasUncommittedChanges: Type.Optional(Type.Boolean()),
666
+ added: Type.Optional(Type.Array(Type.String())),
667
+ changed: Type.Optional(Type.Array(Type.String())),
668
+ removed: Type.Optional(Type.Array(Type.String())),
669
+ missing: Type.Optional(Type.Array(Type.String())),
670
+ modified: Type.Optional(Type.Array(Type.String())),
671
+ conflicting: Type.Optional(Type.Array(Type.String())),
672
+ untracked: Type.Optional(Type.Array(Type.String())),
673
+ untrackedFolders: Type.Optional(Type.Array(Type.String())),
674
+ originProjectKey: Type.Optional(Type.String()),
675
+ trackingCountWithOriginProject: Type.Optional(Type.Object({
676
+ ahead: Type.Optional(Type.Number()),
677
+ behind: Type.Optional(Type.Number()),
678
+ }, { additionalProperties: true, })),
679
+ }, { additionalProperties: true, });
680
+ export const ProjectGitRemoteSchema = Type.Object({
681
+ url: Type.Optional(Type.String()),
682
+ }, { additionalProperties: true, });
683
+ /**
684
+ * Result of a Git mutation. DSS answers with HTTP 200 even for failures, so
685
+ * `success` is the field callers must inspect before trusting the operation.
686
+ */
687
+ export const ProjectGitActionResultSchema = Type.Object({
688
+ success: Type.Optional(Type.Boolean()),
689
+ output: Type.Optional(Type.Unknown()),
690
+ logs: Type.Optional(Type.Unknown()),
691
+ messages: Type.Optional(Type.Unknown()),
692
+ }, { additionalProperties: true, });
693
+ export const ProjectGitTagSchema = Type.Object({
694
+ name: Type.Optional(Type.String()),
695
+ shortName: Type.Optional(Type.String()),
696
+ commit: Type.Optional(Type.Unknown()),
697
+ annotations: Type.Optional(Type.Unknown()),
698
+ readOnly: Type.Optional(Type.Boolean()),
699
+ }, { additionalProperties: true, });
700
+ export const ProjectGitTagsSchema = Type.Array(ProjectGitTagSchema);
701
+ /**
702
+ * Paginated commit log. `nextCommit` is the cursor DSS expects back to fetch
703
+ * the following page; entries stay unpinned because commit payloads vary.
704
+ */
705
+ export const ProjectGitLogResultSchema = Type.Object({
706
+ entries: Type.Array(Type.Unknown()),
707
+ nextCommit: Type.Optional(Type.String()),
708
+ }, { additionalProperties: true, });
709
+ /**
710
+ * Diff between two revisions. Stable fields are documented in the DSS 14.7.3
711
+ * source; DSS additionally returns extension fields, which are preserved by
712
+ * `additionalProperties: true`.
713
+ */
714
+ export const ProjectGitDiffResultSchema = Type.Object({
715
+ commitFrom: Type.Optional(Type.Unknown()),
716
+ commitTo: Type.Optional(Type.Unknown()),
717
+ addedLines: Type.Optional(Type.Number()),
718
+ removedLines: Type.Optional(Type.Number()),
719
+ changedFiles: Type.Optional(Type.Number()),
720
+ entries: Type.Optional(Type.Array(Type.Unknown())),
721
+ }, { additionalProperties: true, });
722
+ export const ProjectGitLibrarySchema = Type.Object({
723
+ repository: Type.Optional(Type.String()),
724
+ login: Type.Optional(Type.String()),
725
+ pathInGitRepository: Type.Optional(Type.String()),
726
+ localTargetPath: Type.Optional(Type.String()),
727
+ checkout: Type.Optional(Type.String()),
728
+ addToPythonPath: Type.Optional(Type.Boolean()),
729
+ }, { additionalProperties: true, });
730
+ export const ProjectGitLibrariesSchema = Type.Array(ProjectGitLibrarySchema);
731
+ /** Handle returned by Git operations that run asynchronously as a DSS future. */
732
+ export const ProjectGitFutureResponseSchema = Type.Object({
733
+ jobId: Type.String(),
734
+ }, { additionalProperties: true, });
735
+ export const ProjectGitFutureStateSchema = Type.Object({
736
+ jobId: Type.Optional(Type.String()),
737
+ hasResult: Type.Optional(Type.Boolean()),
738
+ result: Type.Optional(Type.Unknown()),
739
+ alive: Type.Optional(Type.Boolean()),
740
+ aborted: Type.Optional(Type.Boolean()),
741
+ abortable: Type.Optional(Type.Boolean()),
742
+ unknown: Type.Optional(Type.Boolean()),
743
+ startTime: Type.Optional(Type.Number()),
744
+ runningTime: Type.Optional(Type.Number()),
745
+ error: Type.Optional(Type.Unknown()),
746
+ }, { additionalProperties: true, });
747
+ // ---------------------------------------------------------------------------
645
748
  // Array wrappers (for runtime validation of list() responses)
646
749
  // ---------------------------------------------------------------------------
647
750
  export const ProjectSummaryArraySchema = Type.Array(ProjectSummarySchema);
package/plugin.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
+ "name": "dataiku-sdk",
4
+ "version": "1.0.0",
5
+ "description": "Dataiku DSS SDK and agent-oriented CLI for programmatic access to DSS REST APIs.",
6
+ "homepage": "https://github.com/clssck/dataiku-sdk",
7
+ "repository": "https://github.com/clssck/dataiku-sdk",
8
+ "license": "MIT",
9
+ "keywords": [
10
+ "dataiku",
11
+ "dss",
12
+ "cli",
13
+ "agent-skills"
14
+ ]
15
+ }