@kindgi/client 0.1.3 → 0.1.4-rc.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/dist/index.js CHANGED
@@ -105,6 +105,8 @@ function fromWire(body) {
105
105
  case "provider-already-registered":
106
106
  case "proposal-invalid-state-transition":
107
107
  case "approval-not-decided":
108
+ case "slug-conflict":
109
+ case "project-default-already-exists":
108
110
  return { code: "conflict", message, reason: code };
109
111
  case "invalid-request":
110
112
  case "validation-failed":
@@ -459,6 +461,16 @@ function makeAgentsClient(transport) {
459
461
  idempotencyKey: options.idempotencyKey
460
462
  }
461
463
  });
464
+ },
465
+ async derive(agentId, input, options) {
466
+ return transport.request({
467
+ method: "POST",
468
+ path: `/v1/agents/${seg(agentId)}/versions`,
469
+ body: input,
470
+ ...options?.idempotencyKey !== void 0 && {
471
+ idempotencyKey: options.idempotencyKey
472
+ }
473
+ });
462
474
  }
463
475
  },
464
476
  async reinstateVersion(agentId, version, options) {
@@ -824,6 +836,72 @@ function makeAuthClient(transport) {
824
836
  };
825
837
  }
826
838
 
839
+ // src/resources/blocks.ts
840
+ function makeBlocksClient(transport) {
841
+ const seg = (s) => encodeURIComponent(s);
842
+ return {
843
+ async publish(input, options) {
844
+ return transport.request({
845
+ method: "POST",
846
+ path: "/v1/blocks",
847
+ body: { ...input, projectId: options.projectId },
848
+ ...options.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
849
+ });
850
+ },
851
+ async list(filter) {
852
+ return transport.request({
853
+ method: "GET",
854
+ path: "/v1/blocks",
855
+ query: {
856
+ ...filter?.limit !== void 0 && { limit: filter.limit },
857
+ ...filter?.cursor !== void 0 && { cursor: filter.cursor },
858
+ ...filter?.kind !== void 0 && { kind: filter.kind },
859
+ ...filter?.name !== void 0 && { name: filter.name },
860
+ ...filter?.scope !== void 0 && scopeToQuery(filter.scope)
861
+ }
862
+ });
863
+ },
864
+ async get(blockId) {
865
+ return transport.request({ method: "GET", path: `/v1/blocks/${seg(blockId)}` });
866
+ },
867
+ versions: {
868
+ async list(blockId, filter) {
869
+ return transport.request({
870
+ method: "GET",
871
+ path: `/v1/blocks/${seg(blockId)}/versions`,
872
+ query: {
873
+ ...filter?.limit !== void 0 && { limit: filter.limit },
874
+ ...filter?.cursor !== void 0 && { cursor: filter.cursor },
875
+ ...filter?.includeTombstoned !== void 0 && {
876
+ includeTombstoned: filter.includeTombstoned
877
+ }
878
+ }
879
+ });
880
+ },
881
+ async get(blockId, version) {
882
+ return transport.request({
883
+ method: "GET",
884
+ path: `/v1/blocks/${seg(blockId)}/versions/${seg(version)}`
885
+ });
886
+ },
887
+ async unregister(blockId, version, options) {
888
+ return transport.request({
889
+ method: "POST",
890
+ path: `/v1/blocks/${seg(blockId)}/versions/${seg(version)}/unregister`,
891
+ ...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
892
+ });
893
+ },
894
+ async reinstate(blockId, version, options) {
895
+ return transport.request({
896
+ method: "POST",
897
+ path: `/v1/blocks/${seg(blockId)}/versions/${seg(version)}/reinstate`,
898
+ ...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
899
+ });
900
+ }
901
+ }
902
+ };
903
+ }
904
+
827
905
  // src/resources/capabilities.ts
828
906
  function makeCapabilitiesClient(transport) {
829
907
  return {
@@ -1376,6 +1454,24 @@ function makeEvalSuitesClient(transport) {
1376
1454
  path: `/v1/eval-suites/${seg(suiteId)}`
1377
1455
  });
1378
1456
  },
