@deepraxis/sdk 0.1.1-dev.c7abab3 → 0.1.1-dev.c8a9a1c

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/METHODS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SDK methods
2
2
 
3
- Generated by `bun run generate`. 530 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
3
+ Generated by `bun run generate`. 633 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
4
4
 
5
5
  `always` returns an AsyncIterable; `optional` streams with `{ stream: true }`; `yes` pagination returns a Page. Only `{ data, next_cursor }` + `cursor` query contracts are automatically paginated.
6
6
 
@@ -103,6 +103,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
103
103
  | list | GET | `/agent/v1/computers/{computer_id}/files` | no | no |
104
104
  | retrieveContent | GET | `/agent/v1/computers/{computer_id}/files/content` | no | no |
105
105
 
106
+ ### agent.computers.files.convert
107
+
108
+ | Method | HTTP | Path | Streaming | Pagination |
109
+ |---|---|---|---|---|
110
+ | create | POST | `/agent/v1/computers/{computer_id}/files/convert` | no | no |
111
+
106
112
  ### agent.computers.leases
107
113
 
108
114
  | Method | HTTP | Path | Streaming | Pagination |
@@ -576,6 +582,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
576
582
  | stream | GET | `/browser/v1/sessions/{sessionId}/stream` | always | no |
577
583
  | update | POST | `/browser/v1/sessions/{sessionId}` | no | no |
578
584
 
585
+ ### browser.sessions.actions
586
+
587
+ | Method | HTTP | Path | Streaming | Pagination |
588
+ |---|---|---|---|---|
589
+ | create | POST | `/browser/v1/sessions/{sessionId}/actions` | no | no |
590
+
579
591
  ### browser.sessions.events
580
592
 
581
593
  | Method | HTTP | Path | Streaming | Pagination |
@@ -786,6 +798,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
786
798
  |---|---|---|---|---|
787
799
  | import | POST | `/cut/v1/projects/{project_id}/media:import` | no | no |
788
800
 
801
+ ### cut.projects.renders
802
+
803
+ | Method | HTTP | Path | Streaming | Pagination |
804
+ |---|---|---|---|---|
805
+ | create | POST | `/cut/v1/projects/{project_id}/renders` | no | no |
806
+
789
807
  ### cut.projects.versions
790
808
 
791
809
  | Method | HTTP | Path | Streaming | Pagination |
@@ -793,6 +811,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
793
811
  | create | POST | `/cut/v1/projects/{project_id}/versions` | no | no |
794
812
  | list | GET | `/cut/v1/projects/{project_id}/versions` | no | no |
795
813
 
814
+ ### cut.renders
815
+
816
+ | Method | HTTP | Path | Streaming | Pagination |
817
+ |---|---|---|---|---|
818
+ | retrieve | GET | `/cut/v1/renders/{render_id}` | no | no |
819
+
796
820
  ### cut.versions
797
821
 
798
822
  | Method | HTTP | Path | Streaming | Pagination |
