@tangle-network/agent-app 0.43.25 → 0.43.27

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 (59) hide show
  1. package/bin/preflight.mjs +47 -0
  2. package/dist/app-auth/index.d.ts +1 -1
  3. package/dist/app-auth/index.js +1 -1
  4. package/dist/assistant/index.d.ts +1 -0
  5. package/dist/assistant/index.js +2 -1
  6. package/dist/assistant/index.js.map +1 -1
  7. package/dist/chat-routes/index.d.ts +276 -0
  8. package/dist/chat-routes/index.js +564 -0
  9. package/dist/chat-routes/index.js.map +1 -0
  10. package/dist/chat-store/index.d.ts +3 -2
  11. package/dist/chat-store/index.js +7 -3
  12. package/dist/chat-store/index.js.map +1 -1
  13. package/dist/{chunk-4H77LX3V.js → chunk-5EQCITY3.js} +2 -20
  14. package/dist/chunk-5EQCITY3.js.map +1 -0
  15. package/dist/chunk-5SV5PSU7.js +80 -0
  16. package/dist/chunk-5SV5PSU7.js.map +1 -0
  17. package/dist/chunk-7LNGJDNA.js +1 -0
  18. package/dist/chunk-7LNGJDNA.js.map +1 -0
  19. package/dist/{chunk-77RLNLFP.js → chunk-ATRJULKZ.js} +41 -5
  20. package/dist/chunk-ATRJULKZ.js.map +1 -0
  21. package/dist/{chunk-PEPXQTJ3.js → chunk-FCQP75JT.js} +16 -5
  22. package/dist/chunk-FCQP75JT.js.map +1 -0
  23. package/dist/chunk-I2R2XT4M.js +62 -0
  24. package/dist/chunk-I2R2XT4M.js.map +1 -0
  25. package/dist/chunk-NYATNLRK.js +99 -0
  26. package/dist/chunk-NYATNLRK.js.map +1 -0
  27. package/dist/chunk-Q4TKVF3L.js +240 -0
  28. package/dist/chunk-Q4TKVF3L.js.map +1 -0
  29. package/dist/{chunk-AVBANQ67.js → chunk-TKVJE63N.js} +10 -1
  30. package/dist/{chunk-AVBANQ67.js.map → chunk-TKVJE63N.js.map} +1 -1
  31. package/dist/{chunk-U7DLCPJ6.js → chunk-Y4QHNQ75.js} +1 -1
  32. package/dist/core-7qIM7svy.d.ts +21 -0
  33. package/dist/index.d.ts +4 -1
  34. package/dist/index.js +125 -104
  35. package/dist/interactions/index.js +2 -1
  36. package/dist/{parts-BeRnK54I.d.ts → parts-BcbitSNp.d.ts} +12 -21
  37. package/dist/platform/index.d.ts +1 -1
  38. package/dist/platform/index.js +3 -1
  39. package/dist/platform/index.js.map +1 -1
  40. package/dist/preflight/index.d.ts +141 -0
  41. package/dist/preflight/index.js +15 -0
  42. package/dist/preflight/index.js.map +1 -0
  43. package/dist/{sso-Df4wtL8D.d.ts → sso-CNOsARMJ.d.ts} +16 -1
  44. package/dist/stream/index.js +1 -1
  45. package/dist/teams-react/index.js +3 -3
  46. package/dist/theme-contract/cli.d.ts +1 -0
  47. package/dist/theme-contract/cli.js +79 -0
  48. package/dist/theme-contract/cli.js.map +1 -0
  49. package/dist/theme-contract/index.d.ts +90 -0
  50. package/dist/theme-contract/index.js +7 -0
  51. package/dist/theme-contract/index.js.map +1 -0
  52. package/dist/web-react/index.d.ts +24 -4
  53. package/dist/web-react/index.js +5 -1
  54. package/dist/wire-BaUF66AS.d.ts +61 -0
  55. package/package.json +20 -1
  56. package/dist/chunk-4H77LX3V.js.map +0 -1
  57. package/dist/chunk-77RLNLFP.js.map +0 -1
  58. package/dist/chunk-PEPXQTJ3.js.map +0 -1
  59. /package/dist/{chunk-U7DLCPJ6.js.map → chunk-Y4QHNQ75.js.map} +0 -0
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * `agent-app-preflight` — run a product's declared secret-liveness probes as a
4
+ * DEPLOY step and fail the deploy if any critical secret is dead.
5
+ *
6
+ * Reads `preflight.config.mjs` from the current working directory (override
7
+ * with `PREFLIGHT_CONFIG`). That file default-exports the probes, built from
8
+ * `process.env` at load time — the deploy already has the real secrets in its
9
+ * environment, which is the one place they can be probed for liveness (CI
10
+ * cannot hold them). Exit 0 when every critical probe is live, 1 when one is
11
+ * dead (deploy fails), 2 on a config/usage error.
12
+ *
13
+ * Wire it as a step BEFORE `wrangler deploy`:
14
+ * agent-app-preflight
15
+ */
16
+ import { existsSync } from 'node:fs'
17
+ import { resolve } from 'node:path'
18
+ import { pathToFileURL } from 'node:url'
19
+
20
+ import { formatPreflightReport, runPreflight } from '../dist/preflight/index.js'
21
+
22
+ const configFile = process.env.PREFLIGHT_CONFIG ?? 'preflight.config.mjs'
23
+
24
+ async function loadProbes() {
25
+ const path = resolve(process.cwd(), configFile)
26
+ if (!existsSync(path)) {
27
+ console.error(`preflight: no config at ${path}`)
28
+ console.error(
29
+ `Create ${configFile} default-exporting probes built from process.env — see '@tangle-network/agent-app/preflight'.`,
30
+ )
31
+ process.exit(2)
32
+ }
33
+ const mod = await import(pathToFileURL(path).href)
34
+ const exported = mod.default ?? mod.probes
35
+ const resolved = typeof exported === 'function' ? await exported() : exported
36
+ const probes = Array.isArray(resolved) ? resolved : resolved?.probes
37
+ if (!Array.isArray(probes) || probes.length === 0) {
38
+ console.error(`preflight: ${configFile} must default-export a non-empty array of probes (or { probes }).`)
39
+ process.exit(2)
40
+ }
41
+ return probes
42
+ }
43
+
44
+ const probes = await loadProbes()
45
+ const report = await runPreflight(probes)
46
+ console.log(formatPreflightReport(report))
47
+ process.exit(report.ok ? 0 : 1)
@@ -1,5 +1,5 @@
1
1
  import { Session, User, Auth, BetterAuthOptions } from 'better-auth';