1457
+ async buildFromJudgments(suiteId, input, options) {
1458
+ return transport.request({
1459
+ method: "POST",
1460
+ path: `/v1/eval-suites/${seg(suiteId)}/versions/from-judgments`,
1461
+ body: input,
1462
+ ...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
1463
+ });
1464
+ },
1465
+ async listCases(suiteId, version, query) {
1466
+ return transport.request({
1467
+ method: "GET",
1468
+ path: `/v1/eval-suites/${seg(suiteId)}/versions/${seg(version)}/cases`,
1469
+ query: {
1470
+ ...query?.limit !== void 0 && { limit: query.limit },
1471
+ ...query?.cursor !== void 0 && { cursor: query.cursor }
1472
+ }
1473
+ });
1474
+ },
1379
1475
  versions: {
1380
1476
  async list(suiteId, filter) {
1381
1477
  return transport.request({
@@ -1759,6 +1855,115 @@ function makeIdentityClient(transport) {
1759
1855
  };
1760
1856
  }
1761
1857
 
1858
+ // src/resources/judge-classes.ts
1859
+ function scopeQuery(scope) {
1860
+ if (scope.kind === "tenant") return { scopeKind: "tenant" };
1861
+ if (scope.kind === "project") return { scopeKind: "project", projectId: scope.projectId };
1862
+ return { scopeKind: "agent", projectId: scope.projectId, agentId: scope.agentId };
1863
+ }
1864
+ function makeJudgeClassesClient(transport) {
1865
+ const withKey = (options) => options?.idempotencyKey !== void 0 ? { idempotencyKey: options.idempotencyKey } : {};
1866
+ return {
1867
+ async create(input, options) {
1868
+ return transport.request({
1869
+ method: "POST",
1870
+ path: "/v1/judge-classes",
1871
+ body: input,
1872
+ ...withKey(options)
1873
+ });
1874
+ },
1875
+ async list(filter) {
1876
+ const page = await transport.request({
1877
+ method: "GET",
1878
+ path: "/v1/judge-classes",
1879
+ query: {
1880
+ ...filter?.limit !== void 0 && { limit: filter.limit },
1881
+ ...filter?.cursor !== void 0 && { cursor: filter.cursor },
1882
+ ...filter?.scope !== void 0 && scopeQuery(filter.scope)
1883
+ }
1884
+ });
1885
+ return {
1886
+ items: page.data,
1887
+ ...page.nextCursor !== void 0 && { nextCursor: page.nextCursor }
1888
+ };
1889
+ },
1890
+ async get(judgeClassId) {
1891
+ return transport.request({
1892
+ method: "GET",
1893
+ path: `/v1/judge-classes/${encodeURIComponent(judgeClassId)}`
1894
+ });
1895
+ },
1896
+ async update(judgeClassId, input, options) {
1897
+ return transport.request({
1898
+ method: "PATCH",
1899
+ path: `/v1/judge-classes/${encodeURIComponent(judgeClassId)}`,
1900
+ body: input,
1901
+ ...withKey(options)
1902
+ });
1903
+ },
1904
+ async unregister(judgeClassId, options) {
1905
+ await transport.request({
1906
+ method: "POST",
1907
+ path: `/v1/judge-classes/${encodeURIComponent(judgeClassId)}/unregister`,
1908
+ body: {},
1909
+ discardResponse: true,
1910
+ ...withKey(options)
1911
+ });
1912
+ }
1913
+ };
1914
+ }
1915
+
1916
+ // src/resources/judgments.ts
1917
+ function makeJudgmentsClient(transport) {
1918
+ return {
1919
+ async create(input, options) {
1920
+ return transport.request({
1921
+ method: "POST",
1922
+ path: "/v1/judgments",
1923
+ body: input,
1924
+ ...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
1925
+ });
1926
+ },
1927
+ async list(filter) {
1928
+ const page = await transport.request({
1929
+ method: "GET",
1930
+ path: "/v1/judgments",
1931
+ query: {
1932
+ ...filter?.limit !== void 0 && { limit: filter.limit },
1933
+ ...filter?.cursor !== void 0 && { cursor: filter.cursor },
1934
+ ...filter?.runId !== void 0 && { runId: filter.runId },
1935
+ ...filter?.agentId !== void 0 && { agentId: filter.agentId },
1936
+ ...filter?.agentVersion !== void 0 && { agentVersion: filter.agentVersion },
1937
+ ...filter?.flowId !== void 0 && { flowId: filter.flowId },
1938
+ ...filter?.verdict !== void 0 && { verdict: filter.verdict },
1939
+ ...filter?.judgeClassId !== void 0 && { judgeClassId: filter.judgeClassId },
1940
+ ...filter?.participantId !== void 0 && { participantId: filter.participantId },
1941
+ ...filter?.scope !== void 0 && scopeToQuery(filter.scope)
1942
+ }
1943
+ });
1944
+ return {
1945
+ items: page.data,
1946
+ ...page.nextCursor !== void 0 && { nextCursor: page.nextCursor }
1947
+ };
1948
+ },
1949
+ async get(judgmentId) {
1950
+ return transport.request({
1951
+ method: "GET",
1952
+ path: `/v1/judgments/${encodeURIComponent(judgmentId)}`
1953
+ });
1954
+ },
1955
+ async unregister(judgmentId, options) {
1956
+ await transport.request({
1957
+ method: "POST",
1958
+ path: `/v1/judgments/${encodeURIComponent(judgmentId)}/unregister`,
1959
+ body: {},
1960
+ discardResponse: true,
1961
+ ...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
1962
+ });
1963
+ }
1964
+ };
1965
+ }
1966
+
1762
1967
  // src/resources/mcp.ts
1763
1968
  function makeMcpClient(transport) {
1764
1969
  return {
@@ -2597,6 +2802,8 @@ function makeRunsClient(transport) {
2597
2802
  },
2598
2803
  ...filter?.topLevel !== void 0 && { topLevel: String(filter.topLevel) },
2599
2804
  ...filter?.agentId !== void 0 && { agentId: filter.agentId },
2805
+ ...filter?.replays !== void 0 && { replays: filter.replays },
2806
+ ...filter?.evalRunId !== void 0 && { evalRunId: filter.evalRunId },
2600
2807
  ...filter?.includeOutput === true && { include: "output" }
2601
2808
  }
2602
2809
  });
@@ -3790,7 +3997,10 @@ function createClient(options) {
3790
3997
  compliance: makeComplianceClient(transport),
3791
3998
  audit: makeAuditClient(transport),
3792
3999
  evalSuites: makeEvalSuitesClient(transport),
4000
+ blocks: makeBlocksClient(transport),
3793
4001
  evalRuns: makeEvalRunsClient(transport),
4002
+ judgments: makeJudgmentsClient(transport),
4003
+ judgeClasses: makeJudgeClassesClient(transport),
3794
4004
  users: makeUsersClient(transport),
3795
4005
  identity: makeIdentityClient(transport),
3796
4006
  auth: makeAuthClient(transport),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kindgi/client",
3
- "version": "0.1.3",
3
+ "version": "0.1.4-rc.0",
4
4
  "description": "TypeScript client SDK for Kindgi™ — the sovereign AI OS. Preview: wire-generated from openapi.json via typed-openapi, ergonomic hand-authored resource clients (Transport, KindgiApiError, SSE with Last-Event-Id resume).",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -45,12 +45,12 @@
45
45
  "zod": "^4.6.5"
46
46
  },
47
47
  "devDependencies": {
48
- "@kindgi/agents": "0.1.3",
49
- "@kindgi/api": "0.1.3",
50
- "@kindgi/flow": "0.1.3",
51
- "@kindgi/platform": "0.1.3",
52
- "@kindgi/runtime": "0.1.3",
53
- "@kindgi/types": "0.1.3",
48
+ "@kindgi/agents": "0.1.4-rc.0",
49
+ "@kindgi/api": "0.1.4-rc.0",
50
+ "@kindgi/flow": "0.1.4-rc.0",
51
+ "@kindgi/platform": "0.1.4-rc.0",
52
+ "@kindgi/runtime": "0.1.4-rc.0",
53
+ "@kindgi/types": "0.1.4-rc.0",
54
54
  "@types/node": "^22.10.5",
55
55
  "dts-bundle-generator": "^9.5.1",
56
56
  "tsup": "^8.5.1",