@telorun/ide-support 0.14.1 → 0.16.0

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 (85) hide show
  1. package/dist/cel/cursor-chain.d.ts +30 -0
  2. package/dist/cel/cursor-chain.d.ts.map +1 -0
  3. package/dist/cel/cursor-chain.js +30 -0
  4. package/dist/cel/symbols.d.ts +82 -0
  5. package/dist/cel/symbols.d.ts.map +1 -0
  6. package/dist/cel/symbols.js +147 -0
  7. package/dist/cel/tokens.d.ts +32 -0
  8. package/dist/cel/tokens.d.ts.map +1 -0
  9. package/dist/cel/tokens.js +162 -0
  10. package/dist/completions/build.d.ts +6 -2
  11. package/dist/completions/build.d.ts.map +1 -1
  12. package/dist/completions/build.js +52 -24
  13. package/dist/completions/call-inputs.d.ts +25 -0
  14. package/dist/completions/call-inputs.d.ts.map +1 -0
  15. package/dist/completions/call-inputs.js +78 -0
  16. package/dist/completions/cel-completions.d.ts +26 -0
  17. package/dist/completions/cel-completions.d.ts.map +1 -0
  18. package/dist/completions/cel-completions.js +78 -0
  19. package/dist/completions/detect-context.d.ts +47 -8
  20. package/dist/completions/detect-context.d.ts.map +1 -1
  21. package/dist/completions/detect-context.js +51 -15
  22. package/dist/completions/prop-keys.d.ts +5 -1
  23. package/dist/completions/prop-keys.d.ts.map +1 -1
  24. package/dist/completions/prop-keys.js +51 -3
  25. package/dist/completions/resolve-node.d.ts +9 -2
  26. package/dist/completions/resolve-node.d.ts.map +1 -1
  27. package/dist/completions/resolve-node.js +63 -21
  28. package/dist/definition/build-definition.d.ts +6 -2
  29. package/dist/definition/build-definition.d.ts.map +1 -1
  30. package/dist/definition/build-definition.js +16 -3
  31. package/dist/definition/locate-context-binding.d.ts +15 -0
  32. package/dist/definition/locate-context-binding.d.ts.map +1 -0
  33. package/dist/definition/locate-context-binding.js +35 -0
  34. package/dist/definition/locate-step.d.ts +13 -0
  35. package/dist/definition/locate-step.d.ts.map +1 -0
  36. package/dist/definition/locate-step.js +33 -0
  37. package/dist/definition/resolve-cel-target.d.ts +11 -1
  38. package/dist/definition/resolve-cel-target.d.ts.map +1 -1
  39. package/dist/definition/resolve-cel-target.js +14 -14
  40. package/dist/doc-identity.d.ts +17 -0
  41. package/dist/doc-identity.d.ts.map +1 -0
  42. package/dist/doc-identity.js +19 -0
  43. package/dist/hover/build-hover.d.ts +6 -2
  44. package/dist/hover/build-hover.d.ts.map +1 -1
  45. package/dist/hover/build-hover.js +64 -3
  46. package/dist/import-upgrades/build-import-upgrades.d.ts +57 -3
  47. package/dist/import-upgrades/build-import-upgrades.d.ts.map +1 -1
  48. package/dist/import-upgrades/build-import-upgrades.js +67 -10
  49. package/dist/import-upgrades/index.d.ts +5 -2
  50. package/dist/import-upgrades/index.d.ts.map +1 -1
  51. package/dist/import-upgrades/index.js +3 -1
  52. package/dist/import-upgrades/manifest-cache-url.d.ts +17 -0
  53. package/dist/import-upgrades/manifest-cache-url.d.ts.map +1 -0
  54. package/dist/import-upgrades/manifest-cache-url.js +30 -0
  55. package/dist/import-upgrades/version-compatibility.d.ts +92 -0
  56. package/dist/import-upgrades/version-compatibility.d.ts.map +1 -0
  57. package/dist/import-upgrades/version-compatibility.js +121 -0
  58. package/dist/semantic-tokens/build-semantic-tokens.d.ts +13 -8
  59. package/dist/semantic-tokens/build-semantic-tokens.d.ts.map +1 -1
  60. package/dist/semantic-tokens/build-semantic-tokens.js +81 -37
  61. package/dist/types.d.ts +25 -5
  62. package/dist/types.d.ts.map +1 -1
  63. package/dist/types.js +16 -2
  64. package/package.json +2 -2
  65. package/src/cel/cursor-chain.ts +58 -0
  66. package/src/cel/symbols.ts +189 -0
  67. package/src/cel/tokens.ts +169 -0
  68. package/src/completions/build.ts +85 -22
  69. package/src/completions/call-inputs.ts +92 -0
  70. package/src/completions/cel-completions.ts +108 -0
  71. package/src/completions/detect-context.ts +107 -13
  72. package/src/completions/prop-keys.ts +59 -2
  73. package/src/completions/resolve-node.ts +82 -17
  74. package/src/definition/build-definition.ts +30 -2
  75. package/src/definition/locate-context-binding.ts +53 -0
  76. package/src/definition/locate-step.ts +50 -0
  77. package/src/definition/resolve-cel-target.ts +25 -0
  78. package/src/doc-identity.ts +31 -0
  79. package/src/hover/build-hover.ts +67 -1
  80. package/src/import-upgrades/build-import-upgrades.ts +115 -11
  81. package/src/import-upgrades/index.ts +22 -1
  82. package/src/import-upgrades/manifest-cache-url.ts +40 -0
  83. package/src/import-upgrades/version-compatibility.ts +196 -0
  84. package/src/semantic-tokens/build-semantic-tokens.ts +84 -30
  85. package/src/types.ts +47 -6