@@ -852,6 +876,82 @@ Multipart request bodies expand plain objects into bracketed fields (for example
852
876
  | delete | DELETE | `/database/v1/databases/{database_id}/tables/{table}/fields/{field}` | no | no |
853
877
  | update | PATCH | `/database/v1/databases/{database_id}/tables/{table}/fields/{field}` | no | no |
854
878
 
879
+ ## devops
880
+
881
+ ### devops.projects
882
+
883
+ | Method | HTTP | Path | Streaming | Pagination |
884
+ |---|---|---|---|---|
885
+ | retrieveTestCatalog | GET | `/devops/v1/projects/{project}/test-catalog` | no | no |
886
+
887
+ ### devops.projects.testCases
888
+
889
+ | Method | HTTP | Path | Streaming | Pagination |
890
+ |---|---|---|---|---|
891
+ | list | GET | `/devops/v1/projects/{project}/test-cases` | no | no |
892
+
893
+ ### devops.projects.testPlans
894
+
895
+ | Method | HTTP | Path | Streaming | Pagination |
896
+ |---|---|---|---|---|
897
+ | create | POST | `/devops/v1/projects/{project}/test-plans` | no | no |
898
+ | list | GET | `/devops/v1/projects/{project}/test-plans` | no | no |
899
+
900
+ ### devops.projects.testReports
901
+
902
+ | Method | HTTP | Path | Streaming | Pagination |
903
+ |---|---|---|---|---|
904
+ | create | POST | `/devops/v1/projects/{project}/test-reports` | no | no |
905
+
906
+ ### devops.projects.testRuns
907
+
908
+ | Method | HTTP | Path | Streaming | Pagination |
909
+ |---|---|---|---|---|
910
+ | create | POST | `/devops/v1/projects/{project}/test-runs` | no | no |
911
+ | list | GET | `/devops/v1/projects/{project}/test-runs` | no | no |
912
+
913
+ ### devops.projects.testSuites
914
+
915
+ | Method | HTTP | Path | Streaming | Pagination |
916
+ |---|---|---|---|---|
917
+ | list | GET | `/devops/v1/projects/{project}/test-suites` | no | no |
918
+
919
+ ### devops.testCases
920
+
921
+ | Method | HTTP | Path | Streaming | Pagination |
922
+ |---|---|---|---|---|
923
+ | retrieve | GET | `/devops/v1/test-cases/{id}` | no | no |
924
+
925
+ ### devops.testPlans
926
+
927
+ | Method | HTTP | Path | Streaming | Pagination |
928
+ |---|---|---|---|---|
929
+ | delete | DELETE | `/devops/v1/test-plans/{id}` | no | no |
930
+ | pause | POST | `/devops/v1/test-plans/{id}:pause` | no | no |
931
+ | resume | POST | `/devops/v1/test-plans/{id}:resume` | no | no |
932
+ | retrieve | GET | `/devops/v1/test-plans/{id}` | no | no |
933
+ | update | PATCH | `/devops/v1/test-plans/{id}` | no | no |
934
+
935
+ ### devops.testRuns
936
+
937
+ | Method | HTTP | Path | Streaming | Pagination |
938
+ |---|---|---|---|---|
939
+ | cancel | POST | `/devops/v1/test-runs/{id}:cancel` | no | no |
940
+ | retrieve | GET | `/devops/v1/test-runs/{id}` | no | no |
941
+
942
+ ### devops.testRuns.executions
943
+
944
+ | Method | HTTP | Path | Streaming | Pagination |
945
+ |---|---|---|---|---|
946
+ | list | GET | `/devops/v1/test-runs/{run}/executions` | no | no |
947
+ | retrieve | GET | `/devops/v1/test-runs/{run}/executions/{case}` | no | no |
948
+
949
+ ### devops.testSuites
950
+
951
+ | Method | HTTP | Path | Streaming | Pagination |
952
+ |---|---|---|---|---|
953
+ | retrieve | GET | `/devops/v1/test-suites/{id}` | no | no |
954
+
855
955
  ## file
856
956
 
857
957
  ### file.files
@@ -884,6 +984,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
884
984
  | complete | POST | `/file/v1/uploads/{upload_id}/complete` | no | no |
885
985
  | create | POST | `/file/v1/uploads` | no | no |
886
986
  | createSigned | POST | `/file/v1/uploads/signed` | no | no |
987
+ | retrieve | GET | `/file/v1/uploads/{upload_id}` | no | no |
887
988
 
888
989
  ### file.uploads.parts
889
990
 
@@ -967,12 +1068,25 @@ Multipart request bodies expand plain objects into bracketed fields (for example
967
1068
 
968
1069
  ## media
969
1070
 
1071
+ ### media.assets
1072
+
1073
+ | Method | HTTP | Path | Streaming | Pagination |
1074
+ |---|---|---|---|---|
1075
+ | edit | POST | `/media/v1/libraries/{library_id}/assets/{asset_id}/edits` | no | no |
1076
+ | lineage | GET | `/media/v1/libraries/{library_id}/assets/{asset_id}/lineage` | no | no |
1077
+
970
1078
  ### media.generation.capabilities
971
1079
 
972
1080
  | Method | HTTP | Path | Streaming | Pagination |
973
1081
  |---|---|---|---|---|
974
1082
  | list | GET | `/media/v1/generation/capabilities` | no | no |
975
1083
 
1084
+ ### media.images
1085
+
1086
+ | Method | HTTP | Path | Streaming | Pagination |
1087
+ |---|---|---|---|---|
1088
+ | generate | POST | `/media/v1/libraries/{library_id}/images/generations` | no | no |
1089
+
976
1090
  ### media.libraries
977
1091
 
978
1092
  | Method | HTTP | Path | Streaming | Pagination |
@@ -982,6 +1096,8 @@ Multipart request bodies expand plain objects into bracketed fields (for example
982
1096
  | list | GET | `/media/v1/libraries` | no | yes |
983
1097
  | restore | POST | `/media/v1/libraries/{library_id}/restore` | no | no |
984
1098
  | retrieve | GET | `/media/v1/libraries/{library_id}` | no | no |
1099
+ | retrieveDefault | GET | `/media/v1/libraries/default` | no | no |
1100
+ | setDefault | PUT | `/media/v1/libraries/default` | no | no |
985
1101
  | update | PATCH | `/media/v1/libraries/{library_id}` | no | no |
986
1102
 
987
1103
  ### media.libraries.assets
@@ -1250,6 +1366,58 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1250
1366
  | retrieve | GET | `/model/v1/videos/{video_id}` | no | no |
1251
1367
  | retrieveContent | GET | `/model/v1/videos/{video_id}/content` | no | no |
1252
1368
 
1369
+ ## ontology
1370
+
1371
+ ### ontology.changesets
1372
+
1373
+ | Method | HTTP | Path | Streaming | Pagination |
1374
+ |---|---|---|---|---|
1375
+ | create | POST | `/ontology/v1/changesets` | no | no |
1376
+
1377
+ ### ontology.nodes
1378
+
1379
+ | Method | HTTP | Path | Streaming | Pagination |
1380
+ |---|---|---|---|---|
1381
+ | create | POST | `/ontology/v1/nodes` | no | no |
1382
+ | list | GET | `/ontology/v1/nodes` | no | yes |
1383
+ | retrieve | GET | `/ontology/v1/nodes/{node_id}` | no | no |
1384
+ | retrieveNeighborhood | GET | `/ontology/v1/nodes/{node_id}/neighborhood` | no | no |
1385
+ | update | PATCH | `/ontology/v1/nodes/{node_id}` | no | no |
1386
+
1387
+ ### ontology.nodes.merge
1388
+
1389
+ | Method | HTTP | Path | Streaming | Pagination |
1390
+ |---|---|---|---|---|
1391
+ | create | POST | `/ontology/v1/nodes/{node_id}/merge` | no | no |
1392
+
1393
+ ### ontology.relations
1394
+
1395
+ | Method | HTTP | Path | Streaming | Pagination |
1396
+ |---|---|---|---|---|
1397
+ | create | POST | `/ontology/v1/relations` | no | no |
1398
+ | list | GET | `/ontology/v1/relations` | no | yes |
1399
+ | retrieve | GET | `/ontology/v1/relations/{relation_id}` | no | no |
1400
+
1401
+ ### ontology.relations.invalidate
1402
+
1403
+ | Method | HTTP | Path | Streaming | Pagination |
1404
+ |---|---|---|---|---|
1405
+ | create | POST | `/ontology/v1/relations/{relation_id}/invalidate` | no | no |
1406
+
1407
+ ### ontology.search
1408
+
1409
+ | Method | HTTP | Path | Streaming | Pagination |
1410
+ |---|---|---|---|---|
1411
+ | create | POST | `/ontology/v1/search` | no | no |
1412
+
1413
+ ### ontology.types
1414
+
1415
+ | Method | HTTP | Path | Streaming | Pagination |
1416
+ |---|---|---|---|---|
1417
+ | create | POST | `/ontology/v1/types` | no | no |
1418
+ | list | GET | `/ontology/v1/types` | no | no |
1419
+ | retrieve | GET | `/ontology/v1/types/{name}` | no | no |
1420
+
1253
1421
  ## organization
1254
1422
 
1255
1423
  ### organization.charges
@@ -1446,6 +1614,142 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1446
1614
  |---|---|---|---|---|
1447
1615
  | create | POST | `/search/v1/search` | no | no |
1448
1616
 
1617
+ ## studio
1618
+
1619
+ ### studio.codexes
1620
+
1621
+ | Method | HTTP | Path | Streaming | Pagination |
1622
+ |---|---|---|---|---|
1623
+ | create | POST | `/studio/v1/codexes` | no | no |
1624
+ | delete | DELETE | `/studio/v1/codexes/{codex}` | no | no |
1625
+ | list | GET | `/studio/v1/codexes` | no | no |
1626
+ | retrieve | GET | `/studio/v1/codexes/{codex}` | no | no |
1627
+ | update | PATCH | `/studio/v1/codexes/{codex}` | no | no |
1628
+
1629
+ ### studio.codexes.entries
1630
+
1631
+ | Method | HTTP | Path | Streaming | Pagination |
1632
+ |---|---|---|---|---|
1633
+ | create | POST | `/studio/v1/codexes/{codex}/entries` | no | no |
1634
+ | delete | DELETE | `/studio/v1/codexes/{codex}/entries/{entry}` | no | no |
1635
+ | list | GET | `/studio/v1/codexes/{codex}/entries` | no | no |
1636
+ | retrieve | GET | `/studio/v1/codexes/{codex}/entries/{entry}` | no | no |
1637
+ | update | PATCH | `/studio/v1/codexes/{codex}/entries/{entry}` | no | no |
1638
+
1639
+ ### studio.genres
1640
+
1641
+ | Method | HTTP | Path | Streaming | Pagination |
1642
+ |---|---|---|---|---|
1643
+ | list | GET | `/studio/v1/genres` | no | no |
1644
+ | retrieve | GET | `/studio/v1/genres/{genre}` | no | no |
1645
+
1646
+ ### studio.platforms
1647
+
1648
+ | Method | HTTP | Path | Streaming | Pagination |
1649
+ |---|---|---|---|---|
1650
+ | list | GET | `/studio/v1/platforms` | no | no |
1651
+ | retrieve | GET | `/studio/v1/platforms/{platform}` | no | no |
1652
+
1653
+ ### studio.styles
1654
+
1655
+ | Method | HTTP | Path | Streaming | Pagination |
1656
+ |---|---|---|---|---|
1657
+ | create | POST | `/studio/v1/styles` | no | no |
1658
+ | delete | DELETE | `/studio/v1/styles/{style}` | no | no |
1659
+ | list | GET | `/studio/v1/styles` | no | no |
1660
+ | retrieve | GET | `/studio/v1/styles/{style}` | no | no |
1661
+ | update | PATCH | `/studio/v1/styles/{style}` | no | no |
1662
+
1663
+ ### studio.templates
1664
+
1665
+ | Method | HTTP | Path | Streaming | Pagination |
1666
+ |---|---|---|---|---|
1667
+ | create | POST | `/studio/v1/templates` | no | no |
1668
+ | delete | DELETE | `/studio/v1/templates/{template}` | no | no |
1669
+ | list | GET | `/studio/v1/templates` | no | no |
1670
+ | retrieve | GET | `/studio/v1/templates/{template}` | no | no |
1671
+
1672
+ ### studio.themes
1673
+
1674
+ | Method | HTTP | Path | Streaming | Pagination |
1675
+ |---|---|---|---|---|
1676
+ | create | POST | `/studio/v1/themes` | no | no |
1677
+ | delete | DELETE | `/studio/v1/themes/{theme}` | no | no |
1678
+ | list | GET | `/studio/v1/themes` | no | no |
1679
+ | retrieve | GET | `/studio/v1/themes/{theme}` | no | no |
1680
+ | update | PATCH | `/studio/v1/themes/{theme}` | no | no |
1681
+
1682
+ ### studio.works
1683
+
1684
+ | Method | HTTP | Path | Streaming | Pagination |
1685
+ |---|---|---|---|---|
1686
+ | create | POST | `/studio/v1/works` | no | no |
1687
+ | list | GET | `/studio/v1/works` | no | no |
1688
+ | resolve | GET | `/studio/v1/works:resolve` | no | no |
1689
+ | retrieve | GET | `/studio/v1/works/{work}` | no | no |
1690
+ | update | PATCH | `/studio/v1/works/{work}` | no | no |
1691
+ | updateBrief | PATCH | `/studio/v1/works/{work}/brief` | no | no |
1692
+
1693
+ ### studio.works.drafts
1694
+
1695
+ | Method | HTTP | Path | Streaming | Pagination |
1696
+ |---|---|---|---|---|
1697
+ | create | POST | `/studio/v1/works/{work}/drafts` | no | no |
1698
+ | list | GET | `/studio/v1/works/{work}/drafts` | no | no |
1699
+ | rebase | POST | `/studio/v1/works/{work}/drafts/{draft}:rebase` | no | no |
1700
+ | retrieve | GET | `/studio/v1/works/{work}/drafts/{draft}` | no | no |
1701
+ | retrieveExport | GET | `/studio/v1/works/{work}/drafts/{draft}/export` | no | no |
1702
+ | retrieveOutline | GET | `/studio/v1/works/{work}/drafts/{draft}/outline` | no | no |
1703
+ | retrieveReview | GET | `/studio/v1/works/{work}/drafts/{draft}/review` | no | no |
1704
+ | update | PATCH | `/studio/v1/works/{work}/drafts/{draft}` | no | no |
1705
+
1706
+ ### studio.works.drafts.renditions
1707
+
1708
+ | Method | HTTP | Path | Streaming | Pagination |
1709
+ |---|---|---|---|---|
1710
+ | create | POST | `/studio/v1/works/{work}/drafts/{draft}/renditions` | no | no |
1711
+
1712
+ ### studio.works.drafts.status
1713
+
1714
+ | Method | HTTP | Path | Streaming | Pagination |
1715
+ |---|---|---|---|---|
1716
+ | list | GET | `/studio/v1/works/{work}/drafts/{draft}/status` | no | no |
1717
+
1718
+ ### studio.works.drafts.units
1719
+
1720
+ | Method | HTTP | Path | Streaming | Pagination |
1721
+ |---|---|---|---|---|
1722
+ | batchCreate | POST | `/studio/v1/works/{work}/drafts/{draft}/units:batchCreate` | no | no |
1723
+ | batchUpdate | POST | `/studio/v1/works/{work}/drafts/{draft}/units:batchUpdate` | no | no |
1724
+ | create | POST | `/studio/v1/works/{work}/drafts/{draft}/units` | no | no |
1725
+
1726
+ ### studio.works.renditions
1727
+
1728
+ | Method | HTTP | Path | Streaming | Pagination |
1729
+ |---|---|---|---|---|
1730
+ | delete | DELETE | `/studio/v1/works/{work}/renditions/{rendition}` | no | no |
1731
+ | list | GET | `/studio/v1/works/{work}/renditions` | no | no |
1732
+ | publish | POST | `/studio/v1/works/{work}/renditions/{rendition}:publish` | no | no |
1733
+ | render | POST | `/studio/v1/works/{work}/renditions/{rendition}:render` | no | no |
1734
+ | retrieve | GET | `/studio/v1/works/{work}/renditions/{rendition}` | no | no |
1735
+ | retrieveContent | GET | `/studio/v1/works/{work}/renditions/{rendition}/content` | no | no |
1736
+ | update | PATCH | `/studio/v1/works/{work}/renditions/{rendition}` | no | no |
1737
+
1738
+ ### studio.works.units
1739
+
1740
+ | Method | HTTP | Path | Streaming | Pagination |
1741
+ |---|---|---|---|---|
1742
+ | move | POST | `/studio/v1/works/{work}/units/{unit}:move` | no | no |
1743
+ | retrieve | GET | `/studio/v1/works/{work}/units/{unit}` | no | no |
1744
+ | retrieveContext | GET | `/studio/v1/works/{work}/units/{unit}/context` | no | no |
1745
+ | update | PATCH | `/studio/v1/works/{work}/units/{unit}` | no | no |
1746
+
1747
+ ### studio.works.units.blocks
1748
+
1749
+ | Method | HTTP | Path | Streaming | Pagination |
1750
+ |---|---|---|---|---|
1751
+ | patch | POST | `/studio/v1/works/{work}/units/{unit}/blocks:patch` | no | no |
1752
+
1449
1753
  ## ticket
1450
1754
 
1451
1755
  ### ticket.activity
@@ -1685,6 +1989,11 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1685
1989
  | crm.properties.archive | CRM DELETE archives the resource rather than permanently deleting it; expose the archive product verb. |
1686
1990
  | database.databases.rest.create | The final parameter identifies a table collection; POST inserts rows rather than updating the table. |
1687
1991
  | file.uploads.createSigned | Signed upload creation returns a one-time local PUT URL; ADR-039 names this operation uploads.createSigned. |
1992
+ | media.libraries.retrieveDefault | ADR-094 §9 names the default-library read libraries.retrieveDefault; the URL names a reference rather than an id, so the path-derived name would otherwise read as retrieving a library called default. |
1993
+ | media.libraries.setDefault | ADR-094 §9 names the default-library write libraries.setDefault; the URL has no library id because the organization owns one default library, so the path alone cannot say which. |
1994
+ | media.assets.edit | ADR-094 §9 names the edit write assets.edit; an edit acts on the addressed asset and returns a Job, so the URL nesting under a library is a mount rather than an SDK resource level. |
1995
+ | media.assets.lineage | ADR-094 §9 names the edit-tree read assets.lineage; lineage is the product verb and the URL nesting under a library is a mount, not an SDK resource level. |
1996
+ | media.images.generate | ADR-094 §9 names image generation images.generate; the URL mounts it under a library, but generation is an operation on images and the path alone would derive a generations collection create. |
1688
1997
  | meta.docs.search | Documentation keyword search is an operation on docs, not a nested collection. |
1689
1998
  | sandbox.sandboxes.commands.run | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
1690
1999
  | sandbox.sandboxes.files.remove | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Models, agents, sandboxes, search, data and automation, typed end to end.**
6
6
 
7
- The official TypeScript SDK for [知行云 Praxis](https://deepraxis.com), the cloud where AI agents are built, run and hosted.
7
+ The official TypeScript SDK for [Praxis](https://deepraxis.com), the cloud where AI agents are built, run and hosted.
8
8
 
9
9
  [![npm](https://img.shields.io/npm/v/@deepraxis/sdk?label=npm&color=2e8555)](https://www.npmjs.com/package/@deepraxis/sdk)
10
10
  [![Bundle size](https://img.shields.io/bundlephobia/minzip/@deepraxis/sdk?color=2e8555)](https://bundlephobia.com/package/@deepraxis/sdk)
@@ -33,7 +33,7 @@ console.log(completion.choices[0]?.message.content);
33
33
  ## Why this SDK
34
34
 
35
35
  - **The whole platform, one client.** About 350 operations across models, agents, sandboxes,
36
- cloud browsers, web search, databases, knowledge bases, files, media, automation and hosted
36
+ browsers, web search, databases, knowledge bases, files, media, automation and hosted
37
37
  applications, generated from the same contract as the API.
38
38
  - **Types from the contract.** Every path, query, body and response is typed, including the
39
39
  events of each stream, so your editor knows what comes back.
@@ -276,5 +276,5 @@ sandboxes, search, data, automation and the rest of the platform.
276
276
 
277
277
  [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). Copyright 2026 南京深度实践人工智能科技有限公司 (Deepractice).
278
278
 
279
- "Praxis", "知行云" and "Deepraxis" are trademarks of Deepractice; the license does not grant
279
+ "Praxis" and "Deepraxis" are trademarks of Deepractice; the license does not grant
280
280
  rights to use them.
@@ -9,6 +9,9 @@ export interface ProblemDetails {
9
9
  requestId?: string;
10
10
  message?: string;
11
11
  param?: string | null;
12
+ /** ticket-681 — the documentation page the failure points at, and the exact section to read. */
13
+ docUrl?: string;
14
+ describe?: string;
12
15
  raw?: unknown;
13
16
  }
14
17
  /** Pure normalization shared by HTTP clients and the automation call ledger.
@@ -26,6 +29,9 @@ export declare class PraxisError extends Error {
26
29
  readonly errors: unknown[];
27
30
  readonly requestId?: string;
28
31
  readonly param?: string | null;
32
+ /** ticket-681 — the documented page and the exact section an agent should read to fix the call. */
33
+ readonly docUrl?: string;
34
+ readonly describe?: string;
29
35
  readonly raw?: unknown;
30
36
  constructor(problem?: ProblemDetails, options?: ErrorOptions);
31
37
  static fromResponse(response: Response, body: unknown): PraxisError;
@@ -16,6 +16,9 @@ export function problemFrom(status, headers, body, statusText) {
16
16
  param: typeof param === 'string' ? param : param === null || nested.param === null ? null : undefined,
17
17
  errors: Array.isArray(value.errors) ? value.errors : [],
18
18
  requestId: headers.get('x-request-id') ?? string(value.requestId) ?? string(value.request_id),
19
+ // Both spellings reach here: the own face writes snake_case, an in-process problem keeps docUrl.
20
+ docUrl: string(nested.doc_url) ?? string(value.doc_url) ?? string(nested.docUrl) ?? string(value.docUrl),
21
+ describe: string(nested.describe) ?? string(value.describe),
19
22
  raw: body,
20
23
  };
21
24
  }
@@ -28,6 +31,9 @@ export class PraxisError extends Error {
28
31
  errors;
29
32
  requestId;
30
33
  param;
34
+ /** ticket-681 — the documented page and the exact section an agent should read to fix the call. */
35
+ docUrl;
36
+ describe;
31
37
  raw;
32
38
  constructor(problem = {}, options) {
33
39
  super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ''}`, options);
@@ -40,6 +46,8 @@ export class PraxisError extends Error {
40
46
  this.errors = problem.errors ?? [];
41
47
  this.requestId = problem.requestId;
42
48
  this.param = problem.param;
49
+ this.docUrl = problem.docUrl;
50
+ this.describe = problem.describe;
43
51
  this.raw = problem.raw;
44
52
  }
45
53
  static fromResponse(response, body) {