dataiku-sdk 3.4.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/bin/dss.js +28 -2
- package/dist/build-metadata.json +1 -1
- package/dist/src/cli/coerce.d.ts +0 -1
- package/dist/src/cli/coerce.js +0 -5
- package/dist/src/cli/command-syntax.json +14524 -0
- package/dist/src/cli/commands/analysis.js +6 -9
- package/dist/src/cli/commands/api-deployer.js +15 -33
- package/dist/src/cli/commands/api-service.js +17 -27
- package/dist/src/cli/commands/app.js +25 -41
- package/dist/src/cli/commands/bundle.js +15 -24
- package/dist/src/cli/commands/business-app.js +10 -17
- package/dist/src/cli/commands/code-env.js +23 -36
- package/dist/src/cli/commands/code.js +4 -4
- package/dist/src/cli/commands/connection.js +12 -22
- package/dist/src/cli/commands/continuous-activity.js +6 -9
- package/dist/src/cli/commands/dashboard.js +8 -13
- package/dist/src/cli/commands/data-collection.js +9 -16
- package/dist/src/cli/commands/data-quality.js +14 -26
- package/dist/src/cli/commands/dataset.js +29 -54
- package/dist/src/cli/commands/discussion.js +7 -10
- package/dist/src/cli/commands/doctor.js +3 -3
- package/dist/src/cli/commands/flow-zone.js +8 -17
- package/dist/src/cli/commands/folder.js +12 -20
- package/dist/src/cli/commands/future.js +7 -10
- package/dist/src/cli/commands/group.js +7 -11
- package/dist/src/cli/commands/insight.js +7 -11
- package/dist/src/cli/commands/job.js +17 -26
- package/dist/src/cli/commands/knowledge-bank.js +5 -6
- package/dist/src/cli/commands/llm.js +5 -8
- package/dist/src/cli/commands/macro.js +9 -16
- package/dist/src/cli/commands/meaning.js +7 -11
- package/dist/src/cli/commands/metrics.js +7 -10
- package/dist/src/cli/commands/ml-task.js +12 -20
- package/dist/src/cli/commands/model-evaluation-store.js +7 -11
- package/dist/src/cli/commands/notebook.js +15 -27
- package/dist/src/cli/commands/plugin.js +35 -68
- package/dist/src/cli/commands/project-deployer.js +10 -22
- package/dist/src/cli/commands/project-folder.js +10 -17
- package/dist/src/cli/commands/project-git.js +38 -70
- package/dist/src/cli/commands/project-library.js +15 -23
- package/dist/src/cli/commands/project.js +9 -26
- package/dist/src/cli/commands/recipe.d.ts +16 -0
- package/dist/src/cli/commands/recipe.js +83 -94
- package/dist/src/cli/commands/saved-model.js +23 -39
- package/dist/src/cli/commands/scenario.js +20 -34
- package/dist/src/cli/commands/sql.js +4 -4
- package/dist/src/cli/commands/statistics.js +11 -18
- package/dist/src/cli/commands/streaming-endpoint.js +7 -11
- package/dist/src/cli/commands/user.js +11 -22
- package/dist/src/cli/commands/variable.js +3 -4
- package/dist/src/cli/commands/webapp.js +10 -16
- package/dist/src/cli/commands/wiki.js +9 -13
- package/dist/src/cli/commands/workspace.js +8 -14
- package/dist/src/cli/contract.d.ts +5 -15
- package/dist/src/cli/contract.js +157 -254
- package/dist/src/cli/doctor.js +1 -0
- package/dist/src/cli/env.d.ts +2 -0
- package/dist/src/cli/env.js +16 -1
- package/dist/src/cli/flags.d.ts +1 -0
- package/dist/src/cli/flags.js +4 -9
- package/dist/src/cli/helpers/app-permissions.js +7 -5
- package/dist/src/cli/helpers/flow-zone.js +8 -6
- package/dist/src/cli/helpers/recipe.js +2 -1
- package/dist/src/cli/syntax.d.ts +83 -0
- package/dist/src/cli/syntax.js +217 -0
- package/dist/src/cli/types.d.ts +3 -0
- package/dist/src/cli/usage.d.ts +1 -1
- package/dist/src/cli/usage.js +4 -2
- package/dist/src/cli/version.d.ts +0 -2
- package/dist/src/cli/version.js +6 -7
- package/dist/src/cli.js +132 -274
- package/dist/src/client.d.ts +2 -1
- package/dist/src/client.js +32 -17
- package/dist/src/errors.d.ts +12 -1
- package/dist/src/errors.js +28 -3
- package/dist/src/index.d.ts +1 -3
- package/dist/src/index.js +2 -2
- package/dist/src/resources/api-services.js +2 -3
- package/dist/src/resources/applications.js +2 -4
- package/dist/src/resources/base.d.ts +2 -0
- package/dist/src/resources/base.js +14 -2
- package/dist/src/resources/code-envs.js +3 -5
- package/dist/src/resources/data-quality.js +14 -13
- package/dist/src/resources/datasets.d.ts +13 -0
- package/dist/src/resources/datasets.js +5 -4
- package/dist/src/resources/flow-zones.js +4 -2
- package/dist/src/resources/folders.js +4 -2
- package/dist/src/resources/futures.js +1 -3
- package/dist/src/resources/insights.js +3 -2
- package/dist/src/resources/jobs.js +4 -6
- package/dist/src/resources/macros.d.ts +1 -1
- package/dist/src/resources/macros.js +3 -7
- package/dist/src/resources/notebooks.js +2 -3
- package/dist/src/resources/project-git.js +9 -11
- package/dist/src/resources/project-library.d.ts +0 -2
- package/dist/src/resources/project-library.js +2 -7
- package/dist/src/resources/projects.js +4 -3
- package/dist/src/resources/recipes.d.ts +28 -0
- package/dist/src/resources/recipes.js +117 -89
- package/dist/src/resources/saved-models.js +1 -13
- package/dist/src/resources/scenarios.js +1 -3
- package/dist/src/resources/sql.js +9 -8
- package/dist/src/resources/statistics.js +3 -4
- package/dist/src/resources/variables.js +2 -1
- package/dist/src/resources/webapps.js +2 -3
- package/dist/src/schemas.d.ts +1 -2
- package/dist/src/schemas.js +1 -1
- package/dist/src/skill.js +6 -7
- package/dist/src/utils/cleanup-ledger.js +9 -8
- package/dist/src/utils/deep-merge.js +2 -4
- package/dist/src/utils/flow-map.js +1 -6
- package/dist/src/utils/polling.d.ts +3 -0
- package/dist/src/utils/polling.js +3 -0
- package/dist/src/utils/project-archive.js +10 -14
- package/dist/src/utils/project-incarnation.js +3 -7
- package/dist/src/utils/records.d.ts +4 -0
- package/dist/src/utils/records.js +8 -0
- package/dist/src/utils/stable-hash.d.ts +3 -1
- package/dist/src/utils/stable-hash.js +2 -0
- package/package.json +10 -14
- package/plugin.json +1 -1
- package/skills/dataiku-dss/SKILL.md +3 -4
- package/skills/dataiku-dss/references/authentication.md +3 -3
- package/skills/dataiku-dss/references/coding.md +1 -1
- package/skills/dataiku-dss/references/discovery.md +1 -1
- package/skills/dataiku-dss/references/mutations.md +0 -1
- package/dist/src/utils/pagination.d.ts +0 -8
- package/dist/src/utils/pagination.js +0 -23
- package/packages/types/dist/index.d.ts +0 -1062
- package/packages/types/dist/index.js +0 -871
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The SDK and CLI include scenario run management; project, recipe, and dataset me
|
|
|
8
8
|
|
|
9
9
|
The [DSS 15 coverage matrix](docs/API-COVERAGE-DSS-15.md) maps documented operations to SDK methods and CLI actions, records documentation discrepancies, and identifies remaining gaps. A [machine-readable matrix](docs/API-COVERAGE-DSS-15.json) is also available. Coverage is not full DSS parity or live compatibility certification: availability depends on DSS version, permissions, licensing, and installed capabilities. One known documentation discrepancy: `plugin git-branches` is served by GET on DSS 15 (the same route rejects POST with 405 `rawMethodPOSTnotsupported`, contrary to the public docs).
|
|
10
10
|
|
|
11
|
-
Metadata setters replace the complete metadata object: fetch it, edit it, then submit the replacement. Metadata previews expose that replacement under `next`.
|
|
11
|
+
Metadata setters replace the complete metadata object: fetch it, edit it, then submit the replacement. Metadata previews expose that replacement under `next`. Mutation previews differ: `--plan` builds the request shape offline and makes no DSS requests, with sensitive payloads possibly represented by redacted summaries rather than literal request bodies, while `--dry-run` may read live DSS state per command (`recipe run` resolves its outputs). LLM completions and embeddings are cost-bearing operations, and macros execute plugin code. Review their contracts before execution.
|
|
12
12
|
|
|
13
13
|
ML training and macro waits bound status requests by the remaining wait deadline, including response bodies and retries. The client `requestTimeoutMs` still caps each request: an overall wait budget can shorten that cap, never extend it. An individual request timeout propagates as an error until the overall wait budget expires. Future and Project Git waits use adaptive polling by default; explicit polling intervals remain fixed. Early CLI usage errors load at most the selected resource definitions, not the full command runtime.
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ Malformed user/group listings and scenario run histories fail explicitly instead
|
|
|
16
16
|
|
|
17
17
|
## Platform support
|
|
18
18
|
|
|
19
|
-
The published `dss` CLI requires Bun >= 1.4.0 and supports Linux, macOS, and Windows.
|
|
19
|
+
The published `dss` CLI requires Bun >= 1.4.0 and supports Linux, macOS, and Windows. CI runs the minimum (Bun 1.4.0) and the latest release (1.4.2) on all three operating systems. The runtime dependency is pure JavaScript, so the same package also runs on every Bun-supported x64 and ARM64 system.
|
|
20
20
|
|
|
21
21
|
Run directly with Bun:
|
|
22
22
|
|
|
@@ -267,7 +267,7 @@ DSS_TOKENIZER_MODULE=/absolute/path/to/oh-my-pi/packages/natives/native/index.js
|
|
|
267
267
|
|
|
268
268
|
When configured, the native module also accelerates ordinary OpenAI token measurements after parity checks against the pinned JavaScript model. The JS fingerprint and independent cross-model reference checks remain authoritative; reserved special-token validation is preserved. Without this variable, measurements use JavaScript and only the native cross-model case is skipped. A configured missing/incompatible module fails instead of silently falling back. The cross-model gate permits 10% growth over recorded text baselines. Claude counts use ctok reconstructions, not an official tokenizer; counts exclude provider framing. No native dependency is added to the CLI.
|
|
269
269
|
|
|
270
|
-
For a known resource, `dss agent contract --fields commands.actions.dataset` lists action names
|
|
270
|
+
For a known resource, `dss agent contract --fields commands.actions.dataset` lists only its action names, far smaller than the global index; for known writes, fetch the full action entry directly once rather than compact discovery followed by the full entry. `bun run test:tokens` pins the current figures. Use compact `usage,description,flags,examples` projections for reads when those fields suffice. This is selective disclosure, not lossless compression. Scoped discovery constructs only requested action entries and materializes schemas only when requested; action-name indexes avoid payload schemas, while full registry exports and recovery hints retain their existing content. Metadata-only paths defer SDK runtime/schema imports.
|
|
271
271
|
|
|
272
272
|
Boolean flags accept bare flags or explicit `=true`/`=false` values, including aliases. Invalid boolean values fail before dispatch. Direct, batch, and local commands share execution-mode resolution; `--plan --dry-run` returns a plan with `plannedAndDryRun:true` when both modes are supported. Unreadable JSON/text payload files produce `validation_failed` usage errors (exit 1) with the flag, path, and filesystem cause.
|
|
273
273
|
|
|
@@ -282,7 +282,7 @@ Eligible transient retries honor `Retry-After` delta-seconds and HTTP dates, wai
|
|
|
282
282
|
Use environment variables for ephemeral runs. For disposable agent tests, set `DSS_CONFIG_DIR` to a temporary directory so saved credentials never touch your real profile.
|
|
283
283
|
Credential precedence is flags first, then `DATAIKU_*` environment variables, then saved credentials in `DSS_CONFIG_DIR` or the platform config directory.
|
|
284
284
|
Set `DATAIKU_DISABLE_ENV=1` when a test must ignore both `.env` files and `DATAIKU_*` environment variables.
|
|
285
|
-
When `.env` loading is enabled, the CLI reads `.env` from the CLI build/root directory and from the command's current working directory; put test-specific `.env` files in the directory where you invoke `dss`.
|
|
285
|
+
When `.env` loading is enabled, the CLI reads `.env` from the CLI build/root directory and from the command's current working directory; put test-specific `.env` files in the directory where you invoke `dss`. Only `DATAIKU_*`, `NODE_TLS_REJECT_UNAUTHORIZED`, and `NODE_EXTRA_CA_CERTS` are read from `.env`; other keys are ignored.
|
|
286
286
|
|
|
287
287
|
POSIX shell:
|
|
288
288
|
|
package/bin/dss.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// disabled; `bunx --bun` enters Bun's Node-compatibility mode, which disables
|
|
5
5
|
// that loading before this module runs.
|
|
6
6
|
import { spawnSync, } from "node:child_process";
|
|
7
|
+
import { readFileSync, } from "node:fs";
|
|
7
8
|
import * as path from "node:path";
|
|
8
9
|
import { fileURLToPath, pathToFileURL, } from "node:url";
|
|
9
10
|
|
|
@@ -19,6 +20,10 @@ const bunNodeCompatibilityMode = runningUnderBun
|
|
|
19
20
|
);
|
|
20
21
|
const envFileAutoloadDisabled = process.execArgv.includes("--no-env-file",)
|
|
21
22
|
|| bunNodeCompatibilityMode;
|
|
23
|
+
// The one source of the minimum is package.json engines.bun (">=X.Y.Z").
|
|
24
|
+
const MINIMUM_BUN = JSON.parse(
|
|
25
|
+
readFileSync(fileURLToPath(new URL("../package.json", import.meta.url,),), "utf-8",),
|
|
26
|
+
).engines.bun.replace(/^>=/, "",);
|
|
22
27
|
|
|
23
28
|
if (!runningUnderBun) {
|
|
24
29
|
const result = spawnSync(
|
|
@@ -35,7 +40,7 @@ if (!runningUnderBun) {
|
|
|
35
40
|
code: "internal_error",
|
|
36
41
|
category: "internal",
|
|
37
42
|
exitCode: 2,
|
|
38
|
-
hint:
|
|
43
|
+
hint: `Install Bun >= ${MINIMUM_BUN} and ensure \`bun\` is on PATH.`,
|
|
39
44
|
},)
|
|
40
45
|
}\n`,);
|
|
41
46
|
process.exitCode = 2;
|
|
@@ -44,6 +49,19 @@ if (!runningUnderBun) {
|
|
|
44
49
|
} else {
|
|
45
50
|
process.exitCode = result.status ?? 1;
|
|
46
51
|
}
|
|
52
|
+
} else if (!Bun.semver.satisfies(Bun.version, `>=${MINIMUM_BUN}`,)) {
|
|
53
|
+
process.stdout.write(`${
|
|
54
|
+
JSON.stringify({
|
|
55
|
+
type: "error",
|
|
56
|
+
ok: false,
|
|
57
|
+
error: `Bun ${Bun.version} is older than the required ${MINIMUM_BUN}.`,
|
|
58
|
+
code: "internal_error",
|
|
59
|
+
category: "internal",
|
|
60
|
+
exitCode: 2,
|
|
61
|
+
hint: `Upgrade Bun to >= ${MINIMUM_BUN} (bun upgrade).`,
|
|
62
|
+
},)
|
|
63
|
+
}\n`,);
|
|
64
|
+
process.exitCode = 2;
|
|
47
65
|
} else if (!envFileAutoloadDisabled) {
|
|
48
66
|
process.stdout.write(`${
|
|
49
67
|
JSON.stringify({
|
|
@@ -61,7 +79,11 @@ if (!runningUnderBun) {
|
|
|
61
79
|
const here = import.meta.dir;
|
|
62
80
|
const distCliPath = path.resolve(here, "../dist/src/cli.js",);
|
|
63
81
|
const sourceCliPath = path.resolve(here, "../src/cli.ts",);
|
|
64
|
-
|
|
82
|
+
// A source checkout always runs its source, like bin/dss; a leftover dist/
|
|
83
|
+
// would otherwise silently shadow every edit. The published package ships
|
|
84
|
+
// no src/, so installs run dist.
|
|
85
|
+
const usesDistCli = !(await Bun.file(sourceCliPath,).exists())
|
|
86
|
+
&& await Bun.file(distCliPath,).exists();
|
|
65
87
|
const cliPath = usesDistCli ? distCliPath : sourceCliPath;
|
|
66
88
|
|
|
67
89
|
// Published dist carries dist/build-metadata.json with the revision it was
|
|
@@ -80,6 +102,10 @@ if (!runningUnderBun) {
|
|
|
80
102
|
} catch {
|
|
81
103
|
// Dist without build metadata: provenance still reports dist source.
|
|
82
104
|
}
|
|
105
|
+
} else {
|
|
106
|
+
// Provenance is the launcher's to assert; never trust inherited values.
|
|
107
|
+
delete process.env.DSS_LOAD_SOURCE;
|
|
108
|
+
delete process.env.DSS_BUILD_REVISION;
|
|
83
109
|
}
|
|
84
110
|
|
|
85
111
|
// Same process, same argv: the CLI sees process.argv.slice(2) exactly as before.
|
package/dist/build-metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":1,"buildRevision":"
|
|
1
|
+
{"format":1,"buildRevision":"7a89c248d112072b3699f7f9d2774edca72ee0a9"}
|
package/dist/src/cli/coerce.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export declare function normalizeLineEndings(value: string): string;
|
|
|
10
10
|
export declare function splitCsvFlag(v: string | boolean | undefined): string[];
|
|
11
11
|
export declare function recipeInputDatasetsFromFlags(flags: Record<string, string | boolean>): string[] | undefined;
|
|
12
12
|
export declare function rewritePairsFromFlags(flags: Record<string, string | boolean>, flagName: string): Record<string, string>;
|
|
13
|
-
export declare function plainRecord(value: unknown): Record<string, unknown> | undefined;
|
|
14
13
|
export declare function requiredStringFlag(flags: Record<string, string | boolean>, name: string, usage: string): string;
|
|
15
14
|
export declare function optionalStringField(record: Record<string, unknown>, keys: string[]): string | undefined;
|
|
16
15
|
export declare function requiredStringArray(value: unknown, source: string): string[];
|
package/dist/src/cli/coerce.js
CHANGED
|
@@ -85,11 +85,6 @@ export function rewritePairsFromFlags(flags, flagName) {
|
|
|
85
85
|
}
|
|
86
86
|
return rewrites;
|
|
87
87
|
}
|
|
88
|
-
export function plainRecord(value) {
|
|
89
|
-
return value && typeof value === "object" && !Array.isArray(value)
|
|
90
|
-
? value
|
|
91
|
-
: undefined;
|
|
92
|
-
}
|
|
93
88
|
export function requiredStringFlag(flags, name, usage) {
|
|
94
89
|
const value = flags[name];
|
|
95
90
|
if (typeof value !== "string" || value.trim().length === 0) {
|