package/src/types.ts CHANGED
@@ -54,14 +54,55 @@ export interface HoverResult {
54
54
 
55
55
  /** Semantic token type names emitted by `buildSemanticTokens`. Kept to the
56
56
  * standard VS Code / LSP set so hosts register them against a stock legend and
57
- * every theme colors them without extra configuration. `type` marks a resolved
58
- * resource kind; `interface` marks a capability value; `variable` marks a
59
- * `!ref` target. */
60
- export type SemanticTokenType = "type" | "interface" | "variable";
57
+ * every theme colors them without extra configuration.
58
+ *
59
+ * Manifest structure: `type` marks a resolved resource kind; `interface` marks
60
+ * a capability value; `variable` marks a `!ref` target.
61
+ *
62
+ * Inside a CEL body: `namespace` marks the ROOT of a chain, `property` a member
63
+ * it can resolve, `function` a call, and `number` / `string` / `keyword` /
64
+ * `operator` the syntax around them. A CEL name the scope CANNOT confirm gets
65
+ * no token — the same quiet signal an unresolved `kind:` gives, pairing with
66
+ * the analyzer's `CEL_UNKNOWN_FIELD`.
67
+ *
68
+ * The root is a `namespace` rather than a `variable` because colour encodes
69
+ * what a symbol IS, which is the invariant every language holds to — and a CEL
70
+ * root is not data the author declared, it is a scope the runtime injects
71
+ * (`request`, `steps`, `variables`, `self`). Members are uniformly `property`
72
+ * however deep, so a chain reads as scope · path. Colouring by the SHAPE of the
73
+ * value behind a name — object vs scalar — was considered and rejected: it is
74
+ * type-directed highlighting, so the palette becomes a type legend, a name
75
+ * changes colour as analysis resolves, and it says nothing exactly where the
76
+ * scope declares no shape. */
77
+ export type SemanticTokenType =
78
+ | "type"
79
+ | "interface"
80
+ | "variable"
81
+ | "property"
82
+ | "function"
83
+ | "number"
84
+ | "string"
85
+ | "keyword"
86
+ | "operator"
87
+ | "namespace";
61
88
 
62
89
  /** The legend a host registers before mapping `buildSemanticTokens` output. The
63
- * numeric token-type of each `SemanticToken` is its index in this array. */
64
- export const SEMANTIC_TOKEN_LEGEND: readonly SemanticTokenType[] = ["type", "interface", "variable"];
90
+ * numeric token-type of each `SemanticToken` is its index in this array, and a
91
+ * host registers it once at activation — so new types are APPENDED, never
92
+ * inserted, or an already-registered legend would repaint every existing
93
+ * token as something else. */
94
+ export const SEMANTIC_TOKEN_LEGEND: readonly SemanticTokenType[] = [
95
+ "type",
96
+ "interface",
97
+ "variable",
98
+ "property",
99
+ "function",
100
+ "number",
101
+ "string",
102
+ "keyword",
103
+ "operator",
104
+ "namespace",
105
+ ];
65
106
 
66
107
  /** One absolute-positioned semantic token. Every Telo semantic token is
67
108
  * single-line (kinds and capabilities never wrap), so a `{line, char, length}`