@tangle-network/agent-app 0.60.115 → 0.60.116

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 (72) hide show
  1. package/dist/VaultPane-OWOPGPXP.js +7 -0
  2. package/dist/assistant/index.js +8 -8
  3. package/dist/chat-react/index.js +2 -2
  4. package/dist/chat-routes/index.js +1 -1
  5. package/dist/{chunk-Y4WLCFDZ.js → chunk-2FLSODOX.js} +6 -6
  6. package/dist/chunk-BTEVD7HG.js +198 -0
  7. package/dist/chunk-BTEVD7HG.js.map +1 -0
  8. package/dist/chunk-FVI2MHUL.js +1152 -0
  9. package/dist/chunk-FVI2MHUL.js.map +1 -0
  10. package/dist/{chunk-RQSYR4AV.js → chunk-GHUQ5HXU.js} +4 -4
  11. package/dist/{chunk-OGDEUCNW.js → chunk-JGLK5RDK.js} +176 -1
  12. package/dist/chunk-JGLK5RDK.js.map +1 -0
  13. package/dist/{chunk-AB63T2LM.js → chunk-KBJZMR4E.js} +8 -1
  14. package/dist/chunk-KBJZMR4E.js.map +1 -0
  15. package/dist/{chunk-RQSNTJTW.js → chunk-MO7PDQRZ.js} +526 -187
  16. package/dist/chunk-MO7PDQRZ.js.map +1 -0
  17. package/dist/{chunk-MEUNTJL5.js → chunk-N3CYCSKK.js} +6 -1
  18. package/dist/chunk-N3CYCSKK.js.map +1 -0
  19. package/dist/{chunk-56GPDCOJ.js → chunk-TSGWACTC.js} +5 -5
  20. package/dist/journeys/cli.d.ts +2 -0
  21. package/dist/journeys/cli.js +165 -0
  22. package/dist/journeys/cli.js.map +1 -0
  23. package/dist/journeys/config.d.ts +96 -0
  24. package/dist/journeys/index.d.ts +18 -0
  25. package/dist/journeys/index.js +731 -0
  26. package/dist/journeys/index.js.map +1 -0
  27. package/dist/journeys/journey.d.ts +173 -0
  28. package/dist/journeys/page-reading.d.ts +42 -0
  29. package/dist/journeys/report.d.ts +51 -0
  30. package/dist/journeys/score.d.ts +115 -0
  31. package/dist/journeys/scrub.d.ts +21 -0
  32. package/dist/journeys/send.d.ts +46 -0
  33. package/dist/journeys/session.d.ts +27 -0
  34. package/dist/journeys/trace-zip.d.ts +28 -0
  35. package/dist/journeys/video.d.ts +53 -0
  36. package/dist/public-consultation/index.d.ts +2 -2
  37. package/dist/sandbox/index.d.ts +2 -0
  38. package/dist/sandbox/index.js +13 -1
  39. package/dist/sandbox/sandbox-exec-tool.d.ts +68 -0
  40. package/dist/sandbox/sandbox-run-tool.d.ts +70 -0
  41. package/dist/studio-react/index.js +2 -2
  42. package/dist/teams/index.js +10 -6
  43. package/dist/teams/invitations-api.js +6 -3
  44. package/dist/teams/invitations-api.js.map +1 -1
  45. package/dist/teams/invitations.d.ts +4 -0
  46. package/dist/teams/members-api.js +2 -1
  47. package/dist/teams-react/components/InviteForm.d.ts +20 -0
  48. package/dist/teams-react/contracts.d.ts +2 -0
  49. package/dist/teams-react/index.js +196 -217
  50. package/dist/teams-react/index.js.map +1 -1
  51. package/dist/vault/VaultContentResults.d.ts +29 -0
  52. package/dist/vault/VaultHistoryPanel.d.ts +20 -0
  53. package/dist/vault/VaultPane.d.ts +3 -1
  54. package/dist/vault/contracts.d.ts +38 -0
  55. package/dist/vault/index.js +1 -1
  56. package/dist/vault/lazy.js +1 -1
  57. package/dist/web-react/index.js +22 -22
  58. package/dist/workspace-export/index.js +4 -193
  59. package/dist/workspace-export/index.js.map +1 -1
  60. package/dist/workspace-react/index.js +9 -7
  61. package/dist/workspace-react/index.js.map +1 -1
  62. package/dist/workspace-react/workspace-list.d.ts +7 -1
  63. package/package.json +8 -2
  64. package/dist/VaultPane-JUSNGOV7.js +0 -7
  65. package/dist/chunk-AB63T2LM.js.map +0 -1
  66. package/dist/chunk-MEUNTJL5.js.map +0 -1
  67. package/dist/chunk-OGDEUCNW.js.map +0 -1
  68. package/dist/chunk-RQSNTJTW.js.map +0 -1
  69. /package/dist/{VaultPane-JUSNGOV7.js.map → VaultPane-OWOPGPXP.js.map} +0 -0
  70. /package/dist/{chunk-Y4WLCFDZ.js.map → chunk-2FLSODOX.js.map} +0 -0
  71. /package/dist/{chunk-RQSYR4AV.js.map → chunk-GHUQ5HXU.js.map} +0 -0
  72. /package/dist/{chunk-56GPDCOJ.js.map → chunk-TSGWACTC.js.map} +0 -0
