@langspan/client 0.38.0 → 0.40.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.
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # LangSpan TypeScript client
2
2
 
3
- A client for the [LangSpan coordination
4
- protocol](https://github.com/Langspan/LangSpan.dev/blob/main/docs/protocol/README.md).
3
+ A TypeScript client for the [LangSpan coordination protocol](https://github.com/Langspan/LangSpan.dev/blob/main/docs/protocol/README.md), which connects integrations to LangSpan—the shipping layer for AI coding agents.
5
4
  It sends typed commands to a running LangSpan coordinator and returns typed
6
5
  outcomes. It has no runtime dependencies.
7
6
 
@@ -2,7 +2,7 @@ import type { WorkspaceRegisterCommand, WorkspaceListCommand, WorkspaceMoveComma
2
2
  import type { IntentPlanCommand, IntentSetCommand, IntentEndCommand, ReserveCommand, AdmitCommand, AdmitExpectedCommand, AdmitToolCommand, ObserveSourceCommand, ReportKeysCommand, CompleteCommand, ObserveCommand, ObserveToolCommand, ObserveDiskCommand, ObserveBranchCommand, ObserveWorkspaceGitCommand, RecordGitTroubleCommand } from "./admission.ts";
3
3
  import type { RemoteEnableCommand, RemoteDisableCommand, RemoteOutboxCommand, RemotePublishedCommand, RemoteSentCommand, ObserveRemoteCommand, ForgetRemoteCommand, RemoteWithdrawnCommand } from "./remote.ts";
4
4
  import type { RecordCheckCommand, FlakyTestsCommand, ForgetFlakyTestCommand, ExamplesCommand, RetireExampleCommand, ShowExampleCommand, AutoCheckEnableCommand, AutoCheckDisableCommand, WakeEnableCommand, WakeDisableCommand, ObserveWakeCommand, WakeAttachCommand, WakeAnswerCommand, CheckStatusCommand, LandingReadinessCommand, RecordLandingCommand, TakeTurnCommand, ReleaseTurnCommand, LeaveTurnQueueCommand, TurnQueueCommand } from "./checks.ts";
5
- import type { ObserveInterfaceCommand, ObserveInterfaceDependentsCommand, RememberCommand, ObserveNoteAnchorsCommand, ForgetCommand, DecideCommand, DecisionsCommand, SendMessageCommand, AckMessageCommand, ShowMessageCommand, MessageStatusCommand, HandoffCommand, RetractMessageCommand } from "./notes.ts";
5
+ import type { ObserveInterfaceCommand, ObserveInterfaceDependentsCommand, RememberCommand, ObserveNoteAnchorsCommand, ForgetCommand, DecideCommand, DecisionsCommand, SendMessageCommand, AckMessageCommand, ConfirmMessageOutputCommand, ShowMessageCommand, MessageStatusCommand, HandoffCommand, RetractMessageCommand } from "./notes.ts";
6
6
  import type { ObserveScanCommand, ObserveCheckoutCommand, ObserveCheckoutRunCommand, ObserveUncoordinatedCommand, ObserveHostsCommand } from "./scans.ts";
7
7
  import type { RecapCommand, TrailsCommand, RecallCommand, HistoryCommand, TodayCommand, GitTroubleCommand, CollisionResolveCommand, CollisionsCommand, ReportCommand, CountCommand, UsageCommand, StatusLineCommand, StatusCommand, StatusRecordsCommand, DashboardCommand, VersionCommand, EventsCommand, ChangesCommand, CompactCommand } from "./reads.ts";
8
8
  import type { RecordRefusalCommand, PolicyCommand, SetPolicyCommand, HoldersCommand, RecordWaitCommand, RecordUsageCommand } from "./policy.ts";
@@ -19,7 +19,7 @@ export type * from "./policy.ts";
19
19
  export type * from "./graph.ts";
20
20
  export type * from "./turns.ts";
21
21
  /** Every `op` of wire version 10, sorted. */
22
- export declare const OPS: readonly ["ack_message", "acknowledge_interface", "admit", "admit_expected", "admit_tool", "adopt", "auto_check_disable", "auto_check_enable", "between_steps", "brief", "changes", "check_calls", "check_status", "check_write", "collision_resolve", "collisions", "compact", "complete", "confirm_told", "count", "dashboard", "decide", "decisions", "events", "examples", "flaky_tests", "forget", "forget_flaky_test", "forget_remote", "forget_told", "git_trouble", "graph_blind_spots", "graph_context", "graph_export", "graph_impact", "graph_import", "graph_inflight", "graph_map", "graph_path", "graph_references", "graph_symbol", "handoff", "history", "holders", "intent_end", "intent_plan", "intent_set", "interface_shown", "landing_readiness", "leave_turn_queue", "message_status", "observe", "observe_branch", "observe_checkout", "observe_checkout_run", "observe_disk", "observe_hosts", "observe_interface", "observe_interface_dependents", "observe_note_anchors", "observe_presence", "observe_remote", "observe_scan", "observe_session_liveness", "observe_source", "observe_tool", "observe_tool_batch", "observe_uncoordinated", "observe_wake", "observe_workspace_git", "outline_read", "plan_work", "policy", "recall", "recap", "record_check", "record_context", "record_git_trouble", "record_landing", "record_refusal", "record_usage", "record_wait", "release_turn", "remember", "remote_disable", "remote_enable", "remote_outbox", "remote_published", "remote_sent", "remote_withdrawn", "report", "report_keys", "reserve", "retire_example", "retract_message", "send_message", "session_end", "session_prompt", "session_register", "session_seen", "session_stop", "set_policy", "set_presence", "set_prompt_targets", "show_example", "show_message", "status", "status_line", "status_records", "take_turn", "today", "trails", "turn_queue", "usage", "version", "wake_answer", "wake_attach", "wake_disable", "wake_enable", "workspace_list", "workspace_move", "workspace_register", "workspace_remove"];
22
+ export declare const OPS: readonly ["ack_message", "acknowledge_interface", "admit", "admit_expected", "admit_tool", "adopt", "auto_check_disable", "auto_check_enable", "between_steps", "brief", "changes", "check_calls", "check_status", "check_write", "collision_resolve", "collisions", "compact", "complete", "confirm_message_output", "confirm_told", "count", "dashboard", "decide", "decisions", "events", "examples", "flaky_tests", "forget", "forget_flaky_test", "forget_remote", "forget_told", "git_trouble", "graph_blind_spots", "graph_context", "graph_export", "graph_impact", "graph_import", "graph_inflight", "graph_map", "graph_path", "graph_references", "graph_symbol", "handoff", "history", "holders", "intent_end", "intent_plan", "intent_set", "interface_shown", "landing_readiness", "leave_turn_queue", "message_status", "observe", "observe_branch", "observe_checkout", "observe_checkout_run", "observe_disk", "observe_hosts", "observe_interface", "observe_interface_dependents", "observe_note_anchors", "observe_presence", "observe_remote", "observe_scan", "observe_session_liveness", "observe_source", "observe_tool", "observe_tool_batch", "observe_uncoordinated", "observe_wake", "observe_workspace_git", "outline_read", "plan_work", "policy", "recall", "recap", "record_check", "record_context", "record_git_trouble", "record_landing", "record_refusal", "record_usage", "record_wait", "release_turn", "remember", "remote_disable", "remote_enable", "remote_outbox", "remote_published", "remote_sent", "remote_withdrawn", "report", "report_keys", "reserve", "retire_example", "retract_message", "send_message", "session_end", "session_prompt", "session_register", "session_seen", "session_stop", "set_policy", "set_presence", "set_prompt_targets", "show_example", "show_message", "status", "status_line", "status_records", "take_turn", "today", "trails", "turn_queue", "usage", "version", "wake_answer", "wake_attach", "wake_disable", "wake_enable", "workspace_list", "workspace_move", "workspace_register", "workspace_remove"];
23
23
  export type Op = (typeof OPS)[number];
24
24
  /** A command of this coordinator, told apart by `op`. */
25
- export type Command = WorkspaceRegisterCommand | WorkspaceListCommand | WorkspaceMoveCommand | WorkspaceRemoveCommand | SessionRegisterCommand | ObserveSessionLivenessCommand | SessionSeenCommand | RecordContextCommand | ForgetToldCommand | ConfirmToldCommand | IntentSetCommand | IntentPlanCommand | IntentEndCommand | ReserveCommand | AdmitCommand | AdmitExpectedCommand | AdmitToolCommand | ObserveSourceCommand | ReportKeysCommand | CompleteCommand | ObserveCommand | ObserveToolCommand | ObserveDiskCommand | ObserveBranchCommand | ObserveWorkspaceGitCommand | RecordGitTroubleCommand | RemoteEnableCommand | RemoteDisableCommand | RemoteOutboxCommand | RemotePublishedCommand | RemoteSentCommand | ObserveRemoteCommand | ForgetRemoteCommand | RemoteWithdrawnCommand | RecordCheckCommand | FlakyTestsCommand | ForgetFlakyTestCommand | ExamplesCommand | RetireExampleCommand | ShowExampleCommand | AutoCheckEnableCommand | AutoCheckDisableCommand | WakeEnableCommand | WakeDisableCommand | ObserveWakeCommand | WakeAttachCommand | WakeAnswerCommand | CheckStatusCommand | LandingReadinessCommand | RecordLandingCommand | TakeTurnCommand | ReleaseTurnCommand | LeaveTurnQueueCommand | TurnQueueCommand | ObserveInterfaceCommand | ObserveInterfaceDependentsCommand | RememberCommand | ObserveNoteAnchorsCommand | ForgetCommand | DecideCommand | DecisionsCommand | SendMessageCommand | AckMessageCommand | ShowMessageCommand | MessageStatusCommand | HandoffCommand | RetractMessageCommand | ObserveScanCommand | ObserveCheckoutCommand | ObserveCheckoutRunCommand | ObserveUncoordinatedCommand | ObserveHostsCommand | RecapCommand | TrailsCommand | RecallCommand | HistoryCommand | TodayCommand | GitTroubleCommand | CollisionResolveCommand | CollisionsCommand | ReportCommand | CountCommand | UsageCommand | StatusLineCommand | StatusCommand | StatusRecordsCommand | DashboardCommand | VersionCommand | EventsCommand | ChangesCommand | CompactCommand | RecordRefusalCommand | PolicyCommand | SetPolicyCommand | HoldersCommand | RecordWaitCommand | RecordUsageCommand | GraphSymbolCommand | GraphReferencesCommand | GraphImpactCommand | GraphBlindSpotsCommand | GraphPathCommand | GraphMapCommand | PlanWorkCommand | GraphContextCommand | GraphInflightCommand | GraphExportCommand | GraphImportCommand | CheckWriteCommand | CheckCallsCommand | AcknowledgeInterfaceCommand | BetweenStepsCommand | InterfaceShownCommand | OutlineReadCommand | SessionPromptCommand | SetPromptTargetsCommand | ObservePresenceCommand | SetPresenceCommand | SessionEndCommand | SessionStopCommand | ObserveToolBatchCommand | BriefCommand | AdoptCommand;
25
+ export type Command = WorkspaceRegisterCommand | WorkspaceListCommand | WorkspaceMoveCommand | WorkspaceRemoveCommand | SessionRegisterCommand | ObserveSessionLivenessCommand | SessionSeenCommand | RecordContextCommand | ForgetToldCommand | ConfirmToldCommand | IntentSetCommand | IntentPlanCommand | IntentEndCommand | ReserveCommand | AdmitCommand | AdmitExpectedCommand | AdmitToolCommand | ObserveSourceCommand | ReportKeysCommand | CompleteCommand | ObserveCommand | ObserveToolCommand | ObserveDiskCommand | ObserveBranchCommand | ObserveWorkspaceGitCommand | RecordGitTroubleCommand | RemoteEnableCommand | RemoteDisableCommand | RemoteOutboxCommand | RemotePublishedCommand | RemoteSentCommand | ObserveRemoteCommand | ForgetRemoteCommand | RemoteWithdrawnCommand | RecordCheckCommand | FlakyTestsCommand | ForgetFlakyTestCommand | ExamplesCommand | RetireExampleCommand | ShowExampleCommand | AutoCheckEnableCommand | AutoCheckDisableCommand | WakeEnableCommand | WakeDisableCommand | ObserveWakeCommand | WakeAttachCommand | WakeAnswerCommand | CheckStatusCommand | LandingReadinessCommand | RecordLandingCommand | TakeTurnCommand | ReleaseTurnCommand | LeaveTurnQueueCommand | TurnQueueCommand | ObserveInterfaceCommand | ObserveInterfaceDependentsCommand | RememberCommand | ObserveNoteAnchorsCommand | ForgetCommand | DecideCommand | DecisionsCommand | SendMessageCommand | AckMessageCommand | ConfirmMessageOutputCommand | ShowMessageCommand | MessageStatusCommand | HandoffCommand | RetractMessageCommand | ObserveScanCommand | ObserveCheckoutCommand | ObserveCheckoutRunCommand | ObserveUncoordinatedCommand | ObserveHostsCommand | RecapCommand | TrailsCommand | RecallCommand | HistoryCommand | TodayCommand | GitTroubleCommand | CollisionResolveCommand | CollisionsCommand | ReportCommand | CountCommand | UsageCommand | StatusLineCommand | StatusCommand | StatusRecordsCommand | DashboardCommand | VersionCommand | EventsCommand | ChangesCommand | CompactCommand | RecordRefusalCommand | PolicyCommand | SetPolicyCommand | HoldersCommand | RecordWaitCommand | RecordUsageCommand | GraphSymbolCommand | GraphReferencesCommand | GraphImpactCommand | GraphBlindSpotsCommand | GraphPathCommand | GraphMapCommand | PlanWorkCommand | GraphContextCommand | GraphInflightCommand | GraphExportCommand | GraphImportCommand | CheckWriteCommand | CheckCallsCommand | AcknowledgeInterfaceCommand | BetweenStepsCommand | InterfaceShownCommand | OutlineReadCommand | SessionPromptCommand | SetPromptTargetsCommand | ObservePresenceCommand | SetPresenceCommand | SessionEndCommand | SessionStopCommand | ObserveToolBatchCommand | BriefCommand | AdoptCommand;
@@ -21,6 +21,7 @@ export const OPS = [
21
21
  "collisions",
22
22
  "compact",
23
23
  "complete",
24
+ "confirm_message_output",
24
25
  "confirm_told",
25
26
  "count",
26
27
  "dashboard",
@@ -74,6 +74,14 @@ export interface AckMessageCommand {
74
74
  /** The session's `langspan mcp` process pushed it; capability `push_messages`. */
75
75
  pushed?: boolean;
76
76
  }
77
+ /** Confirm the messages written to the host from a delivering brief. Capability `output_receipts`. */
78
+ export interface ConfirmMessageOutputCommand {
79
+ op: "confirm_message_output";
80
+ session_id: string;
81
+ brief_id: string;
82
+ message_ids: string[];
83
+ inflight_keys?: string[];
84
+ }
77
85
  /** Read-only: one message as it was sent. */
78
86
  export interface ShowMessageCommand {
79
87
  op: "show_message";
@@ -55,6 +55,9 @@ export interface BriefCommand {
55
55
  left?: string[];
56
56
  changes_only?: boolean;
57
57
  confirm?: boolean;
58
+ /** Keep offered messages pending until their output is confirmed. Capability `output_receipts`. */
59
+ confirm_messages?: boolean;
60
+ confirm_inflight?: boolean;
58
61
  /** The client shows teammates' messages from other machines; capability `remote_messages`. */
59
62
  remote_messages?: boolean;
60
63
  }
package/dist/errors.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * crate's own test pins to the enum. The usage guide's "Error codes" table
6
6
  * says what each one means.
7
7
  */
8
- export declare const ERROR_CODES: readonly ["adoption_chain", "adoption_changed", "already_adopted", "already_published", "already_retracted", "coordination_unavailable", "different_repository", "different_task", "index_export_failed", "index_import_refused", "index_unavailable", "internal", "invalid_adoption", "invalid_alert", "invalid_away", "invalid_base", "invalid_batch", "invalid_branch_oids", "invalid_branch_ref", "invalid_calls", "invalid_check", "invalid_check_report", "invalid_checkout", "invalid_command", "invalid_conflict_table", "invalid_content_digest", "invalid_coverage", "invalid_cursor", "invalid_deadline", "invalid_digest", "invalid_event", "invalid_failure", "invalid_frame", "invalid_git_oid", "invalid_graph_context", "invalid_hosts", "invalid_id", "invalid_input_digest", "invalid_key", "invalid_landing", "invalid_left", "invalid_limit", "invalid_line_digests", "invalid_lines", "invalid_message", "invalid_move", "invalid_name", "invalid_note", "invalid_notice", "invalid_number", "invalid_overwrites", "invalid_participant", "invalid_path", "invalid_paths", "invalid_payload", "invalid_policy", "invalid_presence", "invalid_process_identity", "invalid_publication", "invalid_query", "invalid_reason", "invalid_refusal", "invalid_regions", "invalid_remote", "invalid_request", "invalid_request_id", "invalid_retention", "invalid_root", "invalid_sequence", "invalid_session", "invalid_subscription", "invalid_summary", "invalid_symbol", "invalid_symbols", "invalid_tag", "invalid_test_name", "invalid_test_results", "invalid_told", "invalid_ttl", "invalid_turn", "invalid_wait", "invalid_wake", "invalid_window", "invalid_workspace_verification", "lease_expired", "lease_id_reused", "lease_not_active", "lease_not_found", "message_not_kept", "message_secret_shape", "no_current_evidence", "not_checkout_top", "not_holder", "not_queued", "not_sender", "old_root_exists", "old_root_missing", "other_workspace", "own_publication", "owner_grant_off", "policy_fixed", "presence_off", "process_identity_mismatch", "read_timeout", "receipt_unreadable", "recipient_not_found", "remote_messages_full", "remote_messages_off", "remote_messages_quota", "remote_messages_unsupported", "remote_not_enabled", "remote_sharing_on", "report_busy", "report_unavailable", "request_id_conflict", "response_too_large", "root_derived_id", "scope_unknown", "secret_in_command", "secret_in_test_name", "sender_not_in_workspace", "session_conflict", "session_ended", "session_live", "session_not_found", "snapshot_mismatch", "stale_lease", "stale_liveness_observation", "stale_session", "status_part", "storage_error", "storage_operation", "subscriptions_full", "symbol_ambiguous", "symbol_not_found", "too_many_attempts", "too_many_inputs", "too_many_keys", "too_many_paths", "too_many_related_operations", "too_many_verified_overlaps", "turn_lost", "unknown_message", "unknown_notice", "unknown_session", "unknown_wake", "unknown_workspace", "unsupported_version", "wake_not_due", "workspace_busy", "workspace_changed", "workspace_conflict", "workspace_in_use", "workspace_not_found"];
8
+ export declare const ERROR_CODES: readonly ["adoption_chain", "adoption_changed", "already_adopted", "already_published", "already_retracted", "coordination_unavailable", "different_repository", "different_task", "event_too_large", "index_export_failed", "index_import_refused", "index_unavailable", "internal", "invalid_adoption", "invalid_alert", "invalid_away", "invalid_base", "invalid_batch", "invalid_branch_oids", "invalid_branch_ref", "invalid_calls", "invalid_check", "invalid_check_report", "invalid_checkout", "invalid_command", "invalid_conflict_table", "invalid_content_digest", "invalid_coverage", "invalid_cursor", "invalid_deadline", "invalid_digest", "invalid_event", "invalid_failure", "invalid_frame", "invalid_git_oid", "invalid_graph_context", "invalid_hosts", "invalid_id", "invalid_input_digest", "invalid_key", "invalid_landing", "invalid_left", "invalid_limit", "invalid_line_digests", "invalid_lines", "invalid_message", "invalid_move", "invalid_name", "invalid_note", "invalid_notice", "invalid_number", "invalid_overwrites", "invalid_participant", "invalid_path", "invalid_paths", "invalid_payload", "invalid_policy", "invalid_presence", "invalid_process_identity", "invalid_publication", "invalid_query", "invalid_reason", "invalid_refusal", "invalid_regions", "invalid_remote", "invalid_request", "invalid_request_id", "invalid_retention", "invalid_root", "invalid_sequence", "invalid_session", "invalid_subscription", "invalid_summary", "invalid_symbol", "invalid_symbols", "invalid_tag", "invalid_test_name", "invalid_test_results", "invalid_told", "invalid_ttl", "invalid_turn", "invalid_wait", "invalid_wake", "invalid_window", "invalid_workspace_verification", "lease_expired", "lease_id_reused", "lease_not_active", "lease_not_found", "message_not_kept", "message_secret_shape", "no_current_evidence", "not_checkout_top", "not_holder", "not_queued", "not_sender", "old_root_exists", "old_root_missing", "other_workspace", "own_publication", "owner_grant_off", "policy_fixed", "presence_off", "process_identity_mismatch", "read_timeout", "receipt_unreadable", "recipient_not_found", "remote_messages_full", "remote_messages_off", "remote_messages_quota", "remote_messages_unsupported", "remote_not_enabled", "remote_sharing_on", "report_busy", "report_unavailable", "request_id_conflict", "response_too_large", "root_derived_id", "scope_unknown", "secret_in_command", "secret_in_test_name", "sender_not_in_workspace", "session_conflict", "session_ended", "session_live", "session_not_found", "snapshot_mismatch", "stale_lease", "stale_liveness_observation", "stale_session", "status_part", "storage_error", "storage_operation", "subscriptions_full", "symbol_ambiguous", "symbol_not_found", "too_many_attempts", "too_many_inputs", "too_many_keys", "too_many_paths", "too_many_related_operations", "too_many_verified_overlaps", "turn_lost", "unknown_message", "unknown_notice", "unknown_session", "unknown_wake", "unknown_workspace", "unsupported_version", "wake_not_due", "workspace_busy", "workspace_changed", "workspace_conflict", "workspace_in_use", "workspace_not_found"];
9
9
  /** A code of `ERROR_CODES`. */
10
10
  export type ErrorCode = (typeof ERROR_CODES)[number];
11
11
  /**
package/dist/errors.js CHANGED
@@ -15,6 +15,7 @@ export const ERROR_CODES = [
15
15
  "coordination_unavailable",
16
16
  "different_repository",
17
17
  "different_task",
18
+ "event_too_large",
18
19
  "index_export_failed",
19
20
  "index_import_refused",
20
21
  "index_unavailable",
@@ -2,7 +2,7 @@ import type { WorkspaceOutcome, WorkspacesOutcome, WorkspaceMovedOutcome, Worksp
2
2
  import type { IntentOutcome, IntentEndedOutcome, ReservedOutcome, AdmittedOutcome, ConflictOutcome, CompletedOutcome, ObservedOutcome, DiskObservedOutcome, BranchObservedOutcome, GitTroubleRecordedOutcome, BriefingOutcome, StaleBaseOutcome, UnreadLinesOutcome, InterfaceHeldOutcome, SourceObservedOutcome, KeysReportedOutcome } from "./admission.ts";
3
3
  import type { StatusOutcome, StatusRecordsOutcome, EventsOutcome, ChangesOutcome, WorkspaceGitOutcome, RemoteLinkOutcome, RemoteDisabledOutcome, RemoteOutboxOutcome, RemoteSentOutcome, CompactionOutcome, RemoteObservedOutcome, DashboardOutcome, VersionOutcome, ErrorOutcome } from "./log.ts";
4
4
  import type { AutoCheckOutcome, AutoCheckDisabledOutcome, WakeOutcome, CheckRecordedOutcome, ChecksOutcome, FlakyTestsOutcome, FlakyTestForgottenOutcome, ExamplesOutcome, ExampleRetiredOutcome, ExampleShownOutcome, ReadinessOutcome, LandedOutcome, TurnOutcome, TurnBusyOutcome, TurnWaitingOutcome, TurnUnavailableOutcome, TurnQueueOutcome, TurnQueueLeftOutcome, TurnReleasedOutcome } from "./checks.ts";
5
- import type { InterfaceObservedOutcome, InterfaceDependentsObservedOutcome, RememberedOutcome, NoteAnchorsObservedOutcome, DecidedOutcome, DecisionsOutcome, ForgottenOutcome, MessageSentOutcome, MessageAcknowledgedOutcome, MessageShownOutcome, MessageStatusOutcome, MessageRetractedOutcome, RecapOutcome, TrailsOutcome, RecallOutcome, HistoryOutcome, TodayOutcome, GitTroubleOutcome, CollisionResolvedOutcome, CollisionsOutcome, ReportOutcome, CountOutcome, UsageOutcome, StatusLineOutcome, RefusalRecordedOutcome, PolicyOutcome, HoldersOutcome, WaitRecordedOutcome, UsageRecordedOutcome } from "./notes.ts";
5
+ import type { InterfaceObservedOutcome, InterfaceDependentsObservedOutcome, RememberedOutcome, NoteAnchorsObservedOutcome, DecidedOutcome, DecisionsOutcome, ForgottenOutcome, MessageSentOutcome, MessageAcknowledgedOutcome, MessageOutputConfirmedOutcome, MessageShownOutcome, MessageStatusOutcome, MessageRetractedOutcome, RecapOutcome, TrailsOutcome, RecallOutcome, HistoryOutcome, TodayOutcome, GitTroubleOutcome, CollisionResolvedOutcome, CollisionsOutcome, ReportOutcome, CountOutcome, UsageOutcome, StatusLineOutcome, RefusalRecordedOutcome, PolicyOutcome, HoldersOutcome, WaitRecordedOutcome, UsageRecordedOutcome } from "./notes.ts";
6
6
  import type { ScanObservedOutcome, HostsObservedOutcome, CheckoutObservedOutcome, CheckoutRunObservedOutcome, UncoordinatedObservedOutcome, GraphOutcome, GraphContextOutcome, GraphInflightOutcome, GraphPathOutcome, GraphMapOutcome, PlanWorkOutcome, GraphExportedOutcome, GraphImportedOutcome, CallBreaksOutcome, WriteCheckOutcome, GraphBlindSpotsOutcome, InterfaceAcknowledgedOutcome, ReadOutlineOutcome, BetweenStepsOutcome } from "./graph.ts";
7
7
  export type * from "./sessions.ts";
8
8
  export type * from "./admission.ts";
@@ -11,10 +11,10 @@ export type * from "./checks.ts";
11
11
  export type * from "./notes.ts";
12
12
  export type * from "./graph.ts";
13
13
  /** Every outcome `type` of wire version 10, sorted. */
14
- export declare const OUTCOME_TYPES: readonly ["admitted", "adopted", "auto_check", "auto_check_disabled", "between_steps", "branch_observed", "briefing", "call_breaks", "changes", "check_recorded", "checkout_observed", "checkout_run_observed", "checks", "collision_resolved", "collisions", "compaction", "completed", "conflict", "context_recorded", "count", "dashboard", "decided", "decisions", "disk_observed", "error", "events", "example_retired", "example_shown", "examples", "flaky_test_forgotten", "flaky_tests", "forgotten", "git_trouble", "git_trouble_recorded", "graph", "graph_blind_spots", "graph_context", "graph_exported", "graph_imported", "graph_inflight", "graph_map", "graph_path", "history", "holders", "hosts_observed", "intent", "intent_ended", "interface_acknowledged", "interface_dependents_observed", "interface_held", "interface_observed", "keys_reported", "landed", "message_acknowledged", "message_retracted", "message_sent", "message_shown", "message_status", "note_anchors_observed", "observed", "plan_work", "policy", "presence", "presence_observed", "prompt_targets", "read_outline", "readiness", "recall", "recap", "refusal_recorded", "remembered", "remote_disabled", "remote_link", "remote_observed", "remote_outbox", "remote_sent", "report", "reserved", "scan_observed", "session", "session_ended", "session_liveness", "session_prompted", "session_seen", "session_stopped", "source_observed", "stale_base", "status", "status_line", "status_records", "today", "told_confirmed", "told_forgotten", "tool_batch_observed", "trails", "turn", "turn_busy", "turn_queue", "turn_queue_left", "turn_released", "turn_unavailable", "turn_waiting", "uncoordinated_observed", "unread_lines", "usage", "usage_recorded", "version", "wait_recorded", "wake", "workspace", "workspace_git", "workspace_moved", "workspace_removal", "workspaces", "write_check"];
14
+ export declare const OUTCOME_TYPES: readonly ["admitted", "adopted", "auto_check", "auto_check_disabled", "between_steps", "branch_observed", "briefing", "call_breaks", "changes", "check_recorded", "checkout_observed", "checkout_run_observed", "checks", "collision_resolved", "collisions", "compaction", "completed", "conflict", "context_recorded", "count", "dashboard", "decided", "decisions", "disk_observed", "error", "events", "example_retired", "example_shown", "examples", "flaky_test_forgotten", "flaky_tests", "forgotten", "git_trouble", "git_trouble_recorded", "graph", "graph_blind_spots", "graph_context", "graph_exported", "graph_imported", "graph_inflight", "graph_map", "graph_path", "history", "holders", "hosts_observed", "intent", "intent_ended", "interface_acknowledged", "interface_dependents_observed", "interface_held", "interface_observed", "keys_reported", "landed", "message_acknowledged", "message_output_confirmed", "message_retracted", "message_sent", "message_shown", "message_status", "note_anchors_observed", "observed", "plan_work", "policy", "presence", "presence_observed", "prompt_targets", "read_outline", "readiness", "recall", "recap", "refusal_recorded", "remembered", "remote_disabled", "remote_link", "remote_observed", "remote_outbox", "remote_sent", "report", "reserved", "scan_observed", "session", "session_ended", "session_liveness", "session_prompted", "session_seen", "session_stopped", "source_observed", "stale_base", "status", "status_line", "status_records", "today", "told_confirmed", "told_forgotten", "tool_batch_observed", "trails", "turn", "turn_busy", "turn_queue", "turn_queue_left", "turn_released", "turn_unavailable", "turn_waiting", "uncoordinated_observed", "unread_lines", "usage", "usage_recorded", "version", "wait_recorded", "wake", "workspace", "workspace_git", "workspace_moved", "workspace_removal", "workspaces", "write_check"];
15
15
  export type OutcomeType = (typeof OUTCOME_TYPES)[number];
16
16
  /** An answer's outcome, told apart by `type`. */
17
- export type Outcome = WorkspaceOutcome | WorkspacesOutcome | WorkspaceMovedOutcome | WorkspaceRemovalOutcome | SessionOutcome | SessionLivenessOutcome | SessionSeenOutcome | ContextRecordedOutcome | ToldForgottenOutcome | ToldConfirmedOutcome | SessionPromptedOutcome | PromptTargetsOutcome | PresenceObservedOutcome | PresenceOutcome | SessionEndedOutcome | AdoptedOutcome | SessionStoppedOutcome | ToolBatchObservedOutcome | IntentOutcome | IntentEndedOutcome | ReservedOutcome | AdmittedOutcome | ConflictOutcome | CompletedOutcome | ObservedOutcome | DiskObservedOutcome | BranchObservedOutcome | GitTroubleRecordedOutcome | BriefingOutcome | StaleBaseOutcome | UnreadLinesOutcome | InterfaceHeldOutcome | SourceObservedOutcome | KeysReportedOutcome | StatusOutcome | StatusRecordsOutcome | EventsOutcome | ChangesOutcome | WorkspaceGitOutcome | RemoteLinkOutcome | RemoteDisabledOutcome | RemoteOutboxOutcome | RemoteSentOutcome | CompactionOutcome | RemoteObservedOutcome | DashboardOutcome | VersionOutcome | ErrorOutcome | AutoCheckOutcome | AutoCheckDisabledOutcome | WakeOutcome | CheckRecordedOutcome | ChecksOutcome | FlakyTestsOutcome | FlakyTestForgottenOutcome | ExamplesOutcome | ExampleRetiredOutcome | ExampleShownOutcome | ReadinessOutcome | LandedOutcome | TurnOutcome | TurnBusyOutcome | TurnWaitingOutcome | TurnUnavailableOutcome | TurnQueueOutcome | TurnQueueLeftOutcome | TurnReleasedOutcome | InterfaceObservedOutcome | InterfaceDependentsObservedOutcome | RememberedOutcome | NoteAnchorsObservedOutcome | DecidedOutcome | DecisionsOutcome | ForgottenOutcome | MessageSentOutcome | MessageAcknowledgedOutcome | MessageShownOutcome | MessageStatusOutcome | MessageRetractedOutcome | RecapOutcome | TrailsOutcome | RecallOutcome | HistoryOutcome | TodayOutcome | GitTroubleOutcome | CollisionResolvedOutcome | CollisionsOutcome | ReportOutcome | CountOutcome | UsageOutcome | StatusLineOutcome | RefusalRecordedOutcome | PolicyOutcome | HoldersOutcome | WaitRecordedOutcome | UsageRecordedOutcome | ScanObservedOutcome | HostsObservedOutcome | CheckoutObservedOutcome | CheckoutRunObservedOutcome | UncoordinatedObservedOutcome | GraphOutcome | GraphContextOutcome | GraphInflightOutcome | GraphPathOutcome | GraphMapOutcome | PlanWorkOutcome | GraphExportedOutcome | GraphImportedOutcome | CallBreaksOutcome | WriteCheckOutcome | GraphBlindSpotsOutcome | InterfaceAcknowledgedOutcome | ReadOutlineOutcome | BetweenStepsOutcome;
17
+ export type Outcome = WorkspaceOutcome | WorkspacesOutcome | WorkspaceMovedOutcome | WorkspaceRemovalOutcome | SessionOutcome | SessionLivenessOutcome | SessionSeenOutcome | ContextRecordedOutcome | ToldForgottenOutcome | ToldConfirmedOutcome | SessionPromptedOutcome | PromptTargetsOutcome | PresenceObservedOutcome | PresenceOutcome | SessionEndedOutcome | AdoptedOutcome | SessionStoppedOutcome | ToolBatchObservedOutcome | IntentOutcome | IntentEndedOutcome | ReservedOutcome | AdmittedOutcome | ConflictOutcome | CompletedOutcome | ObservedOutcome | DiskObservedOutcome | BranchObservedOutcome | GitTroubleRecordedOutcome | BriefingOutcome | StaleBaseOutcome | UnreadLinesOutcome | InterfaceHeldOutcome | SourceObservedOutcome | KeysReportedOutcome | StatusOutcome | StatusRecordsOutcome | EventsOutcome | ChangesOutcome | WorkspaceGitOutcome | RemoteLinkOutcome | RemoteDisabledOutcome | RemoteOutboxOutcome | RemoteSentOutcome | CompactionOutcome | RemoteObservedOutcome | DashboardOutcome | VersionOutcome | ErrorOutcome | AutoCheckOutcome | AutoCheckDisabledOutcome | WakeOutcome | CheckRecordedOutcome | ChecksOutcome | FlakyTestsOutcome | FlakyTestForgottenOutcome | ExamplesOutcome | ExampleRetiredOutcome | ExampleShownOutcome | ReadinessOutcome | LandedOutcome | TurnOutcome | TurnBusyOutcome | TurnWaitingOutcome | TurnUnavailableOutcome | TurnQueueOutcome | TurnQueueLeftOutcome | TurnReleasedOutcome | InterfaceObservedOutcome | InterfaceDependentsObservedOutcome | RememberedOutcome | NoteAnchorsObservedOutcome | DecidedOutcome | DecisionsOutcome | ForgottenOutcome | MessageSentOutcome | MessageAcknowledgedOutcome | MessageOutputConfirmedOutcome | MessageShownOutcome | MessageStatusOutcome | MessageRetractedOutcome | RecapOutcome | TrailsOutcome | RecallOutcome | HistoryOutcome | TodayOutcome | GitTroubleOutcome | CollisionResolvedOutcome | CollisionsOutcome | ReportOutcome | CountOutcome | UsageOutcome | StatusLineOutcome | RefusalRecordedOutcome | PolicyOutcome | HoldersOutcome | WaitRecordedOutcome | UsageRecordedOutcome | ScanObservedOutcome | HostsObservedOutcome | CheckoutObservedOutcome | CheckoutRunObservedOutcome | UncoordinatedObservedOutcome | GraphOutcome | GraphContextOutcome | GraphInflightOutcome | GraphPathOutcome | GraphMapOutcome | PlanWorkOutcome | GraphExportedOutcome | GraphImportedOutcome | CallBreaksOutcome | WriteCheckOutcome | GraphBlindSpotsOutcome | InterfaceAcknowledgedOutcome | ReadOutlineOutcome | BetweenStepsOutcome;
18
18
  /** Whether this client knows the outcome's `type`, and so its fields. */
19
19
  export declare function isKnownOutcome(outcome: {
20
20
  type: string;
@@ -58,6 +58,7 @@ export const OUTCOME_TYPES = [
58
58
  "keys_reported",
59
59
  "landed",
60
60
  "message_acknowledged",
61
+ "message_output_confirmed",
61
62
  "message_retracted",
62
63
  "message_sent",
63
64
  "message_shown",
@@ -52,6 +52,11 @@ export interface MessageAcknowledgedOutcome {
52
52
  message_id: string;
53
53
  acknowledged: boolean;
54
54
  }
55
+ export interface MessageOutputConfirmedOutcome {
56
+ type: "message_output_confirmed";
57
+ session_id: string;
58
+ confirmed: number;
59
+ }
55
60
  export interface MessageShownOutcome {
56
61
  type: "message_shown";
57
62
  message: ShownMessage;
@@ -14,7 +14,7 @@ export declare const MAX_FRAME_BYTES = 65536;
14
14
  * knows. Pinned to `src/protocol.rs` and `fixtures/capabilities/answer.json`
15
15
  * by the tests.
16
16
  */
17
- export declare const CAPABILITIES: readonly ["anchored_notes", "briefing_memory", "briefing_outcomes", "build_errors", "chained_events", "collision_resolve", "collisions", "composition_table", "confirmed_briefings", "delta_briefings", "git_trouble", "inflight_partial", "intent_contracts", "intent_frames", "intent_overlaps", "interface_calls", "interface_held", "interface_notices", "landing_held", "landing_rewrites", "message_paths", "notice_recipients", "opaque_events", "outline_reads", "place_told", "push_messages", "recap_since", "refusal_outcomes", "refused_roots", "remote_messages", "rename_held", "rename_holds", "renames", "reservations", "same_task", "sender_source", "session_limits", "standing_decisions", "subscriptions", "symbol_findings", "tolerant_responses", "trails", "unreadable_waits", "usage", "versioned_keys", "wake", "withheld_events", "worked_examples"];
17
+ export declare const CAPABILITIES: readonly ["anchored_notes", "briefing_memory", "briefing_outcomes", "build_errors", "chained_events", "collision_resolve", "collisions", "composition_table", "confirmed_briefings", "delta_briefings", "git_trouble", "inflight_output", "inflight_partial", "intent_contracts", "intent_frames", "intent_overlaps", "interface_calls", "interface_held", "interface_notices", "landing_held", "landing_rewrites", "message_paths", "notice_recipients", "opaque_events", "outline_reads", "output_receipts", "place_told", "push_messages", "recap_since", "refusal_outcomes", "refused_roots", "remote_messages", "rename_held", "rename_holds", "renames", "reservations", "same_task", "sender_source", "session_limits", "standing_decisions", "subscriptions", "symbol_findings", "tolerant_responses", "trails", "unreadable_waits", "usage", "versioned_keys", "wake", "withheld_events", "worked_examples"];
18
18
  /**
19
19
  * What the coordinator serves and this client does not speak yet (ADR 0043,
20
20
  * "Transport"). The client names the `subscriptions` capability, which
package/dist/protocol.js CHANGED
@@ -26,6 +26,7 @@ export const CAPABILITIES = [
26
26
  "confirmed_briefings",
27
27
  "delta_briefings",
28
28
  "git_trouble",
29
+ "inflight_output",
29
30
  "inflight_partial",
30
31
  "intent_contracts",
31
32
  "intent_frames",
@@ -39,6 +40,7 @@ export const CAPABILITIES = [
39
40
  "notice_recipients",
40
41
  "opaque_events",
41
42
  "outline_reads",
43
+ "output_receipts",
42
44
  "place_told",
43
45
  "push_messages",
44
46
  "recap_since",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@langspan/client",
3
- "version": "0.38.0",
4
- "description": "A TypeScript client for the LangSpan coordination protocol",
3
+ "version": "0.40.0",
4
+ "description": "Typed TypeScript client for LangSpan, the shipping layer for AI coding agents.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Langspan/LangSpan.dev/tree/main/clients/typescript",
7
7
  "bugs": "https://github.com/Langspan/LangSpan.dev/issues",
@@ -41,5 +41,13 @@
41
41
  "devDependencies": {
42
42
  "@types/node": "22.19.19",
43
43
  "typescript": "5.9.3"
44
- }
44
+ },
45
+ "keywords": [
46
+ "langspan",
47
+ "coding-agents",
48
+ "agent-coordination",
49
+ "protocol",
50
+ "typescript",
51
+ "mcp"
52
+ ]
45
53
  }