skydive-cli 0.2.0-beta.742 → 0.3.0-beta.764

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 (34) hide show
  1. package/CHANGELOG.md +37 -3
  2. package/dist/js/bin.mjs +5 -5
  3. package/dist/js/{boot-DhorgAxS.mjs → boot-Bs-IF23f.mjs} +115 -16
  4. package/dist/js/chat/tui/chunks/grammars/assets/bash.highlights.scm +56 -0
  5. package/dist/js/chat/tui/chunks/grammars/assets/bash.wasm +0 -0
  6. package/dist/js/chat/tui/chunks/grammars/assets/c.highlights.scm +81 -0
  7. package/dist/js/chat/tui/chunks/grammars/assets/c.wasm +0 -0
  8. package/dist/js/chat/tui/chunks/grammars/assets/cpp.highlights.scm +70 -0
  9. package/dist/js/chat/tui/chunks/grammars/assets/cpp.wasm +0 -0
  10. package/dist/js/chat/tui/chunks/grammars/assets/css.highlights.scm +76 -0
  11. package/dist/js/chat/tui/chunks/grammars/assets/css.wasm +0 -0
  12. package/dist/js/chat/tui/chunks/grammars/assets/go.highlights.scm +123 -0
  13. package/dist/js/chat/tui/chunks/grammars/assets/go.wasm +0 -0
  14. package/dist/js/chat/tui/chunks/grammars/assets/html.highlights.scm +13 -0
  15. package/dist/js/chat/tui/chunks/grammars/assets/html.wasm +0 -0
  16. package/dist/js/chat/tui/chunks/grammars/assets/java.highlights.scm +149 -0
  17. package/dist/js/chat/tui/chunks/grammars/assets/java.wasm +0 -0
  18. package/dist/js/chat/tui/chunks/grammars/assets/json.highlights.scm +16 -0
  19. package/dist/js/chat/tui/chunks/grammars/assets/json.wasm +0 -0
  20. package/dist/js/chat/tui/chunks/grammars/assets/lua.highlights.scm +201 -0
  21. package/dist/js/chat/tui/chunks/grammars/assets/lua.wasm +0 -0
  22. package/dist/js/chat/tui/chunks/grammars/assets/python.highlights.scm +137 -0
  23. package/dist/js/chat/tui/chunks/grammars/assets/python.wasm +0 -0
  24. package/dist/js/chat/tui/chunks/grammars/assets/ruby.highlights.scm +154 -0
  25. package/dist/js/chat/tui/chunks/grammars/assets/ruby.wasm +0 -0
  26. package/dist/js/chat/tui/chunks/grammars/assets/rust.highlights.scm +161 -0
  27. package/dist/js/chat/tui/chunks/grammars/assets/rust.wasm +0 -0
  28. package/dist/js/chat/tui/chunks/grammars/assets/toml.highlights.scm +53 -0
  29. package/dist/js/chat/tui/chunks/grammars/assets/toml.wasm +0 -0
  30. package/dist/js/chat/tui/chunks/grammars/assets/yaml.highlights.scm +79 -0
  31. package/dist/js/chat/tui/chunks/grammars/assets/yaml.wasm +0 -0
  32. package/dist/js/chat/tui/chunks/grammars/grammars.ts +146 -0
  33. package/dist/js/{install-Cv3sBZxr.mjs → install-DEZmJLGH.mjs} +1 -1
  34. package/package.json +1 -1