@@ -0,0 +1,96 @@
1
+ export type SignInMethod = 'password' | 'tangle';
2
+ export interface JourneyIdentity {
3
+ /** Environment variable that holds the account's email. */
4
+ readonly emailEnv: string;
5
+ /** Environment variable that holds the account's password. */
6
+ readonly passwordEnv: string;
7
+ /**
8
+ * `password`: the app's own email sign-in (better-auth `sign-in/email`).
9
+ * `tangle`: "Log in with Tangle": the app's SSO start, the Platform's email
10
+ * sign-in, then the app's callback.
11
+ */
12
+ readonly signIn: SignInMethod;
13
+ }
14
+ /** The ids a thread URL carries. */
15
+ export interface ThreadRoute {
16
+ readonly threadId: string;
17
+ readonly workspaceId?: string;
18
+ }
19
+ /**
20
+ * The chat DOM a turn is read from. Defaults are agent-app's own components:
21
+ * `ChatComposer` (the composer card, "Message input", "Send", "Stop response")
22
+ * and the transcript's failure rows (`role="alert"`, `data-notice-tone="error"`).
23
+ */
24
+ export interface ChatContract {
25
+ /** Region whose text decides a turn's outcome. */
26
+ readonly transcript: string;
27
+ /** Assistant reply blocks. `null` measures reply text as transcript growth beyond the prompt. */
28
+ readonly assistant: string | null;
29
+ /** Progress lines inside the transcript ("Sending…", "Searching the web"). */
30
+ readonly status: string;
31
+ /** Elements that mark a failed turn. */
32
+ readonly failureNodes: string;
33
+ /** Failure lines this app shows in plain text, added to the package defaults. */
34
+ readonly failureText: readonly RegExp[];
35
+ /** Lines meaning the person stopped the turn, added to the package defaults. */
36
+ readonly stoppedText: readonly RegExp[];
37
+ /** The card holding the composer's input and action row. */
38
+ readonly composer: string;
39
+ /** Accessible names inside the composer card. */
40
+ readonly inputName: string;
41
+ readonly sendName: string;
42
+ readonly stopName: string;
43
+ /** Accessible name of a failed turn's retry control. */
44
+ readonly retryName: RegExp;
45
+ /** A created thread's path. Named groups `threadId` (required) and `workspaceId`. */
46
+ readonly threadPath: RegExp | null;
47
+ /** Path that lists a thread's running turns as JSON `{ running: string[] }`; the server's word on completion. */
48
+ readonly runningTurns: ((route: ThreadRoute) => string) | null;
49
+ /** POST paths that mean the composer submitted, besides the page's own route. */
50
+ readonly sendPaths: readonly RegExp[];
51
+ }
52
+ export interface AuthPaths {
53
+ readonly session: string;
54
+ readonly passwordSignIn: string;
55
+ readonly tangleStart: string;
56
+ }
57
+ export interface JourneysConfig {
58
+ /** Short name, used for state and output folders. */
59
+ readonly app: string;
60
+ /** Origin the journeys drive. `JOURNEYS_BASE_URL` overrides it, for a local stack. */
61
+ readonly baseUrl: string;
62
+ readonly identities: Readonly<Record<string, JourneyIdentity>>;
63
+ readonly chat?: Partial<ChatContract>;
64
+ readonly auth?: Partial<AuthPaths>;
65
+ /** Chat turns one journey may send. Default 6. */
66
+ readonly maxTurns?: number;
67
+ /** Sessions and raw recordings. Default `~/.local/state/agent-app-journeys/<app>`. */
68
+ readonly stateDir?: string;
69
+ /** Files safe to copy off the host. Default `<stateDir>/out`. */
70
+ readonly outDir?: string;
71
+ }
72
+ export interface ResolvedJourneysConfig {
73
+ /** Marks a config whose defaults are filled; resolving it again returns it unchanged. */
74
+ readonly resolved: true;
75
+ readonly app: string;
76
+ readonly baseUrl: string;
77
+ readonly identities: Readonly<Record<string, JourneyIdentity>>;
78
+ readonly chat: ChatContract;
79
+ readonly auth: AuthPaths;
80
+ readonly maxTurns: number;
81
+ readonly stateDir: string;
82
+ readonly outDir: string;
83
+ }
84
+ export declare const DEFAULT_CHAT_CONTRACT: ChatContract;
85
+ export declare const DEFAULT_AUTH_PATHS: AuthPaths;
86
+ export declare const CONFIG_FILE_NAMES: readonly ['journeys.config.mjs', 'journeys.config.js'];
87
+ /** Identity for a typed config; also validates it. */
88
+ export declare function defineJourneys(config: JourneysConfig): JourneysConfig;
89
+ /** Fill defaults and refuse a config that cannot drive a journey. */
90
+ export declare function resolveJourneysConfig(config: JourneysConfig | ResolvedJourneysConfig, env?: Record<string, string | undefined>): ResolvedJourneysConfig;
91
+ /** The ids in a thread URL, or null when the URL is not a thread on this origin. */
92
+ export declare function threadRouteIn(url: string, config: Pick<ResolvedJourneysConfig, 'baseUrl' | 'chat'>): ThreadRoute | null;
93
+ /** Environment variable names the config needs, for a vault loader. */
94
+ export declare function credentialNames(config: Pick<JourneysConfig, 'identities'>): string[];
95
+ /** `JOURNEYS_CONFIG`, else the first config file in `dir`. */
96
+ export declare function loadJourneysConfig(dir?: string, env?: Record<string, string | undefined>): Promise<ResolvedJourneysConfig>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * `/journeys` — prove an agent app's product flows the way a person uses them:
3
+ * recorded browser journeys as test identities, measured chat turns scored from
4
+ * what the person saw, and videos a reviewer can watch. `agent-app-journeys`
5
+ * runs the scripts and writes the INDEX.md a skeptical review starts from.
6
+ *
7
+ * Node only (browser automation, ffmpeg, the file system). Needs the optional
8
+ * `playwright` peer, and `ffmpeg`/`ffprobe` on PATH for videos.
9
+ * See docs/journeys.md.
10
+ */
11
+ export { CONFIG_FILE_NAMES, credentialNames, DEFAULT_AUTH_PATHS, DEFAULT_CHAT_CONTRACT, defineJourneys, loadJourneysConfig, resolveJourneysConfig, threadRouteIn, type AuthPaths, type ChatContract, type JourneyIdentity, type JourneysConfig, type ResolvedJourneysConfig, type SignInMethod, type ThreadRoute, } from './config.js';
12
+ export { DESKTOP, Journey, oneLine, PHONE, startJourney, type SendOptions, type StepRecord, type TurnRecord, } from './journey.js';
13
+ export { DEFAULT_FAILURE_TEXT, DEFAULT_STOPPED_TEXT, scoreTurn, STATUS_STALE_MS, turnLooksActive, TurnEvidence, type FailurePatterns, type TranscriptSnapshot, type TurnFacts, type TurnOutcome, type TurnVerdict, } from './score.js';
14
+ export { collectJourneyFiles, renderIndex, tallyTurns, type CriticResult, type IndexInput, type JourneyFiles } from './report.js';
15
+ export { assertNoSecrets, scrubTrace } from './scrub.js';
16
+ export { clickUntilSubmitted, createSubmissionTracker, routeSubmitPaths, settleText, type SendDriveOps, type SubmissionTracker } from './send.js';
17
+ export { secretNeedles, sessionUser, storageStateFor, type SessionUser } from './session.js';
18
+ export { chapterCues, extractFrames, highlightPlan, MAX_HIGHLIGHTS_S, postProcessVideo, rebuildVideo, type Chapter, type Cue, type HighlightSegment } from './video.js';