dsh-opencode-go 0.2.0 → 0.2.1

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 (44) hide show
  1. package/README.en.md +20 -18
  2. package/README.md +26 -18
  3. package/THIRD_PARTY_NOTICES.md +5 -1
  4. package/docs/advanced.en.md +17 -13
  5. package/docs/advanced.md +18 -13
  6. package/docs/assets/usage-history-desktop.jpg +0 -0
  7. package/docs/assets/usage-history-mobile.jpg +0 -0
  8. package/docs/assets/usage-history-models.jpg +0 -0
  9. package/docs/development.md +23 -9
  10. package/docs/usage-analytics.en.md +34 -85
  11. package/docs/usage-analytics.md +34 -85
  12. package/docs/verification.md +50 -13
  13. package/lib/build-info.json +1 -1
  14. package/lib/client.js +2111 -2257
  15. package/lib/free-http-worker.js +32 -0
  16. package/lib/index.js +3078 -1899
  17. package/lib/types/accounts.d.ts +2 -2
  18. package/lib/types/adapter.d.ts +24 -9
  19. package/lib/types/analytics.d.ts +22 -332
  20. package/lib/types/catalog.d.ts +35 -76
  21. package/lib/types/client/AnalyticsDialog.d.ts +11 -18
  22. package/lib/types/client/Section.d.ts +3 -13
  23. package/lib/types/client/UsagePill.d.ts +10 -3
  24. package/lib/types/client/controller.d.ts +10 -8
  25. package/lib/types/client/dashboard-copy.d.ts +58 -0
  26. package/lib/types/client/index.d.ts +9 -0
  27. package/lib/types/client/presentation.d.ts +36 -72
  28. package/lib/types/config.d.ts +5 -1
  29. package/lib/types/contracts.d.ts +80 -25
  30. package/lib/types/conversion.d.ts +10 -2
  31. package/lib/types/free-channel.d.ts +21 -0
  32. package/lib/types/free-http-worker.d.ts +1 -0
  33. package/lib/types/free-policy.d.ts +4 -0
  34. package/lib/types/free-protocol.d.ts +16 -0
  35. package/lib/types/free-runtime.d.ts +2 -0
  36. package/lib/types/free-socks-tunnel.d.ts +4 -0
  37. package/lib/types/free-transport.d.ts +19 -0
  38. package/lib/types/index.d.ts +1 -1
  39. package/lib/types/pricing.d.ts +29 -0
  40. package/lib/types/sdk-types.d.ts +1577 -2890
  41. package/lib/types/transport.d.ts +13 -5
  42. package/lib/vendor-licenses.txt +79 -55
  43. package/package.json +4 -4
  44. package/docs/assets/usage-panel.png +0 -0
@@ -25,25 +25,33 @@ export declare function readJsonResponse(response: Response, maxBytes: number, o
25
25
  gzip?: boolean;
26
26
  signal?: AbortSignal | null;
27
27
  }): Promise<unknown>;
