@cotal-ai/connector-claude-code 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.
Files changed (2) hide show
  1. package/dist/mcp.cjs +40 -4
  2. package/package.json +3 -3
package/dist/mcp.cjs CHANGED
@@ -69031,6 +69031,8 @@ function claims(ext) {
69031
69031
  }
69032
69032
  var Registry = class {
69033
69033
  #byKey = /* @__PURE__ */ new Map();
69034
+ /** `kind:name` → the declared provider that registers it, and its import once one has started. */
69035
+ #providers = /* @__PURE__ */ new Map();
69034
69036
  /** `kind:alias` → the claiming extension's `kind:name` key, for committed extensions. */
69035
69037
  #aliases = /* @__PURE__ */ new Map();
69036
69038
  /** While a stage is active in the CURRENT async context, {@link register} writes there instead of
@@ -69117,13 +69119,47 @@ var Registry = class {
69117
69119
  return this.#aliases.get(key) ?? key;
69118
69120
  }
69119
69121
  /** Resolve one extension by kind + name or alias. Unknown throws. Staged (uncommitted) registrations are
69120
- * invisible here; only committed ones resolve. */
69122
+ * invisible here; only committed ones resolve. A key whose declared provider has not loaded throws
69123
+ * too, naming that: {@link load} resolves it. */
69121
69124
  resolve(kind, name) {
69122
69125
  const ext = this.#byKey.get(this.#canonical(kind, name));
69123
- if (!ext)
69126
+ if (!ext) {
69127
+ if (this.#providers.has(`${kind}:${name}`))
69128
+ throw new Error(`${kind} "${name}" is declared by a provider this process has not loaded`);
69124
69129
  throw new Error(`no ${kind} registered for "${name}"`);
69130
+ }
69125
69131
  return ext;
69126
69132
  }
69133
+ /** Declare a provider: a module that registers `provides` when it is imported. Nothing is imported
69134
+ * here. A key that another provider already declares is refused, so a key has one provider. */
69135
+ provide(provider) {
69136
+ const keys = provider.provides.map((ref) => `${ref.kind}:${ref.name}`);
69137
+ for (const key of keys)
69138
+ if (this.#providers.has(key))
69139
+ throw new Error(`extension provider already declared: ${key}`);
69140
+ const entry = { provider };
69141
+ for (const key of keys)
69142
+ this.#providers.set(key, entry);
69143
+ }
69144
+ /** Whether a provider was declared for exactly this kind + name, loaded or not. A boolean probe
69145
+ * that never throws and imports nothing. */
69146
+ provides(kind, name) {
69147
+ return this.#providers.has(`${kind}:${name}`);
69148
+ }
69149
+ /** Resolve kind + name, first importing the provider declared for it unless that import has run.
69150
+ * Concurrent calls share one import. A key no provider declares resolves as {@link resolve} does.
69151
+ * A provider that loads without registering the key it declared throws: the declaration is wrong,
69152
+ * and no other extension stands in for it. */
69153
+ async load(kind, name) {
69154
+ const entry = this.#providers.get(`${kind}:${name}`);
69155
+ if (entry) {
69156
+ entry.loading ??= entry.provider.load();
69157
+ await entry.loading;
69158
+ if (!this.#byKey.has(this.#canonical(kind, name)))
69159
+ throw new Error(`the provider declared for ${kind} "${name}" loaded without registering it`);
69160
+ }
69161
+ return this.resolve(kind, name);
69162
+ }
69127
69163
  all(kind) {
69128
69164
  const values = [...this.#byKey.values()];
69129
69165
  return kind === void 0 ? values : values.filter((e) => e.kind === kind);
@@ -75492,10 +75528,10 @@ async function submitFeedback(input, options = {}) {
75492
75528
  var import_node_child_process3 = require("node:child_process");
75493
75529
 
75494
75530
  // ../connector-core/dist/docs-bundle.generated.js
75495
- var DOCS_VERSION = "0.108.1";
75531
+ var DOCS_VERSION = "0.109.0";
75496
75532
  function loadDocsBundle() {
75497
75533
  return {
75498
- "version": "0.108.1",
75534
+ "version": "0.109.0",
75499
75535
  "generatedFrom": "docs/*.md + SPEC.md + spec/cotal-lang.md + spec/cotal.schema.json",
75500
75536
  "pages": [
75501
75537
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cotal-ai/connector-claude-code",
3
3
  "description": "Cotal connector for Claude Code: an installed plugin that joins a session to the mesh.",
4
- "version": "0.108.1",
4
+ "version": "0.109.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -25,8 +25,8 @@
25
25
  "@cotal-ai/core": ">=0.1.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@cotal-ai/connector-core": "0.108.1",
29
- "@cotal-ai/core": "0.108.1",
28
+ "@cotal-ai/connector-core": "0.109.0",
29
+ "@cotal-ai/core": "0.109.0",
30
30
  "@cotal-ai/smoke-kit": "0.0.0",
31
31
  "@modelcontextprotocol/sdk": "^1.29.0",
32
32
  "@nats-io/transport-node": "^3.4.0",