@@ -0,0 +1,154 @@
1
+ (identifier) @variable
2
+
3
+ ((identifier) @function.method
4
+ (#is-not? local))
5
+
6
+ [
7
+ "alias"
8
+ "and"
9
+ "begin"
10
+ "break"
11
+ "case"
12
+ "class"
13
+ "def"
14
+ "do"
15
+ "else"
16
+ "elsif"
17
+ "end"
18
+ "ensure"
19
+ "for"
20
+ "if"
21
+ "in"
22
+ "module"
23
+ "next"
24
+ "or"
25
+ "rescue"
26
+ "retry"
27
+ "return"
28
+ "then"
29
+ "unless"
30
+ "until"
31
+ "when"
32
+ "while"
33
+ "yield"
34
+ ] @keyword
35
+
36
+ ((identifier) @keyword
37
+ (#match? @keyword "^(private|protected|public)$"))
38
+
39
+ (constant) @constructor
40
+
41
+ ; Function calls
42
+
43
+ "defined?" @function.method.builtin
44
+
45
+ (call
46
+ method: [(identifier) (constant)] @function.method)
47
+
48
+ ((identifier) @function.method.builtin
49
+ (#eq? @function.method.builtin "require"))
50
+
51
+ ; Function definitions
52
+
53
+ (alias (identifier) @function.method)
54
+ (setter (identifier) @function.method)
55
+ (method name: [(identifier) (constant)] @function.method)
56
+ (singleton_method name: [(identifier) (constant)] @function.method)
57
+
58
+ ; Identifiers
59
+
60
+ [
61
+ (class_variable)
62
+ (instance_variable)
63
+ ] @property
64
+
65
+ ((identifier) @constant.builtin
66
+ (#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
67
+
68
+ (file) @constant.builtin
69
+ (line) @constant.builtin
70
+ (encoding) @constant.builtin
71
+
72
+ (hash_splat_nil
73
+ "**" @operator) @constant.builtin
74
+
75
+ ((constant) @constant
76
+ (#match? @constant "^[A-Z\\d_]+$"))
77
+
78
+ [
79
+ (self)
80
+ (super)
81
+ ] @variable.builtin
82
+
83
+ (block_parameter (identifier) @variable.parameter)
84
+ (block_parameters (identifier) @variable.parameter)
85
+ (destructured_parameter (identifier) @variable.parameter)
86
+ (hash_splat_parameter (identifier) @variable.parameter)
87
+ (lambda_parameters (identifier) @variable.parameter)
88
+ (method_parameters (identifier) @variable.parameter)
89
+ (splat_parameter (identifier) @variable.parameter)
90
+
91
+ (keyword_parameter name: (identifier) @variable.parameter)
92
+ (optional_parameter name: (identifier) @variable.parameter)
93
+
94
+ ; Literals
95
+
96
+ [
97
+ (string)
98
+ (bare_string)
99
+ (subshell)
100
+ (heredoc_body)
101
+ (heredoc_beginning)
102
+ ] @string
103
+
104
+ [
105
+ (simple_symbol)
106
+ (delimited_symbol)
107
+ (hash_key_symbol)
108
+ (bare_symbol)
109
+ ] @string.special.symbol
110
+
111
+ (regex) @string.special.regex
112
+ (escape_sequence) @escape
113
+
114
+ [
115
+ (integer)
116
+ (float)
117
+ ] @number
118
+
119
+ [
120
+ (nil)
121
+ (true)
122
+ (false)
123
+ ] @constant.builtin
124
+
125
+ (interpolation
126
+ "#{" @punctuation.special
127
+ "}" @punctuation.special) @embedded
128
+
129
+ (comment) @comment
130
+
131
+ ; Operators
132
+
133
+ [
134
+ "="
135
+ "=>"
136
+ "->"
137
+ ] @operator
138
+
139
+ [
140
+ ","
141
+ ";"
142
+ "."
143
+ ] @punctuation.delimiter
144
+
145
+ [
146
+ "("
147
+ ")"
148
+ "["
149
+ "]"
150
+ "{"
151
+ "}"
152
+ "%w("
153
+ "%i("
154
+ ] @punctuation.bracket
@@ -0,0 +1,161 @@
1
+ ; Identifiers
2
+
3
+ (type_identifier) @type
4
+ (primitive_type) @type.builtin
5
+ (field_identifier) @property
6
+
7
+ ; Identifier conventions
8
+
9
+ ; Assume all-caps names are constants
10
+ ((identifier) @constant
11
+ (#match? @constant "^[A-Z][A-Z\\d_]+$'"))
12
+
13
+ ; Assume uppercase names are enum constructors
14
+ ((identifier) @constructor
15
+ (#match? @constructor "^[A-Z]"))
16
+
17
+ ; Assume that uppercase names in paths are types
18
+ ((scoped_identifier
19
+ path: (identifier) @type)
20
+ (#match? @type "^[A-Z]"))
21
+ ((scoped_identifier
22
+ path: (scoped_identifier
23
+ name: (identifier) @type))
24
+ (#match? @type "^[A-Z]"))
25
+ ((scoped_type_identifier
26
+ path: (identifier) @type)
27
+ (#match? @type "^[A-Z]"))
28
+ ((scoped_type_identifier
29
+ path: (scoped_identifier
30
+ name: (identifier) @type))
31
+ (#match? @type "^[A-Z]"))
32
+
33
+ ; Assume all qualified names in struct patterns are enum constructors. (They're
34
+ ; either that, or struct names; highlighting both as constructors seems to be
35
+ ; the less glaring choice of error, visually.)
36
+ (struct_pattern
37
+ type: (scoped_type_identifier
38
+ name: (type_identifier) @constructor))
39
+
40
+ ; Function calls
41
+
42
+ (call_expression
43
+ function: (identifier) @function)
44
+ (call_expression
45
+ function: (field_expression
46
+ field: (field_identifier) @function.method))
47
+ (call_expression
48
+ function: (scoped_identifier
49
+ "::"
50
+ name: (identifier) @function))
51
+
52
+ (generic_function
53
+ function: (identifier) @function)
54
+ (generic_function
55
+ function: (scoped_identifier
56
+ name: (identifier) @function))
57
+ (generic_function
58
+ function: (field_expression
59
+ field: (field_identifier) @function.method))
60
+
61
+ (macro_invocation
62
+ macro: (identifier) @function.macro
63
+ "!" @function.macro)
64
+
65
+ ; Function definitions
66
+
67
+ (function_item (identifier) @function)
68
+ (function_signature_item (identifier) @function)
69
+
70
+ (line_comment) @comment
71
+ (block_comment) @comment
72
+
73
+ (line_comment (doc_comment)) @comment.documentation
74
+ (block_comment (doc_comment)) @comment.documentation
75
+
76
+ "(" @punctuation.bracket
77
+ ")" @punctuation.bracket
78
+ "[" @punctuation.bracket
79
+ "]" @punctuation.bracket
80
+ "{" @punctuation.bracket
81
+ "}" @punctuation.bracket
82
+
83
+ (type_arguments
84
+ "<" @punctuation.bracket
85
+ ">" @punctuation.bracket)
86
+ (type_parameters
87
+ "<" @punctuation.bracket
88
+ ">" @punctuation.bracket)
89
+
90
+ "::" @punctuation.delimiter
91
+ ":" @punctuation.delimiter
92
+ "." @punctuation.delimiter
93
+ "," @punctuation.delimiter
94
+ ";" @punctuation.delimiter
95
+
96
+ (parameter (identifier) @variable.parameter)
97
+
98
+ (lifetime (identifier) @label)
99
+
100
+ "as" @keyword
101
+ "async" @keyword
102
+ "await" @keyword
103
+ "break" @keyword
104
+ "const" @keyword
105
+ "continue" @keyword
106
+ "default" @keyword
107
+ "dyn" @keyword
108
+ "else" @keyword
109
+ "enum" @keyword
110
+ "extern" @keyword
111
+ "fn" @keyword
112
+ "for" @keyword
113
+ "gen" @keyword
114
+ "if" @keyword
115
+ "impl" @keyword
116
+ "in" @keyword
117
+ "let" @keyword
118
+ "loop" @keyword
119
+ "macro_rules!" @keyword
120
+ "match" @keyword
121
+ "mod" @keyword
122
+ "move" @keyword
123
+ "pub" @keyword
124
+ "raw" @keyword
125
+ "ref" @keyword
126
+ "return" @keyword
127
+ "static" @keyword
128
+ "struct" @keyword
129
+ "trait" @keyword
130
+ "type" @keyword
131
+ "union" @keyword
132
+ "unsafe" @keyword
133
+ "use" @keyword
134
+ "where" @keyword
135
+ "while" @keyword
136
+ "yield" @keyword
137
+ (crate) @keyword
138
+ (mutable_specifier) @keyword
139
+ (use_list (self) @keyword)
140
+ (scoped_use_list (self) @keyword)
141
+ (scoped_identifier (self) @keyword)
142
+ (super) @keyword
143
+
144
+ (self) @variable.builtin
145
+
146
+ (char_literal) @string
147
+ (string_literal) @string
148
+ (raw_string_literal) @string
149
+
150
+ (boolean_literal) @constant.builtin
151
+ (integer_literal) @constant.builtin
152
+ (float_literal) @constant.builtin
153
+
154
+ (escape_sequence) @escape
155
+
156
+ (attribute_item) @attribute
157
+ (inner_attribute_item) @attribute
158
+
159
+ "*" @operator
160
+ "&" @operator
161
+ "'" @operator
@@ -0,0 +1,53 @@
1
+ ; Properties
2
+ ;-----------
3
+
4
+ (bare_key) @type
5
+
6
+ (quoted_key) @string
7
+
8
+ (pair
9
+ (bare_key)) @property
10
+
11
+ (pair
12
+ (dotted_key
13
+ (bare_key) @property))
14
+
15
+ ; Literals
16
+ ;---------
17
+
18
+ (boolean) @boolean
19
+
20
+ (comment) @comment
21
+
22
+ (string) @string
23
+
24
+ [
25
+ (integer)
26
+ (float)
27
+ ] @number
28
+
29
+ [
30
+ (offset_date_time)
31
+ (local_date_time)
32
+ (local_date)
33
+ (local_time)
34
+ ] @string.special
35
+
36
+ ; Punctuation
37
+ ;------------
38
+
39
+ [
40
+ "."
41
+ ","
42
+ ] @punctuation.delimiter
43
+
44
+ "=" @operator
45
+
46
+ [
47
+ "["
48
+ "]"
49
+ "[["
50
+ "]]"
51
+ "{"
52
+ "}"
53
+ ] @punctuation.bracket
@@ -0,0 +1,79 @@
1
+ (boolean_scalar) @boolean
2
+
3
+ (null_scalar) @constant.builtin
4
+
5
+ [
6
+ (double_quote_scalar)
7
+ (single_quote_scalar)
8
+ (block_scalar)
9
+ (string_scalar)
10
+ ] @string
11
+
12
+ [
13
+ (integer_scalar)
14
+ (float_scalar)
15
+ ] @number
16
+
17
+ (comment) @comment
18
+
19
+ [
20
+ (anchor_name)
21
+ (alias_name)
22
+ ] @label
23
+
24
+ (tag) @type
25
+
26
+ [
27
+ (yaml_directive)
28
+ (tag_directive)
29
+ (reserved_directive)
30
+ ] @attribute
31
+
32
+ (block_mapping_pair
33
+ key: (flow_node
34
+ [
35
+ (double_quote_scalar)
36
+ (single_quote_scalar)
37
+ ] @property))
38
+
39
+ (block_mapping_pair
40
+ key: (flow_node
41
+ (plain_scalar
42
+ (string_scalar) @property)))
43
+
44
+ (flow_mapping
45
+ (_
46
+ key: (flow_node
47
+ [
48
+ (double_quote_scalar)
49
+ (single_quote_scalar)
50
+ ] @property)))
51
+
52
+ (flow_mapping
53
+ (_
54
+ key: (flow_node
55
+ (plain_scalar
56
+ (string_scalar) @property))))
57
+
58
+ [
59
+ ","
60
+ "-"
61
+ ":"
62
+ ">"
63
+ "?"
64
+ "|"
65
+ ] @punctuation.delimiter
66
+
67
+ [
68
+ "["
69
+ "]"
70
+ "{"
71
+ "}"
72
+ ] @punctuation.bracket
73
+
74
+ [
75
+ "*"
76
+ "&"
77
+ "---"
78
+ "..."
79
+ ] @punctuation.special
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Extra tree-sitter grammars for the chat TUI, on top of OpenTUI's five
3
+ * bundled ones (javascript, typescript, markdown, zig). Without these, every
4
+ * fenced code block and every diff/file-review pane in a non-js/ts language
5
+ * renders unhighlighted.
6
+ *
7
+ * Each entry pairs a prebuilt `.wasm` parser with its co-versioned
8
+ * `highlights.scm` query. `scripts/fetch-grammars.ts` vendors both from the
9
+ * same npm package into ./assets and records the versions in manifest.json —
10
+ * grammar and query MUST match or `Query` compilation throws at runtime.
11
+ *
12
+ * ── Why the `with { type: 'file' }` imports ──────────────────────────────
13
+ * The chat TUI always runs under Bun (the `chat` command re-execs itself
14
+ * under Bun before it touches OpenTUI). Under Bun these imports resolve to a
15
+ * real filesystem path in dev, and `bun build --compile` embeds each asset
16
+ * into the binary's virtual filesystem and rewrites the path to `/$bunfs`.
17
+ * OpenTUI loads its own bundled grammars exactly this way.
18
+ *
19
+ * Rolldown (tsdown, the npm build) CANNOT parse `.wasm`/`.scm` as modules, so
20
+ * this file is externalized in tsdown.config.mts and copied verbatim into
21
+ * dist/js/chat/tui/chunks/grammars/ alongside its assets; the bundled
22
+ * bin.mjs reaches it through a dynamic import that Bun resolves at runtime.
23
+ * Keep every asset reference a static `with { type: 'file' }` import so the
24
+ * compiled binary discovers and embeds them — a runtime `Bun.file(path)` on
25
+ * a computed path would not be embedded.
26
+ */
27
+ import type { FiletypeParserOptions } from '@opentui/core';
28
+
29
+ import python_wasm from './assets/python.wasm' with { type: 'file' };
30
+ import python_scm from './assets/python.highlights.scm' with { type: 'file' };
31
+ import bash_wasm from './assets/bash.wasm' with { type: 'file' };
32
+ import bash_scm from './assets/bash.highlights.scm' with { type: 'file' };
33
+ import go_wasm from './assets/go.wasm' with { type: 'file' };
34
+ import go_scm from './assets/go.highlights.scm' with { type: 'file' };
35
+ import rust_wasm from './assets/rust.wasm' with { type: 'file' };
36
+ import rust_scm from './assets/rust.highlights.scm' with { type: 'file' };
37
+ import c_wasm from './assets/c.wasm' with { type: 'file' };
38
+ import c_scm from './assets/c.highlights.scm' with { type: 'file' };
39
+ import cpp_wasm from './assets/cpp.wasm' with { type: 'file' };
40
+ import cpp_scm from './assets/cpp.highlights.scm' with { type: 'file' };
41
+ import java_wasm from './assets/java.wasm' with { type: 'file' };
42
+ import java_scm from './assets/java.highlights.scm' with { type: 'file' };
43
+ import ruby_wasm from './assets/ruby.wasm' with { type: 'file' };
44
+ import ruby_scm from './assets/ruby.highlights.scm' with { type: 'file' };
45
+ import css_wasm from './assets/css.wasm' with { type: 'file' };
46
+ import css_scm from './assets/css.highlights.scm' with { type: 'file' };
47
+ import html_wasm from './assets/html.wasm' with { type: 'file' };
48
+ import html_scm from './assets/html.highlights.scm' with { type: 'file' };
49
+ import json_wasm from './assets/json.wasm' with { type: 'file' };
50
+ import json_scm from './assets/json.highlights.scm' with { type: 'file' };
51
+ import yaml_wasm from './assets/yaml.wasm' with { type: 'file' };
52
+ import yaml_scm from './assets/yaml.highlights.scm' with { type: 'file' };
53
+ import toml_wasm from './assets/toml.wasm' with { type: 'file' };
54
+ import toml_scm from './assets/toml.highlights.scm' with { type: 'file' };
55
+ import lua_wasm from './assets/lua.wasm' with { type: 'file' };
56
+ import lua_scm from './assets/lua.highlights.scm' with { type: 'file' };
57
+
58
+ /**
59
+ * `aliases` are the alternate names a code fence or file extension may use
60
+ * for the language (```sh → bash, ```py → python). OpenTUI's markdown
61
+ * injection resolver looks up a fence's info-string against each parser's
62
+ * registered aliases, so listing them here is what makes ```sh highlight.
63
+ * The canonical `filetype` need not be repeated in its own alias list.
64
+ */
65
+ export const EXTRA_GRAMMARS: FiletypeParserOptions[] = [
66
+ {
67
+ filetype: 'python',
68
+ aliases: ['py', 'python3'],
69
+ wasm: python_wasm,
70
+ queries: { highlights: [python_scm] },
71
+ },
72
+ {
73
+ filetype: 'bash',
74
+ aliases: ['sh', 'shell', 'zsh', 'shellscript'],
75
+ wasm: bash_wasm,
76
+ queries: { highlights: [bash_scm] },
77
+ },
78
+ {
79
+ filetype: 'go',
80
+ aliases: ['golang'],
81
+ wasm: go_wasm,
82
+ queries: { highlights: [go_scm] },
83
+ },
84
+ {
85
+ filetype: 'rust',
86
+ aliases: ['rs'],
87
+ wasm: rust_wasm,
88
+ queries: { highlights: [rust_scm] },
89
+ },
90
+ {
91
+ filetype: 'c',
92
+ aliases: ['h'],
93
+ wasm: c_wasm,
94
+ queries: { highlights: [c_scm] },
95
+ },
96
+ {
97
+ filetype: 'cpp',
98
+ aliases: ['c++', 'cc', 'cxx', 'hpp', 'hxx', 'hh'],
99
+ wasm: cpp_wasm,
100
+ queries: { highlights: [cpp_scm] },
101
+ },
102
+ {
103
+ filetype: 'java',
104
+ wasm: java_wasm,
105
+ queries: { highlights: [java_scm] },
106
+ },
107
+ {
108
+ filetype: 'ruby',
109
+ aliases: ['rb'],
110
+ wasm: ruby_wasm,
111
+ queries: { highlights: [ruby_scm] },
112
+ },
113
+ {
114
+ filetype: 'css',
115
+ wasm: css_wasm,
116
+ queries: { highlights: [css_scm] },
117
+ },
118
+ {
119
+ filetype: 'html',
120
+ aliases: ['htm'],
121
+ wasm: html_wasm,
122
+ queries: { highlights: [html_scm] },
123
+ },
124
+ {
125
+ filetype: 'json',
126
+ aliases: ['jsonc'],
127
+ wasm: json_wasm,
128
+ queries: { highlights: [json_scm] },
129
+ },
130
+ {
131
+ filetype: 'yaml',
132
+ aliases: ['yml'],
133
+ wasm: yaml_wasm,
134
+ queries: { highlights: [yaml_scm] },
135
+ },
136
+ {
137
+ filetype: 'toml',
138
+ wasm: toml_wasm,
139
+ queries: { highlights: [toml_scm] },
140
+ },
141
+ {
142
+ filetype: 'lua',
143
+ wasm: lua_wasm,
144
+ queries: { highlights: [lua_scm] },
145
+ },
146
+ ];
@@ -8,7 +8,7 @@ import fs from "node:fs";
8
8
 
9
9
  //#region package.json
10
10
  var name = "skydive-cli";
11
- var version$1 = "0.2.0-beta.742";
11
+ var version$1 = "0.3.0-beta.764";
12
12
 
13
13
  //#endregion
14
14
  //#region src/auth/organization.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.2.0-beta.742",
3
+ "version": "0.3.0-beta.764",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",