@meistrari/remy-cli 1.23.0-rc.0 → 1.24.0-rc.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/remy.js +56 -28
  2. package/package.json +1 -1
package/dist/remy.js CHANGED
@@ -33825,6 +33825,23 @@ var sessionEventsResponseSchema = exports_external2.object({
33825
33825
  has_more: exports_external2.boolean(),
33826
33826
  next_cursor: exports_external2.string().nullable()
33827
33827
  }).strict();
33828
+ var knownPublishedResourceSchemas = [
33829
+ exports_external2.object({ type: exports_external2.literal("attachment"), artifactId: exports_external2.string().min(1) }),
33830
+ exports_external2.object({ type: exports_external2.literal("tela_document"), documentPublicationId: exports_external2.string().min(1) }),
33831
+ exports_external2.object({ type: exports_external2.literal("tela_deployment"), deploymentId: exports_external2.string().min(1) })
33832
+ ];
33833
+ var knownPublishedResourceTypes = new Set(knownPublishedResourceSchemas.map((schema) => schema.shape.type.value));
33834
+ var sessionArtifactPublishedEventSchema = exports_external2.object({
33835
+ type: exports_external2.literal("session.artifact.published"),
33836
+ payload: exports_external2.object({
33837
+ publicationId: exports_external2.string().min(1),
33838
+ artifactId: exports_external2.string().min(1),
33839
+ resource: exports_external2.union([
33840
+ ...knownPublishedResourceSchemas,
33841
+ exports_external2.object({ type: exports_external2.string().min(1).refine((type) => !knownPublishedResourceTypes.has(type)) })
33842
+ ])
33843
+ })
33844
+ });
33828
33845
  async function listSessionEvents({
33829
33846
  client,
33830
33847
  sessionId,
@@ -34560,7 +34577,7 @@ function formatSessionJson({
34560
34577
  `;
34561
34578
  }
34562
34579
  // src/version.ts
34563
- var remyCliVersion = "1.23.0-rc.0";
34580
+ var remyCliVersion = "1.24.0-rc.0";
34564
34581
 
34565
34582
  // src/self-update.ts
34566
34583
  import { spawn } from "child_process";
@@ -35151,6 +35168,11 @@ function projectRetainedEvent({
35151
35168
  throw new SessionProjectionProtocolError("Invalid session.notification.created event.");
35152
35169
  return projectSessionNotificationCreated({ state, event: notificationCreated.data, occurredAt, eventUrl });
35153
35170
  }
35171
+ if (event.type === "session.artifact.published") {
35172
+ if (!sessionArtifactPublishedEventSchema.safeParse(event).success)
35173
+ throw new SessionProjectionProtocolError("Invalid session.artifact.published event.");
35174
+ return withRetainedArtifact({ state, artifact, occurredAt });
35175
+ }
35154
35176
  if (event.type === "session.notification.turn-associated") {
35155
35177
  const notificationTurnAssociated = sessionNotificationTurnAssociatedEventSchema.safeParse(event);
35156
35178
  if (!notificationTurnAssociated.success)
@@ -35165,33 +35187,39 @@ function projectRetainedEvent({
35165
35187
  const turnEnded = agentTurnEndedEventSchema.safeParse(event);
35166
35188
  let projected = messageCreated.success ? projectSessionMessageCreated({ state, event: messageCreated.data, occurredAt }) : turnAssociated.success ? projectSessionMessageTurnAssociated({ state, event: turnAssociated.data }) : messageDispatch.success ? projectSessionMessageDispatch({ state, event: messageDispatch.data, occurredAt, retainedEventId, eventUrl }) : workspaceGitInitialized.success ? projectSessionWorkspaceGitInitialized({ state, event: workspaceGitInitialized.data, occurredAt, retainedEventId, eventUrl }) : workspaceGitRevision.success ? projectSessionWorkspaceGitRevision({ state, event: workspaceGitRevision.data, occurredAt, retainedEventId, eventUrl }) : turnEnded.success ? projectAgentTurnEnded({ state, event: turnEnded.data, occurredAt, retainedEventId, eventUrl }) : projectDurableAgentEvent({ state, event, occurredAt, retainedEventId, eventUrl });
35167
35189
  projected = recordAgentLineageEvent({ state: projected, event, retainedEventId });
35168
- if (artifact) {
35169
- const publication = artifact.kind === "file" ? { artifactId: artifact.artifact_id, kind: artifact.kind, title: artifact.filename } : { artifactId: artifact.artifact_id, kind: artifact.kind, title: artifact.title, url: artifact.url };
35170
- const timelineArtifact = artifact.kind === "file" ? {
35171
- kind: "artifact",
35172
- artifactKind: artifact.kind,
35173
- artifactId: artifact.artifact_id,
35174
- occurredAt,
35175
- title: artifact.filename,
35176
- mediaType: artifact.media_type,
35177
- ...artifact.download_url === undefined ? {} : { downloadUrl: artifact.download_url },
35178
- ...artifact.preview_url === undefined ? {} : { previewUrl: artifact.preview_url }
35179
- } : {
35180
- kind: "artifact",
35181
- artifactKind: artifact.kind,
35182
- artifactId: artifact.artifact_id,
35183
- occurredAt,
35184
- title: artifact.title,
35185
- site: artifact.site,
35186
- url: artifact.url
35187
- };
35188
- projected = {
35189
- ...projected,
35190
- publications: [...projected.publications, publication],
35191
- transcript: [...projected.transcript, timelineArtifact]
35192
- };
35193
- }
35194
- return projected;
35190
+ return withRetainedArtifact({ state: projected, artifact, occurredAt });
35191
+ }
35192
+ function withRetainedArtifact({
35193
+ state,
35194
+ artifact,
35195
+ occurredAt
35196
+ }) {
35197
+ if (!artifact)
35198
+ return state;
35199
+ const publication = artifact.kind === "file" ? { artifactId: artifact.artifact_id, kind: artifact.kind, title: artifact.filename } : { artifactId: artifact.artifact_id, kind: artifact.kind, title: artifact.title, url: artifact.url };
35200
+ const timelineArtifact = artifact.kind === "file" ? {
35201
+ kind: "artifact",
35202
+ artifactKind: artifact.kind,
35203
+ artifactId: artifact.artifact_id,
35204
+ occurredAt,
35205
+ title: artifact.filename,
35206
+ mediaType: artifact.media_type,
35207
+ ...artifact.download_url === undefined ? {} : { downloadUrl: artifact.download_url },
35208
+ ...artifact.preview_url === undefined ? {} : { previewUrl: artifact.preview_url }
35209
+ } : {
35210
+ kind: "artifact",
35211
+ artifactKind: artifact.kind,
35212
+ artifactId: artifact.artifact_id,
35213
+ occurredAt,
35214
+ title: artifact.title,
35215
+ site: artifact.site,
35216
+ url: artifact.url
35217
+ };
35218
+ return {
35219
+ ...state,
35220
+ publications: [...state.publications, publication],
35221
+ transcript: [...state.transcript, timelineArtifact]
35222
+ };
35195
35223
  }
35196
35224
  function sessionSystemObservationPresentation(notifications) {
35197
35225
  if (notifications.length !== 1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/remy-cli",
3
- "version": "1.23.0-rc.0",
3
+ "version": "1.24.0-rc.0",
4
4
  "description": "Remy, the Coding Agent terminal client.",
5
5
  "type": "module",
6
6
  "bin": {