@cotal-ai/connector-codex 0.108.1 → 0.109.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.
- package/dist/host.js +40 -4
- package/package.json +3 -3
package/dist/host.js
CHANGED
|
@@ -48755,6 +48755,8 @@ function claims(ext) {
|
|
|
48755
48755
|
}
|
|
48756
48756
|
var Registry = class {
|
|
48757
48757
|
#byKey = /* @__PURE__ */ new Map();
|
|
48758
|
+
/** `kind:name` → the declared provider that registers it, and its import once one has started. */
|
|
48759
|
+
#providers = /* @__PURE__ */ new Map();
|
|
48758
48760
|
/** `kind:alias` → the claiming extension's `kind:name` key, for committed extensions. */
|
|
48759
48761
|
#aliases = /* @__PURE__ */ new Map();
|
|
48760
48762
|
/** While a stage is active in the CURRENT async context, {@link register} writes there instead of
|
|
@@ -48841,13 +48843,47 @@ var Registry = class {
|
|
|
48841
48843
|
return this.#aliases.get(key) ?? key;
|
|
48842
48844
|
}
|
|
48843
48845
|
/** Resolve one extension by kind + name or alias. Unknown throws. Staged (uncommitted) registrations are
|
|
48844
|
-
* invisible here; only committed ones resolve.
|
|
48846
|
+
* invisible here; only committed ones resolve. A key whose declared provider has not loaded throws
|
|
48847
|
+
* too, naming that: {@link load} resolves it. */
|
|
48845
48848
|
resolve(kind, name) {
|
|
48846
48849
|
const ext = this.#byKey.get(this.#canonical(kind, name));
|
|
48847
|
-
if (!ext)
|
|
48850
|
+
if (!ext) {
|
|
48851
|
+
if (this.#providers.has(`${kind}:${name}`))
|
|
48852
|
+
throw new Error(`${kind} "${name}" is declared by a provider this process has not loaded`);
|
|
48848
48853
|
throw new Error(`no ${kind} registered for "${name}"`);
|
|
48854
|
+
}
|
|
48849
48855
|
return ext;
|
|
48850
48856
|
}
|
|
48857
|
+
/** Declare a provider: a module that registers `provides` when it is imported. Nothing is imported
|
|
48858
|
+
* here. A key that another provider already declares is refused, so a key has one provider. */
|
|
48859
|
+
provide(provider) {
|
|
48860
|
+
const keys = provider.provides.map((ref) => `${ref.kind}:${ref.name}`);
|
|
48861
|
+
for (const key of keys)
|
|
48862
|
+
if (this.#providers.has(key))
|
|
48863
|
+
throw new Error(`extension provider already declared: ${key}`);
|
|
48864
|
+
const entry = { provider };
|
|
48865
|
+
for (const key of keys)
|
|
48866
|
+
this.#providers.set(key, entry);
|
|
48867
|
+
}
|
|
48868
|
+
/** Whether a provider was declared for exactly this kind + name, loaded or not. A boolean probe
|
|
48869
|
+
* that never throws and imports nothing. */
|
|
48870
|
+
provides(kind, name) {
|
|
48871
|
+
return this.#providers.has(`${kind}:${name}`);
|
|
48872
|
+
}
|
|
48873
|
+
/** Resolve kind + name, first importing the provider declared for it unless that import has run.
|
|
48874
|
+
* Concurrent calls share one import. A key no provider declares resolves as {@link resolve} does.
|
|
48875
|
+
* A provider that loads without registering the key it declared throws: the declaration is wrong,
|
|
48876
|
+
* and no other extension stands in for it. */
|
|
48877
|
+
async load(kind, name) {
|
|
48878
|
+
const entry = this.#providers.get(`${kind}:${name}`);
|
|
48879
|
+
if (entry) {
|
|
48880
|
+
entry.loading ??= entry.provider.load();
|
|
48881
|
+
await entry.loading;
|
|
48882
|
+
if (!this.#byKey.has(this.#canonical(kind, name)))
|
|
48883
|
+
throw new Error(`the provider declared for ${kind} "${name}" loaded without registering it`);
|
|
48884
|
+
}
|
|
48885
|
+
return this.resolve(kind, name);
|
|
48886
|
+
}
|
|
48851
48887
|
all(kind) {
|
|
48852
48888
|
const values = [...this.#byKey.values()];
|
|
48853
48889
|
return kind === void 0 ? values : values.filter((e) => e.kind === kind);
|
|
@@ -69582,10 +69618,10 @@ function date4(params) {
|
|
|
69582
69618
|
config(en_default());
|
|
69583
69619
|
|
|
69584
69620
|
// ../connector-core/dist/docs-bundle.generated.js
|
|
69585
|
-
var DOCS_VERSION = "0.
|
|
69621
|
+
var DOCS_VERSION = "0.109.0";
|
|
69586
69622
|
function loadDocsBundle() {
|
|
69587
69623
|
return {
|
|
69588
|
-
"version": "0.
|
|
69624
|
+
"version": "0.109.0",
|
|
69589
69625
|
"generatedFrom": "docs/*.md + SPEC.md + spec/cotal-lang.md + spec/cotal.schema.json",
|
|
69590
69626
|
"pages": [
|
|
69591
69627
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/connector-codex",
|
|
3
3
|
"description": "Cotal connector for OpenAI Codex: a host-mode peer driving codex app-server, with Codex's own TUI attached and the cotal_* tools served over a loopback MCP endpoint.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.109.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@cotal-ai/core": ">=0.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@cotal-ai/connector-core": "0.
|
|
25
|
-
"@cotal-ai/core": "0.
|
|
24
|
+
"@cotal-ai/connector-core": "0.109.0",
|
|
25
|
+
"@cotal-ai/core": "0.109.0",
|
|
26
26
|
"@cotal-ai/smoke-kit": "0.0.0",
|
|
27
27
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
28
28
|
"@nats-io/transport-node": "^3.4.0",
|