2
- import { A as AuthGuard, T as TangleSsoHandlers, a as TangleSsoAuthClient, b as TangleSsoAccountStore } from '../sso-Df4wtL8D.js';
2
+ import { A as AuthGuard, T as TangleSsoHandlers, a as TangleSsoAuthClient, b as TangleSsoAccountStore } from '../sso-CNOsARMJ.js';
3
3
 
4
4
  /**
5
5
  * better-auth config factory for agent products (#188 Phase 1). Every product
@@ -2,7 +2,7 @@ import {
2
2
  createAuthGuard,
3
3
  createBetterAuthSessionCookieMinter,
4
4
  createTangleSsoHandlers
5
- } from "../chunk-AVBANQ67.js";
5
+ } from "../chunk-TKVJE63N.js";
6
6
  import "../chunk-HFC4BTWJ.js";
7
7
  import "../chunk-7W5XSTUF.js";
8
8
 
@@ -8,6 +8,7 @@ import '../flow-types-Cb_AblZs.js';
8
8
  import '../sandbox-terminal-BIIC__CP.js';
9
9
  import '../catalog/index.js';
10
10
  import '../harness/index.js';
11
+ import '../wire-BaUF66AS.js';
11
12
 
12
13
  /**
13
14
  * Wire + UI types for the in-app assistant panel. The wire shapes mirror the
@@ -3,8 +3,9 @@ import {
3
3
  ChatMessages,
4
4
  ModelPicker,
5
5
  ProviderLogo
6
- } from "../chunk-PEPXQTJ3.js";
6
+ } from "../chunk-FCQP75JT.js";
7
7
  import "../chunk-65P3HJY3.js";
8
+ import "../chunk-5SV5PSU7.js";
8
9
  import "../chunk-2QI7XV2T.js";
9
10
  import "../chunk-4TXDD6P2.js";
10
11
  import "../chunk-E7QYOOON.js";