@startsimpli/integrations 0.2.177 → 0.2.179
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startsimpli/integrations",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.179",
|
|
4
4
|
"description": "Provider-agnostic types, API clients, hooks, and UI primitives for email + calendar integrations across StartSimpli apps, plus foundry customer email (subpath ./comms).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://startsimpli.com",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"react-native": ">=0.74.0",
|
|
51
51
|
"@startsimpli/ui-native": ">=0.1.12",
|
|
52
52
|
"react-native-safe-area-context": ">=4.0.0",
|
|
53
|
-
"@startsimpli/ui": "^0.4.186",
|
|
54
53
|
"@startsimpli/auth": "^0.4.53",
|
|
54
|
+
"@startsimpli/ui": "^0.4.186",
|
|
55
55
|
"@startsimpli/utils": "^0.4.20"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
@@ -44,6 +44,14 @@ function setup(over: { turn?: ConverseClient['turn']; openError?: Error; utteran
|
|
|
44
44
|
const status = () => screen.getByTestId('converse-status').textContent ?? '';
|
|
45
45
|
|
|
46
46
|
describe('ConversePage (meeting)', () => {
|
|
47
|
+
it('after Start the big start button is gone: a slim status row with a small End button replaces it', async () => {
|
|
48
|
+
setup();
|
|
49
|
+
fireEvent.click(screen.getByTestId('converse-start'));
|
|
50
|
+
await waitFor(() => expect(screen.getByTestId('converse-live-row')).toBeTruthy());
|
|
51
|
+
expect(screen.queryByTestId('converse-start')).toBeNull();
|
|
52
|
+
expect(screen.getByTestId('converse-live-row').contains(screen.getByTestId('converse-end'))).toBe(true);
|
|
53
|
+
});
|
|
54
|
+
|
|
47
55
|
it('speech speed defaults to 1.25x, is remembered, and applies to the open conversation', async () => {
|
|
48
56
|
const store = new Map<string, string>();
|
|
49
57
|
vi.stubGlobal('localStorage', { getItem: (k: string) => store.get(k) ?? null, setItem: (k: string, v: string) => { store.set(k, v); } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @vitest-environment node
|
|
2
2
|
/** The relay CLI's live-sync parts (bd startsim-ym54h): the composed snapshot, the shared access token, the login agent. */
|
|
3
|
-
import { mkdtempSync, readFileSync } from 'node:fs';
|
|
3
|
+
import { chmodSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { tmpdir } from 'node:os';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { describe, expect, it, vi } from 'vitest';
|
|
@@ -10,6 +10,8 @@ import { composeSnapshot, loadNotes, parseSessions, saveNotes } from '../../../.
|
|
|
10
10
|
// @ts-expect-error plain .mjs scripts
|
|
11
11
|
import { accessToken, saveState } from '../../../../scripts/relay-converse/oauth.mjs';
|
|
12
12
|
// @ts-expect-error plain .mjs scripts
|
|
13
|
+
import { decisionMail, deliver, orderMail, relayTarget } from '../../../../scripts/relay-converse/mail.mjs';
|
|
14
|
+
// @ts-expect-error plain .mjs scripts
|
|
13
15
|
import { plist } from '../../../../scripts/relay-converse/install-sync.mjs';
|
|
14
16
|
|
|
15
17
|
describe('fleet snapshot composition', () => {
|
|
@@ -55,3 +57,36 @@ describe('login agent', () => {
|
|
|
55
57
|
expect(xml).toContain('<key>RELAY_BRIDGE_CMD</key><string>python3 /b.py</string>');
|
|
56
58
|
});
|
|
57
59
|
});
|
|
60
|
+
|
|
61
|
+
describe('relay mail', () => {
|
|
62
|
+
const dir = mkdtempSync(join(tmpdir(), 'rc-'));
|
|
63
|
+
const fake = join(dir, 'bridge.sh');
|
|
64
|
+
writeFileSync(fake, `#!/bin/sh\necho "$@" >> "${join(dir, 'sent.log')}"\n[ -f "${join(dir, 'fail')}" ] && exit 1\nexit 0\n`);
|
|
65
|
+
chmodSync(fake, 0o755);
|
|
66
|
+
writeFileSync(join(dir, 'relay.json'), JSON.stringify({ current: { session: 'relay-now' }, previous: [{ session: 'old' }] }));
|
|
67
|
+
const env = { RELAY_BRIDGE_CMD: fake, RELAY_REGISTRY: join(dir, 'relay.json') };
|
|
68
|
+
const order = { conversation_id: 'conv12345', turn: 3, text: 'ask the relay about deploys', at: '2026-11-15T10:00:00Z' };
|
|
69
|
+
const decision = { id: 'd1', title: 'Ship it?', answered_at: '2026-11-15T11:00:00Z', questions: [{ n: 1, text: 'Ship?' }], answers: [{ n: 1, answer: 'Yes' }] };
|
|
70
|
+
|
|
71
|
+
it('sends the current relay each new order and answer once, with the ids to reply to', async () => {
|
|
72
|
+
expect(relayTarget(env)).toBe('relay-now');
|
|
73
|
+
const items = [orderMail(order), decisionMail(decision)];
|
|
74
|
+
const first = await deliver({ env, items, mailed: [] });
|
|
75
|
+
expect(first.sent).toBe(2);
|
|
76
|
+
const second = await deliver({ env, items, mailed: first.mailed });
|
|
77
|
+
expect(second.sent).toBe(0);
|
|
78
|
+
const log = readFileSync(join(dir, 'sent.log'), 'utf8');
|
|
79
|
+
expect(log).toContain('--to relay-now');
|
|
80
|
+
expect(log).toContain('reply conv12345');
|
|
81
|
+
expect(log).toContain('Ship?: Yes');
|
|
82
|
+
expect(log.match(/--to/g)).toHaveLength(2);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it('keeps an item unmailed when the send fails, so the next cycle retries it', async () => {
|
|
86
|
+
writeFileSync(join(dir, 'fail'), '1');
|
|
87
|
+
const failed = await deliver({ env, items: [orderMail({ ...order, turn: 9 })], mailed: [] });
|
|
88
|
+
expect(failed.sent).toBe(0);
|
|
89
|
+
expect(failed.mailed).toEqual([]);
|
|
90
|
+
expect(failed.error).toBeTruthy();
|
|
91
|
+
});
|
|
92
|
+
});
|
|
@@ -109,13 +109,18 @@ export function ConversePage({ client, classNames, meeting, createIO, savedLink
|
|
|
109
109
|
return (
|
|
110
110
|
<div className={cx('root')}>
|
|
111
111
|
{live ? (
|
|
112
|
-
<
|
|
113
|
-
{
|
|
114
|
-
|
|
112
|
+
<div className="flex items-center justify-between gap-3" data-testid="converse-live-row">
|
|
113
|
+
<p className={cx('muted')} role="status" aria-live="polite" data-testid="converse-status">{status}</p>
|
|
114
|
+
<button type="button" onClick={() => void onEnd()} disabled={state.phase === 'ending'} className={cx('secondary')} data-testid="converse-end">
|
|
115
|
+
{state.phase === 'ending' ? 'Saving…' : 'End and save'}
|
|
116
|
+
</button>
|
|
117
|
+
</div>
|
|
115
118
|
) : (
|
|
116
|
-
|
|
119
|
+
<>
|
|
120
|
+
<button type="button" onClick={() => void onStart()} className={cx('talk')} data-testid="converse-start">Start talking</button>
|
|
121
|
+
<p className={cx('muted')} role="status" aria-live="polite" data-testid="converse-status">{status}</p>
|
|
122
|
+
</>
|
|
117
123
|
)}
|
|
118
|
-
<p className={cx('muted')} role="status" aria-live="polite" data-testid="converse-status">{status}</p>
|
|
119
124
|
{startError || state.error ? <div className={cx('error')} role="alert">{startError ?? state.error}</div> : null}
|
|
120
125
|
{state.relayNotice ? (
|
|
121
126
|
<div className={cx('muted')} role="status" data-testid="converse-relay-notice">
|