@cmdless/ui 0.0.5 → 0.0.6

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/README.md CHANGED
@@ -4,7 +4,7 @@ One-shot commands for cmdless UI. Each shows one thing on a host (through `UIHos
4
4
 
5
5
  ```
6
6
  npx @cmdless/ui window url https://example.com
7
- npx @cmdless/ui dialog question "Continue?"
7
+ npx @cmdless/ui dialog question "Deploy to production?" --detail "3 services will restart." --button Deploy --button Cancel --cancel 1 --checkbox "Don't ask again"
8
8
  npx @cmdless/ui card samples/approval.card.json
9
9
  npx @cmdless/ui form samples/settings.schema.json --ui-schema samples/settings.ui.json --data samples/settings.data.json
10
10
  npx @cmdless/ui elicit samples/elicitation.json
@@ -12,7 +12,7 @@ npx @cmdless/ui permission samples/permission.json
12
12
  ```
13
13
 
14
14
  - `window <url|file> <source>` — show a window, and print the value it ends with (its renderer's resolve, or the URL a `--redirect` caught). Options: `--width`, `--height`, `--redirect`, `--external`, `--title`.
15
- - `dialog <type> <message>` — show a message box, and print the button that was chosen.
15
+ - `dialog <type> <message>` — show a message box, and print what was chosen: `{ response, checkboxChecked }`, where `response` is the button's index. `--detail` adds smaller text under the message, `--button <label>` (repeated) sets the buttons in order (just OK without any), `--default`/`--cancel <index>` pick what Enter and Escape choose, and `--checkbox <label>` (with `--checked` to start it ticked) adds a checkbox.
16
16
  - `card <file>` — show an [Adaptive Card](https://adaptivecards.io) (already expanded: no `${}` bindings), and print the `Action.Submit` chosen on it as JSON (`{ action, inputs }`); closing it prints nothing and exits 1. Links open in the browser; `Action.Execute` (an event for a long-lived card, through `UIHost`) isn't printed. Options: `--host-config`, `--width`, `--height`, `--title`.
17
17
  - `form <schema>` — show a JSON Schema form ([react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/), in Mantine), and print the data it was submitted with; cancelling prints nothing and exits 1. Options: `--ui-schema`, `--data`, `--submit-text`, `--width`, `--height`, `--title`.
18
18
  - `elicit <file>` — ask an elicitation (MCP's or ACP's, form mode: `{ message, requestedSchema }`) as a card with the schema as a form, and print its result: `{ action: "accept", content }`, `{ action: "decline" }`, or `{ action: "cancel" }` if it's closed.
package/dist/bin.js CHANGED
@@ -5,60 +5,69 @@ import { types } from '@cmdless/ui-sdk';
5
5
  import { runAsPackage, UIHost } from '@cmdless/ui-sdk/node';
6
6
  // how a one-shot command prints the value it ended with
7
7
  const binOutput = (value) => typeof value === 'string' ? value : JSON.stringify(value);
8
- const hostOptions = ({ app, root, timeout }) => ({ app, cmdlessRoot: root, timeoutMs: timeout });
8
+ // the options every command takes for its host
9
+ const onHost = (command) => command
10
+ .option('--app <name>', 'App name: the host to show it on, joined if it is already running')
11
+ .option('--root <path>', 'cmdless root to run the host from')
12
+ .option('--timeout <ms>', 'How long the host gets to start', Number);
13
+ // the options a command showing a window takes for how it looks
14
+ const inWindow = (command, title = 'Title of the window') => command
15
+ .option('--width <number>', 'Width of the window', Number)
16
+ .option('--height <number>', 'Height of the window', Number)
17
+ .option('--title <title>', title);
18
+ // a command's options split in two: the host's, as UIHost wants them, and
19
+ // the rest
20
+ function hostFrom({ app, root, timeout, ...rest }) {
21
+ const host = { app, cmdlessRoot: root, timeoutMs: timeout };
22
+ return [host, rest];
23
+ }
9
24
  const program = new Command().name('ui').enablePositionalOptions();
10
25
  // shows a window on a host - this one's own, unless --app names one to join -
11
26
  // and prints the value it ends with
12
- program
27
+ inWindow(onHost(program
13
28
  .command('window').description('Show a window, and print the value it ends with')
14
29
  .addArgument(new Argument('<type>', 'Source type to show in the window').choices(types.ShowTypes))
15
- .argument('<source>', 'File or URL to open in the window')
16
- .option('--app <name>', 'App name: the host to show it on, joined if it is already running')
17
- .option('--root <path>', 'cmdless root to run the host from')
18
- .option('--timeout <ms>', 'How long the host gets to start', Number)
19
- .option('--width <number>', 'Width of the window', Number)
20
- .option('--height <number>', 'Height of the window', Number)
30
+ .argument('<source>', 'File or URL to open in the window')), 'Title of the window, kept whatever the page calls itself')
21
31
  .option('--redirect <prefix>', 'End the window when it navigates to a URL starting with this, resolving to that URL')
22
32
  .option('--external', 'Show a third party\'s pages: no preload, a browser user agent, popups as child windows')
23
- .option('--title <title>', 'Title of the window, kept whatever the page calls itself')
24
33
  .action(async (type, source, options) => {
25
- const { app, root, timeout, width, height, title, ...page } = options;
26
- const value = await UIHost.showWindow(hostOptions({ app, root, timeout }), { type, source, ...page, window: { width, height, title } });
27
- process.stdout.write(binOutput(value));
34
+ const [host, { width, height, title, ...page }] = hostFrom(options);
35
+ process.stdout.write(binOutput(await UIHost.showWindow({ type, source, ...page, window: { width, height, title } }, host)));
28
36
  });
29
- // shows a message box on a host, and prints what was chosen
30
- program
37
+ // --button can be given more than once, each adding a button
38
+ const collect = (value, previous = []) => [...previous, value];
39
+ // shows a message box on a host, and prints what was chosen: the button's
40
+ // index, and whether the checkbox ended ticked
41
+ onHost(program
31
42
  .command('dialog').description('Show a message box, and print the button that was chosen')
32
43
  .addArgument(new Argument('<type>', 'Type of message').choices(types.MessageBoxTypes))
33
44
  .argument('<message>', 'Message to show')
34
- .option('--app <name>', 'App name: the host to show it on, joined if it is already running')
35
- .option('--root <path>', 'cmdless root to run the host from')
36
- .option('--timeout <ms>', 'How long the host gets to start', Number)
45
+ .option('--detail <text>', 'Smaller text under the message')
46
+ .option('--button <label>', 'A button to choose from, in order - repeat for more (default: OK)', collect)
47
+ .option('--default <index>', 'Index of the button Enter chooses', Number)
48
+ .option('--cancel <index>', 'Index of the button Escape (or closing it) chooses', Number)
49
+ .option('--checkbox <label>', 'A checkbox under the message')
50
+ .option('--checked', 'Start the checkbox ticked'))
37
51
  .action(async (type, message, options) => {
38
- const value = await UIHost.showDialog(hostOptions(options), { type, message });
52
+ const [host, { detail, button: buttons, default: defaultId, cancel: cancelId, checkbox: checkboxLabel, checked: checkboxChecked }] = hostFrom(options);
53
+ const value = await UIHost.showDialog({ type, message, detail, buttons, defaultId, cancelId, checkboxLabel, checkboxChecked }, host);
39
54
  process.stdout.write(binOutput(value));
40
55
  });
41
56
  // a JSON file's contents
42
57
  const readJson = async (file) => JSON.parse(await readFile(file, 'utf8'));
43
58
  // shows an Adaptive Card on a host, and prints the Action.Submit chosen on
44
59
  // it - nothing, and exit code 1, if it was closed instead
45
- program
60
+ inWindow(onHost(program
46
61
  .command('card').description('Show an Adaptive Card, and print the Submit action chosen on it with its inputs')
47
62
  .argument('<file>', 'Adaptive Card JSON file (already expanded: no ${} bindings)')
48
- .option('--host-config <file>', 'Adaptive Cards host config JSON file')
49
- .option('--app <name>', 'App name: the host to show it on, joined if it is already running')
50
- .option('--root <path>', 'cmdless root to run the host from')
51
- .option('--timeout <ms>', 'How long the host gets to start', Number)
52
- .option('--width <number>', 'Width of the window', Number)
53
- .option('--height <number>', 'Height of the window', Number)
54
- .option('--title <title>', 'Title of the window')
63
+ .option('--host-config <file>', 'Adaptive Cards host config JSON file')))
55
64
  .action(async (file, options) => {
56
- const { app, root, timeout, hostConfig, ...window } = options;
57
- const value = await UIHost.showCard(hostOptions({ app, root, timeout }), {
65
+ const [host, { hostConfig, ...window }] = hostFrom(options);
66
+ const value = await UIHost.showCard({
58
67
  window,
59
68
  card: await readJson(file),
60
69
  hostConfig: hostConfig ? await readJson(hostConfig) : undefined,
61
- });
70
+ }, host);
62
71
  if (value === undefined)
63
72
  process.exitCode = 1;
64
73
  else
@@ -66,27 +75,21 @@ program
66
75
  });
67
76
  // shows a JSON Schema form on a host, and prints the data it was submitted
68
77
  // with - nothing, and exit code 1, if it was cancelled
69
- program
78
+ inWindow(onHost(program
70
79
  .command('form').description('Show a JSON Schema form, and print the data it was submitted with')
71
80
  .argument('<schema>', 'JSON Schema file')
72
81
  .option('--ui-schema <file>', 'react-jsonschema-form uiSchema JSON file')
73
82
  .option('--data <file>', 'JSON file of the values to start with')
74
- .option('--submit-text <text>', 'What the submit button says')
75
- .option('--app <name>', 'App name: the host to show it on, joined if it is already running')
76
- .option('--root <path>', 'cmdless root to run the host from')
77
- .option('--timeout <ms>', 'How long the host gets to start', Number)
78
- .option('--width <number>', 'Width of the window', Number)
79
- .option('--height <number>', 'Height of the window', Number)
80
- .option('--title <title>', 'Title of the window')
83
+ .option('--submit-text <text>', 'What the submit button says')))
81
84
  .action(async (schema, options) => {
82
- const { app, root, timeout, uiSchema, data, submitText, ...window } = options;
83
- const value = await UIHost.showForm(hostOptions({ app, root, timeout }), {
85
+ const [host, { uiSchema, data, submitText, ...window }] = hostFrom(options);
86
+ const value = await UIHost.showForm({
84
87
  window,
85
88
  submitText,
86
89
  schema: await readJson(schema),
87
90
  uiSchema: uiSchema ? await readJson(uiSchema) : undefined,
88
91
  formData: data ? await readJson(data) : undefined,
89
- });
92
+ }, host);
90
93
  if (value === undefined)
91
94
  process.exitCode = 1;
92
95
  else
@@ -94,35 +97,23 @@ program
94
97
  });
95
98
  // asks an elicitation (MCP's or ACP's, form mode) as a card, and prints its
96
99
  // answer: { action: accept, content } or { action: decline | cancel }
97
- program
100
+ inWindow(onHost(program
98
101
  .command('elicit').description('Ask an elicitation as a card, and print its result')
99
- .argument('<file>', 'JSON file of the request: { message, requestedSchema }')
100
- .option('--app <name>', 'App name: the host to show it on, joined if it is already running')
101
- .option('--root <path>', 'cmdless root to run the host from')
102
- .option('--timeout <ms>', 'How long the host gets to start', Number)
103
- .option('--width <number>', 'Width of the window', Number)
104
- .option('--height <number>', 'Height of the window', Number)
105
- .option('--title <title>', 'Title of the window')
102
+ .argument('<file>', 'JSON file of the request: { message, requestedSchema }')))
106
103
  .action(async (file, options) => {
107
- const { app, root, timeout, ...window } = options;
104
+ const [host, window] = hostFrom(options);
108
105
  const request = await readJson(file);
109
- process.stdout.write(binOutput(await UIHost.showElicitation(hostOptions({ app, root, timeout }), { ...request, window })));
106
+ process.stdout.write(binOutput(await UIHost.showElicitation({ ...request, window }, host)));
110
107
  });
111
108
  // asks a permission request (ACP's) as a card, and prints its outcome:
112
109
  // { outcome: selected, optionId } or { outcome: cancelled }
113
- program
110
+ inWindow(onHost(program
114
111
  .command('permission').description('Ask a permission request as a card, and print its outcome')
115
- .argument('<file>', 'JSON file of the request: { title, description?, options: [{ optionId, name, kind }] }')
116
- .option('--app <name>', 'App name: the host to show it on, joined if it is already running')
117
- .option('--root <path>', 'cmdless root to run the host from')
118
- .option('--timeout <ms>', 'How long the host gets to start', Number)
119
- .option('--width <number>', 'Width of the window', Number)
120
- .option('--height <number>', 'Height of the window', Number)
121
- .option('--title <title>', 'Title of the window')
112
+ .argument('<file>', 'JSON file of the request: { title, description?, options: [{ optionId, name, kind }] }')))
122
113
  .action(async (file, options) => {
123
- const { app, root, timeout, ...window } = options;
114
+ const [host, window] = hostFrom(options);
124
115
  const request = await readJson(file);
125
- process.stdout.write(binOutput(await UIHost.showPermission(hostOptions({ app, root, timeout }), { ...request, window })));
116
+ process.stdout.write(binOutput(await UIHost.showPermission({ ...request, window }, host)));
126
117
  });
127
118
  // runs a package's bin from cmdless's own package cache, installing it the
128
119
  // first time, and prints what it printed
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG5D,wDAAwD;AACxD,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAOhG,MAAM,WAAW,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAc,EAAqB,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,IAA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Q,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAoB,IAAI,CAAC,CAAC;IACxD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,MAAM,CAAC,cAAc,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7F,CAAC,CAAC,CAAC;AAEL,2EAA2E;AAC3E,yCAAyC;AACzC,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,mFAAmF,CAAC;KACnH,QAAQ,CAAC,aAAa,EAAE,yDAAyD,CAAC;KAClF,QAAQ,CAAC,WAAW,EAAE,kCAAkC,CAAC;KACzD,kBAAkB,EAAE;KACpB,kBAAkB,EAAE;KACpB,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,IAAc,EAAE,EAAE;IAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;AAChE,CAAC,CAAC,CAAC;AAEL,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cmdless/ui",
3
3
  "description": "One-shot commands for cmdless UI: show a window or a dialog, and print what it ended with.",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "author": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "commander": "15.0.0",
30
- "@cmdless/ui-sdk": "0.0.5"
30
+ "@cmdless/ui-sdk": "0.0.6"
31
31
  },
32
32
  "devDependencies": {}
33
33
  }