dataiku-sdk 0.12.7 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +93 -15
  2. package/bin/dss.js +21 -2
  3. package/dist/build-metadata.json +1 -0
  4. package/dist/packages/types/src/index.d.ts +128 -3
  5. package/dist/packages/types/src/index.js +106 -3
  6. package/dist/src/cli/coerce.d.ts +2 -1
  7. package/dist/src/cli/coerce.js +84 -26
  8. package/dist/src/cli/commands/app.js +6 -6
  9. package/dist/src/cli/commands/code.js +2 -2
  10. package/dist/src/cli/commands/data-quality.js +50 -8
  11. package/dist/src/cli/commands/dataset.d.ts +23 -0
  12. package/dist/src/cli/commands/dataset.js +197 -12
  13. package/dist/src/cli/commands/folder.js +5 -4
  14. package/dist/src/cli/commands/future.js +2 -2
  15. package/dist/src/cli/commands/index.js +2 -0
  16. package/dist/src/cli/commands/job.js +26 -13
  17. package/dist/src/cli/commands/notebook.js +1 -1
  18. package/dist/src/cli/commands/project-git.d.ts +2 -0
  19. package/dist/src/cli/commands/project-git.js +563 -0
  20. package/dist/src/cli/commands/project.js +118 -14
  21. package/dist/src/cli/commands/recipe.js +14 -17
  22. package/dist/src/cli/commands/scenario.js +4 -4
  23. package/dist/src/cli/contract.d.ts +6 -4
  24. package/dist/src/cli/contract.js +595 -68
  25. package/dist/src/cli/doctor.d.ts +12 -2
  26. package/dist/src/cli/doctor.js +50 -19
  27. package/dist/src/cli/flags.js +23 -2
  28. package/dist/src/cli/helpers/cleanup.js +30 -1
  29. package/dist/src/cli/helpers/dataset.js +1 -1
  30. package/dist/src/cli/output.d.ts +5 -2
  31. package/dist/src/cli/output.js +13 -12
  32. package/dist/src/cli/types.d.ts +2 -0
  33. package/dist/src/cli/usage.d.ts +1 -1
  34. package/dist/src/cli/usage.js +2 -1
  35. package/dist/src/cli/version.d.ts +48 -6
  36. package/dist/src/cli/version.js +177 -11
  37. package/dist/src/cli.js +94 -39
  38. package/dist/src/client.d.ts +31 -1
  39. package/dist/src/client.js +39 -7
  40. package/dist/src/errors.d.ts +1 -1
  41. package/dist/src/index.d.ts +6 -4
  42. package/dist/src/index.js +3 -1
  43. package/dist/src/resources/connections.d.ts +3 -1
  44. package/dist/src/resources/connections.js +82 -21
  45. package/dist/src/resources/datasets.d.ts +43 -0
  46. package/dist/src/resources/datasets.js +241 -30
  47. package/dist/src/resources/folders.js +7 -3
  48. package/dist/src/resources/project-git.d.ts +154 -0
  49. package/dist/src/resources/project-git.js +427 -0
  50. package/dist/src/resources/projects.d.ts +36 -3
  51. package/dist/src/resources/projects.js +127 -16
  52. package/dist/src/resources/recipes.js +4 -4
  53. package/dist/src/schemas.d.ts +2 -2
  54. package/dist/src/schemas.js +1 -1
  55. package/dist/src/utils/project-archive.d.ts +32 -0
  56. package/dist/src/utils/project-archive.js +624 -0
  57. package/package.json +6 -5
  58. package/packages/types/dist/index.d.ts +128 -3
  59. package/packages/types/dist/index.js +106 -3
  60. package/plugin.json +1 -1
  61. package/skills/dataiku-dss/SKILL.md +26 -19
@@ -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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "dataiku-sdk",
4
- "version": "0.12.7",
4
+ "version": "1.1.0",
5
5
  "description": "Dataiku DSS SDK and agent-oriented CLI for programmatic access to DSS REST APIs.",
6
6
  "homepage": "https://github.com/clssck/dataiku-sdk",
7
7
  "repository": "https://github.com/clssck/dataiku-sdk",
@@ -4,7 +4,7 @@ description: >-
4
4
  Agent-only JSON CLI for Dataiku DSS. Use to inspect or mutate DSS projects,
5
5
  datasets, recipes, jobs, scenarios, folders, notebooks, SQL, variables,
6
6
  code envs, and connections. Discover scoped command metadata with
7
- dss commands run --fields RESOURCE.ACTION --json.
7
+ dss commands run --fields RESOURCE.ACTION.
8
8
  license: MIT
9
9
  compatibility: >-
10
10
  Requires the dss CLI, network access to a Dataiku DSS instance, and configured
@@ -19,30 +19,32 @@ If the installed `dss` binary is unavailable but the repository checkout is the
19
19
 
20
20
  ## Contract
21
21
 
22
- - Command results write exactly one JSON value to stdout, including `doctor`, `batch`, and `cleanup` failure reports; use the exit code and result fields.
23
- - Dispatch/runtime failures write one JSONL error event to stderr with `type:"error"`, `ok:false`, `error`, `code`, and `exitCode`, while stdout stays empty.
24
- - Non-fatal warnings and `--verbose` HTTP traces are JSONL stderr events (`type:"warning"` / `type:"trace"`), never prose.
22
+ - Command results write exactly one compact JSON value to stdout; void success is `{ok:true}`. `doctor`, `batch`, and `cleanup` failure reports are their direct result objects on stdout with a nonzero exit code — use the exit code and result fields.
23
+ - Dispatch/runtime failures write one compact structured error object on stdout (`type:"error"`, `ok:false`, `error`, `code`, `category`, `exitCode`) with a nonzero exit code; stderr carries JSONL diagnostics only.
24
+ - Non-fatal warnings and `--verbose` HTTP traces are JSONL stderr events (`type:"warning"` / `type:"trace"`), flushed before both success and failure output, never prose.
25
25
  - No prompts, help screens, tables, banners, or prose output are part of the contract.
