@agentforge-io/core 2.0.22 → 2.0.23

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.
@@ -499,6 +499,12 @@ function toAgentDefinition(record) {
499
499
  metadata: record.metadata,
500
500
  connectorOwnerUserId: record.connectorOwnerUserId,
501
501
  timezone: record.timezone,
502
+ // Surface `visibility` onto the runtime AgentDefinition so the
503
+ // public-chat controller can refuse tokens bound to private
504
+ // agents. Without this projection the field is dropped on its way
505
+ // from the host's resolver to the SDK and every agent reads as
506
+ // `undefined` (i.e. public).
507
+ visibility: record.visibility,
502
508
  ...(record.slug !== undefined ? { slug: record.slug } : {}),
503
509
  ...(extra.appearance !== undefined ? { appearance: extra.appearance } : {}),
504
510
  };
@@ -109,6 +109,15 @@ export interface AgentDefinition {
109
109
  * agent owner's locale instead of UTC. Defaults to `"UTC"` when unset.
110
110
  */
111
111
  timezone?: string;
112
+ /**
113
+ * Access model surfaced from the host. `'private'` agents are
114
+ * refused by the SDK's public-chat surface (token-only flow);
115
+ * authenticated entry points still go through the host's
116
+ * AgentAccessGate. Optional for backwards compatibility — older
117
+ * hosts that don't populate this field keep the historical
118
+ * "everyone with a token can chat" behaviour.
119
+ */
120
+ visibility?: 'private' | 'public';
112
121
  }
113
122
  /**
114
123
  * Configuration for an MCP server the runtime should connect to.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/core",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "description": "Framework-free AI runtime SDK. Owns: agent loop (Anthropic), conversations, tools, streaming, agent-job queue, SdkHooks. Identity, billing, infra (email/uploads/secrets) live in the host's modules — not here.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",