28
- /** Gateway status codes cover several domains; a 401 alone cannot reject a key. */
29
- export declare function classifyGatewayError(status: number, body: string, fallback: string): string;
28
+ interface GatewayContextBudget {
29
+ contextWindow?: number;
30
+ maxTokens?: number;
31
+ estimatedContextTokens?: number;
32
+ }
33
+ /** Gateway status codes cover several domains; model permissions do not reject a key. */
34
+ export declare function classifyGatewayError(status: number, body: string, fallback: string, budget?: GatewayContextBudget): string;
30
35
  export declare class GatewayDiagnostics {
31
36
  private readonly options;
37
+ private retryAt;
38
+ private transportFailed;
32
39
  private evidence;
33
40
  private code;
34
41
  private readonly secrets;
35
- constructor(options: {
42
+ constructor(options: GatewayContextBudget & {
36
43
  provider: string;
37
44
  model: string;
38
45
  apiKey: string;
39
46
  proxyURL?: string;
40
47
  fetch?: typeof globalThis.fetch;
41
- contextWindow?: number;
42
- maxTokens?: number;
48
+ free?: boolean;
43
49
  });
44
50
  private redact;
45
51
  readonly fetch: typeof globalThis.fetch;
46
52
  failureCode(fallback: string): Promise<string>;
53
+ /** Upstream deadline consumed by passive Free backoff. */
54
+ retryDeadline(): number | undefined;
47
55
  failureMessage(original: string): Promise<string>;
48
56
  }
49
57
  interface UsageErrorOptions {
@@ -1,3 +1,81 @@
1
+ @earendil-works/pi-schema@1.5.0
2
+
3
+ MIT License
4
+
5
+ Copyright (c) 2025 Mario Zechner
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
24
+
25
+ Includes code adapted from TypeBox 1.3.27 (MIT):
26
+
27
+ TypeBox
28
+
29
+ The MIT License (MIT)
30
+
31
+ Copyright (c) 2017-2026 Haydn Paterson
32
+
33
+ Permission is hereby granted, free of charge, to any person obtaining a copy
34
+ of this software and associated documentation files (the "Software"), to deal
35
+ in the Software without restriction, including without limitation the rights
36
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37
+ copies of the Software, and to permit persons to whom the Software is
38
+ furnished to do so, subject to the following conditions:
39
+
40
+ The above copyright notice and this permission notice shall be included in
41
+ all copies or substantial portions of the Software.
42
+
43
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
49
+ THE SOFTWARE.
50
+
51
+ ---
52
+
53
+ @earendil-works/pi-telemetry@1.5.0
54
+
55
+ MIT License
56
+
57
+ Copyright (c) 2025 Mario Zechner
58
+
59
+ Permission is hereby granted, free of charge, to any person obtaining a copy
60
+ of this software and associated documentation files (the "Software"), to deal
61
+ in the Software without restriction, including without limitation the rights
62
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
63
+ copies of the Software, and to permit persons to whom the Software is
64
+ furnished to do so, subject to the following conditions:
65
+
66
+ The above copyright notice and this permission notice shall be included in all
67
+ copies or substantial portions of the Software.
68
+
69
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
70
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
71
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
72
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
73
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
74
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
75
+ SOFTWARE.
76
+
77
+ ---
78
+
1
79
  @google/genai@2.21.0
2
80
 
3
81
  Apache License
@@ -1638,33 +1716,7 @@ SOFTWARE.
1638
1716
 
1639
1717
  ---
1640
1718
 
1641
- @earendil-works/pi-ai@1.2.0
1642
-
1643
- MIT License
1644
-
1645
- Copyright (c) 2025 Mario Zechner
1646
-
1647
- Permission is hereby granted, free of charge, to any person obtaining a copy
1648
- of this software and associated documentation files (the "Software"), to deal
1649
- in the Software without restriction, including without limitation the rights
1650
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1651
- copies of the Software, and to permit persons to whom the Software is
1652
- furnished to do so, subject to the following conditions:
1653
-
1654
- The above copyright notice and this permission notice shall be included in all
1655
- copies or substantial portions of the Software.
1656
-
1657
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1658
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1659
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1660
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1661
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1662
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1663
- SOFTWARE.
1664
-
1665
- ---
1666
-
1667
- @earendil-works/pi-telemetry@1.2.0
1719
+ @earendil-works/pi-ai@1.5.0
1668
1720
 
1669
1721
  MIT License
1670
1722
 
@@ -1782,34 +1834,6 @@ THE SOFTWARE.
1782
1834
 
1783
1835
  ---
1784
1836
 
1785
- typebox@1.3.27
1786
-
1787
- TypeBox
1788
-
1789
- The MIT License (MIT)
1790
-
1791
- Copyright (c) 2017-2026 Haydn Paterson
1792
-
1793
- Permission is hereby granted, free of charge, to any person obtaining a copy
1794
- of this software and associated documentation files (the "Software"), to deal
1795
- in the Software without restriction, including without limitation the rights
1796
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1797
- copies of the Software, and to permit persons to whom the Software is
1798
- furnished to do so, subject to the following conditions:
1799
-
1800
- The above copyright notice and this permission notice shall be included in
1801
- all copies or substantial portions of the Software.
1802
-
1803
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1804
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1805
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1806
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1807
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1808
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1809
- THE SOFTWARE.
1810
-
1811
- ---
1812
-
1813
1837
  web-streams-polyfill@3.3.3
1814
1838
 
1815
1839
  The MIT License (MIT)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-opencode-go",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "OpenCode Go model provider and settings UI for DeepSeek Harness",
5
5
  "icon": "assets/icon.png",
6
6
  "type": "module",
@@ -164,7 +164,7 @@
164
164
  "micromark-util-sanitize-uri": "^2.0.1",
165
165
  "micromark-util-symbol": "^2.0.1",
166
166
  "micromark-util-types": "^2.0.2",
167
- "opencode-go-pi-ai": "npm:@earendil-works/pi-ai@1.2.0",
167
+ "opencode-go-pi-ai": "npm:@earendil-works/pi-ai@1.5.0",
168
168
  "react": "^18.2.0",
169
169
  "react-dom": "^18.2.0",
170
170
  "rollup": "^4.64.2",
@@ -224,7 +224,7 @@
224
224
  "llm",
225
225
  "cordis"
226
226
  ],
227
- "overrides": {
228
- "@earendil-works/pi-telemetry": "1.2.0"
227
+ "optionalDependencies": {
228
+ "bun": "1.4.4"
229
229
  }
230
230
  }
Binary file