26
26
  - 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.
27
- - 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.
28
- - `--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.
27
+ - Every result is compact single-line JSON on stdout; output formatting is not configurable.
28
+ - Recipe payload commands write the payload as a JSON string on stdout; with `--output PATH` the exact bytes go to a file and stdout carries the JSON string equal to `PATH`.
29
29
  - `--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.
30
30
 
31
31
  ## Discover commands
32
32
 
33
33
  ```text
34
- dss agent contract --fields protocol,agentContractVersion,cli,stdio,planning,compatibility --json
35
- dss commands run --fields dataset.create --json
36
- dss commands run --fields dataset.create.usage,dataset.create.description,dataset.create.flags,dataset.create.examples --json
37
- dss commands run --fields dataset --json
38
- dss agent contract --fields commands.actions --json
34
+ dss commands run
35
+ dss commands run --fields dataset
36
+ dss commands run --fields dataset.create
37
+ dss commands run --fields dataset.create.usage,dataset.create.description,dataset.create.flags,dataset.create.examples
38
+ dss commands run --output commands.json
39
+ dss agent contract --fields protocol,agentContractVersion,cli,stdio,planning,compatibility
40
+ dss agent contract --fields commands.actions
39
41
  ```
40
42
 
41
- 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.
43
+ `dss commands run` prints the compact resource/action summary — every resource keyed to its action names, about 1k tokens — and never dumps registry entries to stdout. Bootstrap with the scoped `agent contract` call above: `protocol,agentContractVersion,cli,stdio,planning,compatibility` cover protocol/schema compatibility, stdout/stderr stream semantics, preferred discovery commands, 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.
42
44
 
43
- 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.
45
+ Before choosing command syntax, look the action up in the command registry: `--fields RESOURCE.ACTION` returns one complete entry, `--fields RESOURCE` returns every action of one resource, 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.
44
46
 
45
- `--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.
47
+ `--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": {...}}`); an empty `--fields` is a usage error, never a silent full dump. The full registry (~220k tokens) is exported only via `--output PATH`: `dss commands run --output PATH` writes the registry, or the selected `--fields` subset, as compact JSON to `PATH`, and stdout carries the compact `{"path":"PATH"}` result — never the registry itself. An unknown resource or action exits with code 1 and a compact JSON error object on stdout containing the valid options.
46
48
  Credential lookup order is flags first, then `DATAIKU_*` environment variables, then saved credentials.
47
49
  Set `DATAIKU_DISABLE_ENV=1` when a test must ignore both `.env` files and `DATAIKU_*` environment variables.
48
50
  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`.
@@ -55,7 +57,7 @@ For disposable agent tests, set `DSS_CONFIG_DIR` to a temporary directory so sav
55
57
  - 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.
56
58
  - 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.
57
59
  - 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.
58
- - Before live mutation tests, use `dss fixtures --json` to discover compatible test resources instead of guessing project objects.
60
+ - Before live mutation tests, use `dss fixtures` to discover compatible test resources instead of guessing project objects.
59
61
 
60
62
  ## Authentication
61
63
 
@@ -102,7 +104,7 @@ TLS flags: `--insecure` disables certificate verification; `--ca-cert PATH` adds
102
104
  dss version
103
105
  dss project list
104
106
  dss dataset list --project-key MYPROJ
105
- dss recipe get-payload compute_orders --raw --output code.py --project-key MYPROJ
107
+ dss recipe get-payload compute_orders --output code.py --project-key MYPROJ
106
108
  dss recipe diff compute_orders --file code.py --project-key MYPROJ
107
109
  dss recipe set-payload compute_orders --file code.py --project-key MYPROJ
108
110
  dss job build-and-wait orders --include-logs --project-key MYPROJ
@@ -169,9 +171,14 @@ narrow and detect key-reuse races but cannot serialize the final check with the
169
171
  contain access-control identities; keep them mode `0600` and commit them only when repository
170
172
  policy permits.
171
173
 
174
+ ## Project Git
175
+
176
+ UAT=`create-branch --duplicate-project`; pull=rebase; checkout=switch. Remotes: DSS Git rules and
177
+ SSH/server credentials. `--password-env`; `future-wait`.
178
+
172
179
  ## Confirming mutations
173
180
 
174
- 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.
181
+ 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 stdout and exit non-zero. The exit code is the source of truth.
175
182
 
176
183
  - 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.
177
184
  - 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.
@@ -193,7 +200,7 @@ Mutations print a small JSON ack to stdout and exit 0 on success (e.g. `{"update
193
200
 
194
201
  ## Error envelope
195
202
 
196
- For dispatch/runtime failures, parse stderr as JSONL; the final line is an error event:
203
+ For dispatch/runtime failures, stdout carries one compact error object:
197
204
 
198
205
  ```json
199
206
  {
@@ -208,6 +215,6 @@ For dispatch/runtime failures, parse stderr as JSONL; the final line is an error
208
215
  }
209
216
  ```
210
217
 
211
- `doctor`, `batch`, and `cleanup` report command-level failures on stdout and leave stderr empty. Use the exit code before choosing a stream.
218
+ `doctor`, `batch`, and `cleanup` report command-level failures as their direct result object on stdout with a nonzero exit code; key off the exit code before interpreting the result.
212
219
  Use `code`, `category`, `exitCode`, `retryable`, `status`, and `details` for recovery logic. Do not scrape message text when a structured field is available.
213
220
  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.