# Posit Assistant

> Import Posit Assistant local conversation trees with recorded reply models, usage, and tools.

Hansard reads Posit Assistant version 3 conversation stores under
`~/.posit/assistant/workspaces`. The native terminal client uses this store.
Other hosts require a compatible local store; their interface cannot be
inferred from these records.

## Source IDs

| Source            | Use it for                                                             |
| ----------------- | ---------------------------------------------------------------------- |
| `posit-assistant` | Local version 3 workspace conversation trees and their LM/UI sidecars. |

## How the import works

Each conversation has a tree of message nodes, model messages, and a separate
record of the rendered conversation. Hansard follows the selected child at each branch from the
root, so abandoned branches do not appear interleaved with the conversation.
All retained branches remain in the raw source copy. The workspace record
provides the working folder; a local checkout can establish its repository.
The source does not record a Git remote or distinguish terminal, IDE, and
desktop execution reliably.

The recorded model and token counters attach to the reply that produced them.
The conversation's current model and thinking-effort settings remain separate;
they cannot establish historical settings for replies with missing metadata.
Tool calls retain their arguments, and tool results retain their output and
call identifiers. Before replacing an archive, Hansard checks that the source
has not lost previously retained tree nodes or model records, and that its
activity revision has not moved backward. A shorter selected branch is allowed
when the full retained tree remains intact.

## Import and keep current

**Import now**

```sh
hansard import --source posit-assistant --since all
hansard index rebuild
```

**Keep current**

Automatic source selection includes `posit-assistant`. For a custom list:

```sh
hansard config sources enable posit-assistant
hansard watcher restart
```

## Review the import in the app

1. When the import finishes, open **Conversations** and select **Filter & sort**.
2. Set **Source** to **Posit Assistant** and set **Time** to the window you imported. Use **Folder** to narrow the list when you use this harness in several projects.
3. Select a conversation to check its messages, tool calls, files, commits, model, and token usage.

To keep archiving new sessions from a local harness, open **Settings → Imports**. **Automatic** follows every supported harness installed on this computer. **Custom** lets you turn individual harnesses on or off. Cloud sources and account exports never run from here; each needs its own import command. If a conversation you expect is missing after you reset the filters, run the import command on this page again with `--explain-skips` where the source supports it.

Compare the selected branch and its tools with the original conversation.
Check reported coverage before interpreting token counters as billed usage.

## What Hansard preserves

- Prompts, replies, recorded reasoning, tool calls, and text or JSON tool output.
- Recorded reply model IDs, provider metadata, and token counters, including zero.
- Conversation title, timestamps, working folder, revision, and terminal outcome.
- Exact bytes of the conversation tree, LM/UI sidecars, and workspace record.
- Alternate branch membership and current settings in archive metadata.

## Known limitations

- Only version 3 local stores are supported. JSON/HTML exports and historical
  Positron Assistant or Databot stores require separate importers.
- Alternate branches, UI-only events, unknown content blocks, and attachment
  references remain raw-only. Referenced attachment files are not collected.
- Account, organization, harness version, originating interface, historical
  effort, and billing are unavailable unless future source records establish them.
- A message without its own LM timestamp uses tree order. That fallback is
  marked so the viewer does not present it as an exact message time.
- Compaction links remain preserved; native compaction and child-session trials
  are pending. Uninspected child-session kinds are rejected.
- Files larger than 128 MiB, bundles larger than 256 MiB, and sidecars or trees
  with more than 200,000 records are rejected. Unstable or incomplete saves are
  retried on the next import.
- `HANSARD_POSIT_ASSISTANT_DIR` selects a workspace-store root. Posit's
  `storage.path` setting did not relocate TUI history in the native trial.
- Native terminal-format validation used a local synthetic model endpoint.
  Hosted model billing and other hosts have not passed native acceptance.

## Refresh an existing archive

```sh
hansard import --source posit-assistant --since all
hansard index rebuild
```

If a source regression is reported, restore the complete provider history
before retrying. A reimport does not reconstruct records missing from the source.
