@telorun/ide-support 0.17.1 → 0.18.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.
@@ -1 +1 @@
1
- {"version":3,"file":"prop-keys.d.ts","sourceRoot":"","sources":["../../src/completions/prop-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAiBpD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,QAAQ,EAAE,gBAAgB,GAAG,SAAS;AACtC;;oCAEoC;AACpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,gBAAgB,EAAE,CAoDpB"}
1
+ {"version":3,"file":"prop-keys.d.ts","sourceRoot":"","sources":["../../src/completions/prop-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAiBpD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,QAAQ,EAAE,gBAAgB,GAAG,SAAS;AACtC;;oCAEoC;AACpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,gBAAgB,EAAE,CAoDpB"}
@@ -1,4 +1,4 @@
1
- import { manifestFragmentOf, TELO_SCHEMA_ANNOTATIONS, } from "@telorun/analyzer";
1
+ import { manifestFragmentOf, TELO_SCHEMA_ANNOTATIONS, TELO_DATA_SCHEMA_ANNOTATIONS, } from "@telorun/analyzer";
2
2
  import { navigateSchema } from "./detect-context.js";
3
3
  /** Kernel-implicit fields. Every Telo resource declares its `kind` and a
4
4
  * `metadata` object; the analyzer's schema validator injects them when
@@ -103,7 +103,13 @@ function propertyNameSuggestions(schema, existingKeys) {
103
103
  * walkers as an annotated node.
104
104
  */
105
105
  function annotationKeys(node) {
106
- return manifestFragmentOf(node) === "KindSchema" ? TELO_SCHEMA_ANNOTATIONS : {};
106
+ const fragment = manifestFragmentOf(node);
107
+ // A kind's own `schema:` takes the whole annotation vocabulary. A DATA schema
108
+ // — an `inputType` / `outputType` contract — takes only the annotations read
109
+ // from one, which is where the kernel looks for them.
110
+ if (fragment === "KindSchema")
111
+ return TELO_SCHEMA_ANNOTATIONS;
112
+ return fragment === "JsonSchema7" ? TELO_DATA_SCHEMA_ANNOTATIONS : {};
107
113
  }
108
114
  function buildItems(properties, existingKeys, required) {
109
115
  const items = [];
@@ -8,8 +8,8 @@
8
8
  * from an extension host. The `fetch` itself stays with the host — everything
9
9
  * in this package leaves the network to its caller.
10
10
  *
11
- * A ref the cache cannot address (a registry ref, whose origin this side does
12
- * not know; a URL with no version segment) returns `null`, which the caller
11
+ * A ref the cache cannot address (a URL with no version segment) returns
12
+ * `null`, which the caller
13
13
  * reads as "not known" and never as "incompatible". Losing the check for those
14
14
  * refs is the honest outcome: the manifest is still gated at load time.
15
15
  */
@@ -9,8 +9,8 @@ import { MANIFEST_CACHE_BASE_URL, isOciRef, manifestCacheUrl, urlManifestCacheCo
9
9
  * from an extension host. The `fetch` itself stays with the host — everything
10
10
  * in this package leaves the network to its caller.
11
11
  *
12
- * A ref the cache cannot address (a registry ref, whose origin this side does
13
- * not know; a URL with no version segment) returns `null`, which the caller
12
+ * A ref the cache cannot address (a URL with no version segment) returns
13
+ * `null`, which the caller
14
14
  * reads as "not known" and never as "incompatible". Losing the check for those
15
15
  * refs is the honest outcome: the manifest is still gated at load time.
16
16
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telorun/ide-support",
3
- "version": "0.17.1",
3
+ "version": "0.18.1",
4
4
  "description": "Editor-host-agnostic IDE support (completions, diagnostic normalization) for Telo manifests.",
5
5
  "keywords": [
6
6
  "telo",
@@ -36,7 +36,7 @@
36
36
  "src/**"
37
37
  ],
38
38
  "dependencies": {
39
- "@telorun/analyzer": "0.67.0"
39
+ "@telorun/analyzer": "0.69.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^20.0.0",
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  manifestFragmentOf,
3
3
  TELO_SCHEMA_ANNOTATIONS,
4
+ TELO_DATA_SCHEMA_ANNOTATIONS,
4
5
  type AnalysisRegistry,
5
6
  } from "@telorun/analyzer";
6
7
  import type { CompletionResult } from "../types.js";
@@ -132,7 +133,12 @@ function propertyNameSuggestions(
132
133
  * walkers as an annotated node.
133
134
  */
134
135
  function annotationKeys(node: Record<string, any>): Record<string, any> {
135
- return manifestFragmentOf(node) === "KindSchema" ? TELO_SCHEMA_ANNOTATIONS : {};
136
+ const fragment = manifestFragmentOf(node);
137
+ // A kind's own `schema:` takes the whole annotation vocabulary. A DATA schema
138
+ // — an `inputType` / `outputType` contract — takes only the annotations read
139
+ // from one, which is where the kernel looks for them.
140
+ if (fragment === "KindSchema") return TELO_SCHEMA_ANNOTATIONS;
141
+ return fragment === "JsonSchema7" ? TELO_DATA_SCHEMA_ANNOTATIONS : {};
136
142
  }
137
143
 
138
144
  function buildItems(
@@ -16,8 +16,8 @@ import {
16
16
  * from an extension host. The `fetch` itself stays with the host — everything
17
17
  * in this package leaves the network to its caller.
18
18
  *
19
- * A ref the cache cannot address (a registry ref, whose origin this side does
20
- * not know; a URL with no version segment) returns `null`, which the caller
19
+ * A ref the cache cannot address (a URL with no version segment) returns
20
+ * `null`, which the caller
21
21
  * reads as "not known" and never as "incompatible". Losing the check for those
22
22
  * refs is the honest outcome: the manifest is still gated at load time.
23
23
  */