@vibedev-si/dsh-vibedev 0.3.11 → 0.5.2

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 (51) hide show
  1. package/README.md +193 -10
  2. package/THIRD-PARTY-NOTICES.txt +1 -1
  3. package/client/client.account-center.js +13555 -0
  4. package/client/client.js +3503 -878
  5. package/cordis.patch.yml +5 -0
  6. package/lib/account/center-business-contract.d.ts +22 -0
  7. package/lib/account/center-business.d.ts +6 -0
  8. package/lib/account/center-contract.d.ts +12 -0
  9. package/lib/account/center-monitor-contract.d.ts +10 -0
  10. package/lib/account/center-price-contract.d.ts +5 -0
  11. package/lib/account/center.d.ts +7 -0
  12. package/lib/account/index.d.ts +14 -0
  13. package/lib/{anthropic-messages-BgIfgjNt.js → anthropic-messages-QcnVMGaA.js} +11 -11
  14. package/lib/contract-v1.types.d.ts +134 -0
  15. package/lib/contracts.d.ts +34 -0
  16. package/lib/fetch/host-web.d.ts +34 -0
  17. package/lib/fetch/provider.d.ts +125 -0
  18. package/lib/fetch/wiring.d.ts +124 -0
  19. package/lib/gateway/errors.d.ts +29 -1
  20. package/lib/gateway/http.d.ts +24 -0
  21. package/lib/host-locales.d.ts +4 -0
  22. package/lib/index.d.ts +23 -0
  23. package/lib/index.js +3630 -505
  24. package/lib/{node-D58f7Ea6.js → node-CcLPV4RA.js} +4 -4
  25. package/lib/{node-Br-0fshF.js → node-vkDR3GtK.js} +2 -2
  26. package/lib/pricing.d.ts +21 -1
  27. package/lib/search/provider.d.ts +28 -5
  28. package/lib/service.d.ts +36 -9
  29. package/lib/tasks/remote.d.ts +4 -4
  30. package/lib/tasks/store.d.ts +54 -9
  31. package/lib/tasks/tracker.d.ts +45 -45
  32. package/lib/tools/image.d.ts +1 -0
  33. package/lib/tools/video.d.ts +3 -0
  34. package/lib/util/files.d.ts +2 -0
  35. package/locale/en.json +13 -0
  36. package/locale/zh.json +13 -0
  37. package/node_modules/@vibedev-si/dsh-ecosystem/LICENSE +22 -0
  38. package/node_modules/@vibedev-si/dsh-ecosystem/README.md +154 -0
  39. package/node_modules/@vibedev-si/dsh-ecosystem/catalog/catalog.json +167 -0
  40. package/node_modules/@vibedev-si/dsh-ecosystem/catalog-updates.js +326 -0
  41. package/node_modules/@vibedev-si/dsh-ecosystem/catalog-validator.js +263 -0
  42. package/node_modules/@vibedev-si/dsh-ecosystem/client.js +2816 -0
  43. package/node_modules/@vibedev-si/dsh-ecosystem/cordis.patch.yml +5 -0
  44. package/node_modules/@vibedev-si/dsh-ecosystem/icon.svg +5 -0
  45. package/node_modules/@vibedev-si/dsh-ecosystem/index.js +169 -0
  46. package/node_modules/@vibedev-si/dsh-ecosystem/locale/en.json +6 -0
  47. package/node_modules/@vibedev-si/dsh-ecosystem/locale/zh.json +6 -0
  48. package/node_modules/@vibedev-si/dsh-ecosystem/package.json +75 -0
  49. package/node_modules/@vibedev-si/dsh-ecosystem/remote-catalog.js +212 -0
  50. package/package.json +41 -24
  51. package/scripts/verify-fetch-joint.mjs +72 -0
