@chatlychat/cli 0.3.0 → 0.4.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.
@@ -0,0 +1,80 @@
1
+ /**
2
+ * The scripted server, the frame fixture and the deps both relay specs drive.
3
+ *
4
+ * Extracted when `listen-relay.spec.ts` crossed the 650-line ceiling and had
5
+ * to become two files. It is a FIXTURE module and not a spec: nothing here
6
+ * asserts anything, and both specs' caveats live on them rather than here.
7
+ *
8
+ * ── The one thing worth repeating here ───────────────────────────────────
9
+ *
10
+ * The "server" is a fake `fetch` under the REAL `ChatlyClient`, so the SDK's
11
+ * transport, retries and error mapping all run. What it CANNOT do is tell you
12
+ * the server answers this way: `server()` answers what
13
+ * `RELAY-SERVER-SPEC.md` says, which is the contract and not an observation.
14
+ * A fake that agrees with whatever it is asked is how four mobile SDKs
15
+ * shipped a realtime client that could not connect.
16
+ *
17
+ * (Original header follows.)
18
+ *
19
+ * `chatly listen --relay` — the CLI half, against a scripted server.
20
+ *
21
+ * ═══ WHAT THIS CAN AND CANNOT PROVE ═══════════════════════════════════════
22
+ *
23
+ * The server half is `apps/api/src/modules/relay/`, but this spec does not run
24
+ * it: the "server" here is a fake `fetch` under the REAL `ChatlyClient` — the
25
+ * SDK's transport, retries and error mapping all run — answering the routes
26
+ * `RELAY-SERVER-SPEC.md` defines.
27
+ * That proves what the CLI SENDS (the attach body, the answer it posts, the
28
+ * request it makes to localhost and its signature) and how it reacts to each
29
+ * answer the spec allows. It cannot prove the server will answer that way,
30
+ * and nothing here should be read as evidence that a relay works end to end.
31
+ *
32
+ * Assertions are on the requests the CLI made, not on a canned response it
33
+ * echoed: a fake that agrees with whatever it is asked is how four mobile
34
+ * SDKs shipped a realtime client that could not connect.
35
+ */
36
+ import { ChatlyClient } from '@chatlychat/sdk-node';
37
+ import { type RelayFrame, type RelayOptions } from './listen-relay.js';
38
+ import type { ListenDeps } from './listen-core.js';
39
+ export declare const NOW_MS = 1760000000123;
40
+ export declare const SESSION = "rs_1";
41
+ export declare const TOOL = "tool_orders";
42
+ export declare const CARD = "card_billing";
43
+ export declare const CANVAS = "ch_web";
44
+ export declare const SECRET = "tool-secret-from-the-form";
45
+ export interface Call {
46
+ readonly url: string;
47
+ readonly method: string;
48
+ readonly headers: Record<string, string>;
49
+ readonly body: string | null;
50
+ }
51
+ export declare function headersOf(init?: RequestInit): Record<string, string>;
52
+ export declare function frame(over?: Partial<RelayFrame>): RelayFrame;
53
+ export type Answer = {
54
+ status: number;
55
+ body?: unknown;
56
+ code?: string;
57
+ };
58
+ /** A scripted relay server: attach, a queue of poll answers, answer + detach. */
59
+ export declare function server(opts?: {
60
+ attach?: Answer;
61
+ polls?: ReadonlyArray<Answer>;
62
+ }): {
63
+ chatly: ChatlyClient;
64
+ calls: Call[];
65
+ };
66
+ /** The local handler: records every forward, answers as scripted. */
67
+ export declare function harness(over?: {
68
+ respond?: (call: Call) => Response | Promise<Response>;
69
+ now?: () => number;
70
+ maxPolls?: number;
71
+ signal?: AbortSignal;
72
+ }): {
73
+ deps: ListenDeps;
74
+ forwards: Call[];
75
+ out: string[];
76
+ err: string[];
77
+ };
78
+ export declare function options(argv: string): RelayOptions;
79
+ export declare const ALL = "--tool tool_orders --card card_billing --canvas ch_web --forward-to http://localhost:3000";
80
+ //# sourceMappingURL=listen-relay-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listen-relay-harness.d.ts","sourceRoot":"","sources":["../../src/commands/listen-relay-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,eAAO,MAAM,MAAM,gBAAoB,CAAC;AACxC,eAAO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EAAE,WAAW,CAAC;CACjB,GACL;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAA;CAAE,CAiCtE;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAElD;AAED,eAAO,MAAM,GAAG,8FAAwF,CAAC"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * The scripted server, the frame fixture and the deps both relay specs drive.
3
+ *
4
+ * Extracted when `listen-relay.spec.ts` crossed the 650-line ceiling and had
5
+ * to become two files. It is a FIXTURE module and not a spec: nothing here
6
+ * asserts anything, and both specs' caveats live on them rather than here.
7
+ *
8
+ * ── The one thing worth repeating here ───────────────────────────────────
9
+ *
10
+ * The "server" is a fake `fetch` under the REAL `ChatlyClient`, so the SDK's
11
+ * transport, retries and error mapping all run. What it CANNOT do is tell you
12
+ * the server answers this way: `server()` answers what
13
+ * `RELAY-SERVER-SPEC.md` says, which is the contract and not an observation.
14
+ * A fake that agrees with whatever it is asked is how four mobile SDKs
15
+ * shipped a realtime client that could not connect.
16
+ *
17
+ * (Original header follows.)
18
+ *
19
+ * `chatly listen --relay` — the CLI half, against a scripted server.
20
+ *
21
+ * ═══ WHAT THIS CAN AND CANNOT PROVE ═══════════════════════════════════════
22
+ *
23
+ * The server half is `apps/api/src/modules/relay/`, but this spec does not run
24
+ * it: the "server" here is a fake `fetch` under the REAL `ChatlyClient` — the
25
+ * SDK's transport, retries and error mapping all run — answering the routes
26
+ * `RELAY-SERVER-SPEC.md` defines.
27
+ * That proves what the CLI SENDS (the attach body, the answer it posts, the
28
+ * request it makes to localhost and its signature) and how it reacts to each
29
+ * answer the spec allows. It cannot prove the server will answer that way,
30
+ * and nothing here should be read as evidence that a relay works end to end.
31
+ *
32
+ * Assertions are on the requests the CLI made, not on a canned response it
33
+ * echoed: a fake that agrees with whatever it is asked is how four mobile
34
+ * SDKs shipped a realtime client that could not connect.
35
+ */
36
+ import { ChatlyClient } from '@chatlychat/sdk-node';
37
+ import { parseRelayOptions, } from './listen-relay.js';
38
+ import { parseArgs } from '../args.js';
39
+ export const NOW_MS = 1_760_000_000_123;
40
+ export const SESSION = 'rs_1';
41
+ export const TOOL = 'tool_orders';
42
+ export const CARD = 'card_billing';
43
+ export const CANVAS = 'ch_web';
44
+ export const SECRET = 'tool-secret-from-the-form';
45
+ export function headersOf(init) {
46
+ const h = init?.headers;
47
+ if (h instanceof Headers) {
48
+ return Object.fromEntries(h.entries());
49
+ }
50
+ return { ...(h ?? {}) };
51
+ }
52
+ export function frame(over = {}) {
53
+ return {
54
+ id: 'fr_1',
55
+ kind: 'ai_tool_call',
56
+ targetId: TOOL,
57
+ method: 'GET',
58
+ path: '/orders/42?expand=items',
59
+ headers: {
60
+ 'x-chatly-contact-external-id': 'u_7',
61
+ 'x-chatly-identity-verified': 'true',
62
+ 'x-chatly-conversation-id': 'c_1',
63
+ },
64
+ body: '',
65
+ deadlineAt: new Date(NOW_MS + 30_000).toISOString(),
66
+ ...over,
67
+ };
68
+ }
69
+ /** A scripted relay server: attach, a queue of poll answers, answer + detach. */
70
+ export function server(opts = {}) {
71
+ const calls = [];
72
+ let poll = 0;
73
+ const fetchFn = (async (url, init) => {
74
+ const href = String(url);
75
+ const method = init?.method ?? 'GET';
76
+ calls.push({
77
+ url: href,
78
+ method,
79
+ headers: headersOf(init),
80
+ body: typeof init?.body === 'string' ? init.body : null,
81
+ });
82
+ const path = new URL(href).pathname;
83
+ const reply = (a) => {
84
+ if (a.status === 204) {
85
+ return new Response(null, { status: 204 });
86
+ }
87
+ const body = a.code === undefined ? (a.body ?? {}) : { error: { code: a.code, message: a.code } };
88
+ return new Response(JSON.stringify(body), {
89
+ status: a.status,
90
+ headers: { 'content-type': 'application/json' },
91
+ });
92
+ };
93
+ if (method === 'POST' && path === '/v1/relay-sessions') {
94
+ return reply(opts.attach ?? {
95
+ status: 201,
96
+ body: { id: SESSION, attachedBy: { displayName: 'key "laptop" (Ada)' } },
97
+ });
98
+ }
99
+ if (method === 'GET' && path === `/v1/relay-sessions/${SESSION}/frames`) {
100
+ const list = opts.polls ?? [{ status: 200, body: { frames: [] } }];
101
+ const a = list[Math.min(poll, list.length - 1)] ?? { status: 200, body: { frames: [] } };
102
+ poll += 1;
103
+ return reply(a);
104
+ }
105
+ if (method === 'POST' && path.startsWith(`/v1/relay-sessions/${SESSION}/frames/`)) {
106
+ return reply({ status: 202, body: { accepted: true } });
107
+ }
108
+ if (method === 'DELETE' && path === `/v1/relay-sessions/${SESSION}`) {
109
+ return reply({ status: 204 });
110
+ }
111
+ return reply({ status: 599, body: { unexpected: path } });
112
+ });
113
+ return {
114
+ chatly: new ChatlyClient({
115
+ apiKey: 'ck_test',
116
+ apiUrl: 'https://api.test',
117
+ fetchFn,
118
+ sleepFn: async () => undefined,
119
+ retry: { attempts: 1 },
120
+ }),
121
+ calls,
122
+ };
123
+ }
124
+ /** The local handler: records every forward, answers as scripted. */
125
+ export function harness(over = {}) {
126
+ const forwards = [];
127
+ const out = [];
128
+ const err = [];
129
+ const fetchFn = (async (url, init) => {
130
+ const call = {
131
+ url: String(url),
132
+ method: init?.method ?? 'GET',
133
+ headers: headersOf(init),
134
+ body: typeof init?.body === 'string' ? init.body : null,
135
+ };
136
+ forwards.push(call);
137
+ return over.respond === undefined
138
+ ? new Response('{"ok":true}', {
139
+ status: 200,
140
+ headers: { 'content-type': 'application/json' },
141
+ })
142
+ : over.respond(call);
143
+ });
144
+ return {
145
+ deps: {
146
+ fetchFn,
147
+ now: over.now ?? (() => NOW_MS),
148
+ sleep: async () => undefined,
149
+ signal: over.signal ?? new AbortController().signal,
150
+ out: (l) => out.push(l),
151
+ err: (l) => err.push(l),
152
+ maxPolls: over.maxPolls ?? 1,
153
+ },
154
+ forwards,
155
+ out,
156
+ err,
157
+ };
158
+ }
159
+ export function options(argv) {
160
+ return parseRelayOptions(parseArgs(['listen', '--relay', ...argv.split(' ').filter(Boolean)]));
161
+ }
162
+ export const ALL = `--tool ${TOOL} --card ${CARD} --canvas ${CANVAS} --forward-to http://localhost:3000`;
163
+ //# sourceMappingURL=listen-relay-harness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listen-relay-harness.js","sourceRoot":"","sources":["../../src/commands/listen-relay-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EACL,iBAAiB,GAGlB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,MAAM,CAAC,MAAM,MAAM,GAAG,iBAAiB,CAAC;AACxC,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC;AAC9B,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC;AAClC,MAAM,CAAC,MAAM,IAAI,GAAG,cAAc,CAAC;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;AAC/B,MAAM,CAAC,MAAM,MAAM,GAAG,2BAA2B,CAAC;AASlD,MAAM,UAAU,SAAS,CAAC,IAAkB;IAC1C,MAAM,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,YAAY,OAAO,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,EAAE,GAAI,CAAC,CAAC,IAAI,EAAE,CAA4B,EAAE,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,OAA4B,EAAE;IAClD,OAAO;QACL,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE;YAC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CAAC,aAAa,EAAE;gBAC1B,MAAM,EAAE,GAAG;gBACX,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;aAChD,CAAC;YACJ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAA4B,CAAC;IAC9B,OAAO;QACL,IAAI,EAAE;YACJ,OAAO;YACP,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;YAC/B,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,SAAS;YAC5B,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC,MAAM;YACnD,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YACvB,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC;SAC7B;QACD,QAAQ;QACR,GAAG;QACH,GAAG;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,OAAO,iBAAiB,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACjG,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,IAAI,WAAW,IAAI,aAAa,MAAM,qCAAqC,CAAC"}
package/dist/run.js CHANGED
@@ -27,7 +27,7 @@ import { HELP } from './help.js';
27
27
  * drifts — it said `0.1.0` while the published package was `0.1.2` — so
28
28
  * `cli.spec.ts` asserts the two agree and fails if they do not.
29
29
  */
30
- const VERSION = '0.3.0';
30
+ const VERSION = '0.4.1';
31
31
  /** Commands that need no credential. Everything else resolves a key first. */
32
32
  const UNAUTHENTICATED = new Set(['login', 'logout', 'help', 'version']);
33
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatlychat/cli",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "The Chatly command line — inspect conversations, send replies, read reports and call any API route from a terminal.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/chatlychat/chatly-cli#readme",
@@ -30,7 +30,7 @@
30
30
  "LICENSE"
31
31
  ],
32
32
  "dependencies": {
33
- "@chatlychat/sdk-node": "0.6.0"
33
+ "@chatlychat/sdk-node": "0.7.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "20.14.10",
@@ -41,8 +41,7 @@
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public",
44
- "registry": "https://registry.npmjs.org/",
45
- "provenance": true
44
+ "registry": "https://registry.npmjs.org/"
46
45
  },
47
46
  "engines": {
48
47
  "node": ">=20"