@flowy-agent-store/client 0.1.0-beta.5 → 0.1.0-beta.7

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/index.cjs CHANGED
@@ -276,7 +276,7 @@ var WebSocketTransport = class {
276
276
  /** Header the server mints the per-call connection id under. */
277
277
  const CONNECTION_HEADER = "x-app-server-connection-id";
278
278
  /** Protocol version this binding announces on the one-shot handshake. */
279
- const PROTOCOL_VERSION = "fp-7";
279
+ const PROTOCOL_VERSION = "fp-8";
280
280
  /**
281
281
  * Protocol method → REST route. Verified from handler bodies, not from the
282
282
  * route list (a route existing does not prove which method it mirrors).
@@ -781,6 +781,19 @@ var AgentClient = class {
781
781
  get(agentId) {
782
782
  return this.transport.request("agent/get", { agent_id: agentId });
783
783
  }
784
+ /**
785
+ * Export one AgentDefinition as a portable {@link ExpertPack}.
786
+ *
787
+ * Requires WebSocket: like the rest of this family, `agent/export` has no HTTP
788
+ * route. The expert must be installed and enabled, or the host answers
789
+ * `agent_not_installed` / `agent_disabled`; a host whose `[expert_export]`
790
+ * table refuses the id answers `policy_denied`. Check
791
+ * `capabilities.expert_export` for the *seam* — it does not promise this id is
792
+ * exportable.
793
+ */
794
+ export(agentId) {
795
+ return this.transport.request("agent/export", { agent_id: agentId });
796
+ }
784
797
  };
785
798
  //#endregion
786
799
  //#region src/conversations.ts
@@ -1783,6 +1796,21 @@ var TeamClient = class {
1783
1796
  get(teamId) {
1784
1797
  return this.transport.request("team/get", { team_id: teamId });
1785
1798
  }
1799
+ /**
1800
+ * Export one TeamDefinition as a portable {@link ExpertPack}, with every member
1801
+ * expanded and the **leader first**.
1802
+ *
1803
+ * All-or-nothing: if any member is uninstalled, disabled, or refused by the
1804
+ * host's `[expert_export]` table, the whole call fails rather than returning a
1805
+ * partial roster — the same posture `team/run` takes before it creates
1806
+ * anything. `teamVersion` is an optional pin; a mismatch is `version_mismatch`.
1807
+ */
1808
+ export(teamId, teamVersion) {
1809
+ return this.transport.request("team/export", {
1810
+ team_id: teamId,
1811
+ team_version: teamVersion
1812
+ });
1813
+ }
1786
1814
  };
1787
1815
  //#endregion
1788
1816
  //#region src/models.ts
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentDetail, AgentRunInput, AgentSummary, AnswerDecisionInput, CancelRunInput, ClientCapabilities, ClientInfo, ConnectorCallResult, ConnectorDetail, ConnectorProbeResult, ConnectorStatusView, ConnectorSummary, ContextUsage, ConversationCreateInput, ConversationEvent, ConversationMessage, ConversationMessagesPage, ConversationMessagesQuery, ConversationModelOptions, ConversationSendReceipt, ConversationUpdateInput, ConversationView, ImportDetail, ImportRequest, ImportResult, ImportSummary, InitializeResult, InstallOutcome, InstallRequest, InstallResult, InstallStatus, MarketplaceAddRequest, MarketplaceDetail, MarketplaceRefreshResult, MarketplaceRemoveResult, MarketplaceSummary, MentionRef, ModelSummary, OAuthStartResult, OAuthStatusView, ProviderWithModel, RunEvent, RunEventsQuery, RunPlan, RunReceipt, RunResult, RunStatus, RunView, ServerNotification, SkillDetail, SkillFileContent, SkillFileList, SkillSummary, SteerRunInput, StoreInstallResult, StoreItem, StoreItemKind, StoreList, TeamDetail, TeamRunInput, TeamRunReceipt, TeamSummary, WorkspaceRevokeResult, WorkspaceView } from "@flowy-agent-store/protocol";
1
+ import { AgentDetail, AgentRunInput, AgentSummary, AnswerDecisionInput, CancelRunInput, ClientCapabilities, ClientInfo, ConnectorCallResult, ConnectorDetail, ConnectorProbeResult, ConnectorStatusView, ConnectorSummary, ContextUsage, ConversationCreateInput, ConversationEvent, ConversationMessage, ConversationMessagesPage, ConversationMessagesQuery, ConversationModelOptions, ConversationSendReceipt, ConversationUpdateInput, ConversationView, ExpertPack, ImportDetail, ImportRequest, ImportResult, ImportSummary, InitializeResult, InstallOutcome, InstallRequest, InstallResult, InstallStatus, MarketplaceAddRequest, MarketplaceDetail, MarketplaceRefreshResult, MarketplaceRemoveResult, MarketplaceSummary, MentionRef, ModelSummary, OAuthStartResult, OAuthStatusView, ProviderWithModel, RunEvent, RunEventsQuery, RunPlan, RunReceipt, RunResult, RunStatus, RunView, ServerNotification, SkillDetail, SkillFileContent, SkillFileList, SkillSummary, SteerRunInput, StoreInstallResult, StoreItem, StoreItemKind, StoreList, TeamDetail, TeamRunInput, TeamRunReceipt, TeamSummary, WorkspaceRevokeResult, WorkspaceView } from "@flowy-agent-store/protocol";
2
2
  //#region src/transport.d.ts