@@ -0,0 +1,72 @@
1
+ // Explicit, bounded SDK acceptance; never called by package install, build or plugin apply.
2
+ import { GatewayFetchProvider } from '../lib/index.js'
3
+
4
+ const token = process.env.VIBEDEV_FETCH_TEST_APP_TOKEN
5
+ const urls = process.argv.slice(2)
6
+ const blocked = reason => {
7
+ console.log(JSON.stringify({ status: 'blocked', reason, fetchPosts: 0, defaultProviderChanged: false }))
8
+ process.exitCode = 2
9
+ }
10
+ if (!token?.trim()) {
11
+ blocked('Inject a short-lived authorized VibeDevAppToken into VIBEDEV_FETCH_TEST_APP_TOKEN. Do not use a supplier Key or print the token.')
12
+ } else if (/^sk[-_]/i.test(token.trim())) {
13
+ blocked('This runner accepts an authorized VibeDevAppToken, not a supplier or API Key.')
14
+ } else if (urls.length < 1 || urls.length > 2) {
15
+ blocked('Provide one or two explicitly authorized public test URLs.')
16
+ } else {
17
+ const origin = 'https://api.vibedev.studio'
18
+ const endpoint = `${origin}/v1/vibedev/web-fetch`
19
+ // Snapshot of the frozen contract, not a claim that the gateway advertised the capability.
20
+ const capability = {
21
+ path: '/v1/vibedev/web-fetch', mode: 'extracted_content', content_format: 'markdown',
22
+ max_url_characters: 8192, max_body_characters: 100000, character_unit: 'unicode_code_point',
23
+ max_provider_response_bytes: 5242880, timeout_ms: 30000, allowed_ports: [80, 443],
24
+ security_scope: 'initial_url_precheck_provider_managed_fetch',
25
+ }
26
+ const signal = AbortSignal.timeout(80000)
27
+ let posts = 0
28
+ const evidence = []
29
+ const transport = async (input, init) => {
30
+ if (String(input) !== endpoint || init?.method !== 'POST' || ++posts > 2) throw new Error('Acceptance network budget or destination rejected')
31
+ return fetch(input, init)
32
+ }
33
+ const provider = new GatewayFetchProvider({
34
+ origin, userAgent: 'vibedev-fetch-joint-acceptance/2026-10-30.1', capability,
35
+ requestTimeoutMs: 40000, maxResponseBytes: 5242880, maxBodyCharacters: 100000,
36
+ resolveCredential: async () => ({ token, kind: 'plugin' }), fetch: transport,
37
+ })
38
+ for (const url of urls) {
39
+ let label
40
+ try {
41
+ const parsed = new URL(url)
42
+ if (parsed.username || parsed.password || !['http:', 'https:'].includes(parsed.protocol)) throw new Error('Unsupported acceptance URL')
43
+ label = `${parsed.origin}${parsed.pathname}`
44
+ } catch {
45
+ evidence.push({ status: 'blocked', reason: 'Invalid test URL' })
46
+ process.exitCode = 2
47
+ break
48
+ }
49
+ const before = posts
50
+ try {
51
+ const result = await provider.fetch({ url }, signal)
52
+ // An extraction never observed the target: its `url` and `statusCode` are placeholders, not evidence.
53
+ const extracted = result.contentSource === 'extracted'
54
+ evidence.push({
55
+ url: label, status: 'parsed', fetchPosts: posts - before,
56
+ finalUrl: extracted ? 'unknown' : result.url, targetStatus: extracted ? 'unknown' : result.statusCode,
57
+ contentSource: result.contentSource, contentFormat: result.bodyFormat, titlePresent: Boolean(result.title), characters: [...result.body.content].length,
58
+ truncated: result.truncated, sourceCompleteness: result.sourceCompleteness,
59
+ cached: result.gateway.cached, requestId: result.gateway.requestId,
60
+ })
61
+ } catch (error) {
62
+ // No headers, raw messages, causes, content or credentials enter the receipt.
63
+ evidence.push({ url: label, status: 'failed', fetchPosts: posts - before, code: error.code ?? 'CLIENT_FAILURE', requestId: error.details?.requestId, retryable: error.details?.retryable, safeToRetry: error.details?.safeToRetry })
64
+ process.exitCode = 1
65
+ break
66
+ }
67
+ }
68
+ console.log(JSON.stringify({
69
+ mode: 'explicit-manual-sdk-acceptance', contract: '2026-10-30.1', capabilitySource: 'frozen contract; not an advertisement',
70
+ capabilityNegotiationTested: false, defaultProviderChanged: false, fetchPosts: posts, retries: 0, evidence,
71
+ }, null, 2))
72
+ }