appostle-installer 0.0.20 → 0.0.21

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/appostle.js CHANGED
@@ -3498,6 +3498,7 @@ var GoogleFontsDownloadResponseSchema = z10.object({
3498
3498
  });
3499
3499
 
3500
3500
  // ../server/src/shared/messages.ts
3501
+ var InitialAgentSnapshotPageLimit = 200;
3501
3502
  var MutableDaemonConfigSchema = z11.object({
3502
3503
  mcp: z11.object({
3503
3504
  injectIntoAgents: z11.boolean()
@@ -5990,6 +5991,17 @@ var FetchAgentsResponseMessageSchema = z11.object({
5990
5991
  })
5991
5992
  })
5992
5993
  });
5994
+ var InitialAgentSnapshotMessageSchema = z11.object({
5995
+ type: z11.literal("initial_agent_snapshot"),
5996
+ payload: z11.object({
5997
+ entries: z11.array(
5998
+ z11.object({
5999
+ agent: AgentSnapshotPayloadSchema,
6000
+ project: ProjectPlacementPayloadSchema
6001
+ })
6002
+ )
6003
+ })
6004
+ });
5993
6005
  var FetchWorkspacesResponseMessageSchema = z11.object({
5994
6006
  type: z11.literal("fetch_workspaces_response"),
5995
6007
  payload: z11.object({
@@ -7031,6 +7043,7 @@ var SessionOutboundMessageSchema = z11.discriminatedUnion("type", [
7031
7043
  AgentStreamMessageSchema,
7032
7044
  AgentStatusMessageSchema,
7033
7045
  FetchAgentsResponseMessageSchema,
7046
+ InitialAgentSnapshotMessageSchema,
7034
7047
  FetchWorkspacesResponseMessageSchema,
7035
7048
  OpenProjectResponseMessageSchema,
7036
7049
  StartWorkspaceScriptResponseMessageSchema,
@@ -37469,9 +37482,35 @@ var Session = class _Session {
37469
37482
  this.emit(message);
37470
37483
  }
37471
37484
  /**
37472
- * Send initial state to client after connection
37485
+ * Push the first page of the agent directory unsolicited right after
37486
+ * `server_info` so the client can paint attention state before its own
37487
+ * paginated `fetch_agents_request` round-trip lands. The regular fetch
37488
+ * still runs in parallel — it establishes the live-update subscription
37489
+ * and paginates beyond the first page. This push exists purely to shave
37490
+ * one relay round-trip from time-to-first-paint.
37491
+ *
37492
+ * Errors are swallowed: a failed push degrades to "wait for the client
37493
+ * to ask," which is still correct.
37473
37494
  */
37474
37495
  async sendInitialState() {
37496
+ try {
37497
+ const synthetic = {
37498
+ type: "fetch_agents_request",
37499
+ requestId: "internal:initial-snapshot",
37500
+ filter: { includeArchived: true },
37501
+ page: { limit: InitialAgentSnapshotPageLimit }
37502
+ };
37503
+ const { entries } = await this.listFetchAgentsEntries(synthetic);
37504
+ this.emit({
37505
+ type: "initial_agent_snapshot",
37506
+ payload: { entries }
37507
+ });
37508
+ } catch (error) {
37509
+ this.sessionLogger.warn(
37510
+ { err: error },
37511
+ "Failed to push initial agent snapshot \u2014 client will fall back to fetch_agents_request"
37512
+ );
37513
+ }
37475
37514
  }
37476
37515
  /**
37477
37516
  * Normalize a user prompt (with optional image metadata) for AgentManager