3
3
  export type NotificationListener = (notification: ServerNotification) => void;
4
4
  /**
@@ -193,6 +193,17 @@ export declare class AgentClient {
193
193
  list(): Promise<AgentSummary[]>;
194
194
  /** Fetch one AgentDefinition; raw prompts never cross the wire. */
195
195
  get(agentId: string): Promise<AgentDetail>;
196
+ /**
197
+ * Export one AgentDefinition as a portable {@link ExpertPack}.
198
+ *
199
+ * Requires WebSocket: like the rest of this family, `agent/export` has no HTTP
200
+ * route. The expert must be installed and enabled, or the host answers
201
+ * `agent_not_installed` / `agent_disabled`; a host whose `[expert_export]`
202
+ * table refuses the id answers `policy_denied`. Check
203
+ * `capabilities.expert_export` for the *seam* — it does not promise this id is
204
+ * exportable.
205
+ */
206
+ export(agentId: string): Promise<ExpertPack>;
196
207
  }
197
208
  //#endregion
198
209
  //#region src/conversations.d.ts
@@ -745,6 +756,16 @@ export declare class TeamClient {
745
756
  list(): Promise<TeamSummary[]>;
746
757
  /** Fetch one TeamDefinition; planning-context bodies are never returned. */
747
758
  get(teamId: string): Promise<TeamDetail>;
759
+ /**
760
+ * Export one TeamDefinition as a portable {@link ExpertPack}, with every member
761
+ * expanded and the **leader first**.
762
+ *
763
+ * All-or-nothing: if any member is uninstalled, disabled, or refused by the
764
+ * host's `[expert_export]` table, the whole call fails rather than returning a
765
+ * partial roster — the same posture `team/run` takes before it creates
766
+ * anything. `teamVersion` is an optional pin; a mismatch is `version_mismatch`.
767
+ */
768
+ export(teamId: string, teamVersion?: string): Promise<ExpertPack>;
748
769
  }
749
770
  //#endregion
750
771
  //#region src/models.d.ts
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentDetail, AgentRunInput, AgentSummary, AnswerDecisionInput, CancelRunInput, ClientCapabilities, ClientInfo, ConnectorCallResult, ConnectorDetail, ConnectorProbeResult, ConnectorStatusView, ConnectorSummary, ContextUsage, ConversationCreateInput, ConversationEvent, ConversationMessage, ConversationMessagesPage, ConversationMessagesQuery, ConversationModelOptions, ConversationSendReceipt, ConversationUpdateInput, ConversationView, ImportDetail, ImportRequest, ImportResult, ImportSummary, InitializeResult, InstallOutcome, InstallRequest, InstallResult, InstallStatus, MarketplaceAddRequest, MarketplaceDetail, MarketplaceRefreshResult, MarketplaceRemoveResult, MarketplaceSummary, MentionRef, ModelSummary, OAuthStartResult, OAuthStatusView, ProviderWithModel, RunEvent, RunEventsQuery, RunPlan, RunReceipt, RunResult, RunStatus, RunView, ServerNotification, SkillDetail, SkillFileContent, SkillFileList, SkillSummary, SteerRunInput, StoreInstallResult, StoreItem, StoreItemKind, StoreList, TeamDetail, TeamRunInput, TeamRunReceipt, TeamSummary, WorkspaceRevokeResult, WorkspaceView } from "@flowy-agent-store/protocol";
1
+ import { AgentDetail, AgentRunInput, AgentSummary, AnswerDecisionInput, CancelRunInput, ClientCapabilities, ClientInfo, ConnectorCallResult, ConnectorDetail, ConnectorProbeResult, ConnectorStatusView, ConnectorSummary, ContextUsage, ConversationCreateInput, ConversationEvent, ConversationMessage, ConversationMessagesPage, ConversationMessagesQuery, ConversationModelOptions, ConversationSendReceipt, ConversationUpdateInput, ConversationView, ExpertPack, ImportDetail, ImportRequest, ImportResult, ImportSummary, InitializeResult, InstallOutcome, InstallRequest, InstallResult, InstallStatus, MarketplaceAddRequest, MarketplaceDetail, MarketplaceRefreshResult, MarketplaceRemoveResult, MarketplaceSummary, MentionRef, ModelSummary, OAuthStartResult, OAuthStatusView, ProviderWithModel, RunEvent, RunEventsQuery, RunPlan, RunReceipt, RunResult, RunStatus, RunView, ServerNotification, SkillDetail, SkillFileContent, SkillFileList, SkillSummary, SteerRunInput, StoreInstallResult, StoreItem, StoreItemKind, StoreList, TeamDetail, TeamRunInput, TeamRunReceipt, TeamSummary, WorkspaceRevokeResult, WorkspaceView } from "@flowy-agent-store/protocol";
2
2
  //#region src/transport.d.ts
3
3
  export type NotificationListener = (notification: ServerNotification) => void;
4
4
  /**
@@ -193,6 +193,17 @@ export declare class AgentClient {
193
193
  list(): Promise<AgentSummary[]>;
194
194
  /** Fetch one AgentDefinition; raw prompts never cross the wire. */
195
195
  get(agentId: string): Promise<AgentDetail>;
196
+ /**
197
+ * Export one AgentDefinition as a portable {@link ExpertPack}.
198
+ *
199
+ * Requires WebSocket: like the rest of this family, `agent/export` has no HTTP
200
+ * route. The expert must be installed and enabled, or the host answers
201
+ * `agent_not_installed` / `agent_disabled`; a host whose `[expert_export]`
202
+ * table refuses the id answers `policy_denied`. Check
203
+ * `capabilities.expert_export` for the *seam* — it does not promise this id is
204
+ * exportable.
205
+ */
206
+ export(agentId: string): Promise<ExpertPack>;
196
207
  }
197
208
  //#endregion
198
209
  //#region src/conversations.d.ts
@@ -745,6 +756,16 @@ export declare class TeamClient {
745
756
  list(): Promise<TeamSummary[]>;
746
757
  /** Fetch one TeamDefinition; planning-context bodies are never returned. */
747
758
  get(teamId: string): Promise<TeamDetail>;
759
+ /**
760
+ * Export one TeamDefinition as a portable {@link ExpertPack}, with every member
761
+ * expanded and the **leader first**.
762
+ *
763
+ * All-or-nothing: if any member is uninstalled, disabled, or refused by the
764
+ * host's `[expert_export]` table, the whole call fails rather than returning a
765
+ * partial roster — the same posture `team/run` takes before it creates
766
+ * anything. `teamVersion` is an optional pin; a mismatch is `version_mismatch`.
767
+ */
768
+ export(teamId: string, teamVersion?: string): Promise<ExpertPack>;
748
769
  }
749
770
  //#endregion
750
771
  //#region src/models.d.ts
package/dist/index.mjs CHANGED
@@ -275,7 +275,7 @@ var WebSocketTransport = class {
275
275
  /** Header the server mints the per-call connection id under. */
276
276
  const CONNECTION_HEADER = "x-app-server-connection-id";
277
277
  /** Protocol version this binding announces on the one-shot handshake. */
278
- const PROTOCOL_VERSION = "fp-7";
278
+ const PROTOCOL_VERSION = "fp-8";
279
279
  /**
280
280
  * Protocol method → REST route. Verified from handler bodies, not from the
281
281
  * route list (a route existing does not prove which method it mirrors).
@@ -780,6 +780,19 @@ var AgentClient = class {
780
780
  get(agentId) {
781
781
  return this.transport.request("agent/get", { agent_id: agentId });
782
782
  }
783
+ /**
784
+ * Export one AgentDefinition as a portable {@link ExpertPack}.
785
+ *
786
+ * Requires WebSocket: like the rest of this family, `agent/export` has no HTTP
787
+ * route. The expert must be installed and enabled, or the host answers
788
+ * `agent_not_installed` / `agent_disabled`; a host whose `[expert_export]`
789
+ * table refuses the id answers `policy_denied`. Check
790
+ * `capabilities.expert_export` for the *seam* — it does not promise this id is
791
+ * exportable.
792
+ */
793
+ export(agentId) {
794
+ return this.transport.request("agent/export", { agent_id: agentId });
795
+ }
783
796
  };
784
797
  //#endregion
785
798
  //#region src/conversations.ts
@@ -1782,6 +1795,21 @@ var TeamClient = class {
1782
1795
  get(teamId) {
1783
1796
  return this.transport.request("team/get", { team_id: teamId });
1784
1797
  }
1798
+ /**
1799
+ * Export one TeamDefinition as a portable {@link ExpertPack}, with every member
1800
+ * expanded and the **leader first**.
1801
+ *
1802
+ * All-or-nothing: if any member is uninstalled, disabled, or refused by the
1803
+ * host's `[expert_export]` table, the whole call fails rather than returning a
1804
+ * partial roster — the same posture `team/run` takes before it creates
1805
+ * anything. `teamVersion` is an optional pin; a mismatch is `version_mismatch`.
1806
+ */
1807
+ export(teamId, teamVersion) {
1808
+ return this.transport.request("team/export", {
1809
+ team_id: teamId,
1810
+ team_version: teamVersion
1811
+ });
1812
+ }
1785
1813
  };
1786
1814
  //#endregion
1787
1815
  //#region src/models.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowy-agent-store/client",
3
- "version": "0.1.0-beta.5",
3
+ "version": "0.1.0-beta.7",
4
4
  "description": "Transport-agnostic App Server client (docs/agent-store/07 §2.2)",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -25,7 +25,7 @@
25
25
  "dist"
26
26
  ],
27
27
  "dependencies": {
28
- "@flowy-agent-store/protocol": "0.1.0-beta.5"
28
+ "@flowy-agent-store/protocol": "0.1.0-beta.7"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "tsdown",