# @lssm-tech/lib.agent-collaboration

Tenant-safe multiplayer agent session collaboration primitives with deterministic replay.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `2.0.4`
- Package path: `packages/platform/agents/agent-collaboration`
- Manifest path: `packages/platform/agents/agent-collaboration/package.json`
- Manifest Git blob: `e3df823a6204e9444dc3e680e8175bbfe2794bf3`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/lib.agent-collaboration](https://lssm.co/docs/packages/lib.agent-collaboration/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.agent-collaboration.txt)

## Package metadata

```json
{
  "layer": "platform",
  "physicalArea": "agents",
  "primaryArea": "agents-and-context",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "sharedLibs",
    "catalogKind": "library",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "experimental"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Agents, execution and context](https://lssm.co/docs/areas/agents-and-context/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/platform/agents/agent-collaboration/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/README.md",
  "blobSha": "fce67d119891e4abcdaadac2c341ef5df196601e",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# @lssm-tech/lib.agent-collaboration

Tenant-safe multiplayer agent session primitives with append-only events, CAS
writes, replay cursors, revocable membership, and a deterministic in-memory
reference store.

This package owns collaboration semantics. It deliberately does not own agent
team execution, CRDT document state, transport authentication, or durable
storage. Bind those through their dedicated contracts and adapters.

High-impact commands (`redirect`, `pause`, `resume`, and `handoff`) require an
active owner or operator. Membership changes require an owner, and the service
will not allow the final active owner to be revoked or demoted.

Every write requires an expected revision and an idempotency key. Reusing a key
for a different intent fails explicitly; reconnects replay ordered events with
an `afterSequence` cursor.

Use `@lssm-tech/integration.runtime/agent-platform` for authenticated transport
and realtime signalling. Use
`@lssm-tech/integration.agent-durable-store/postgres` for tenant-bound durable
collaboration events and tamper-evident audit storage. Realtime signals are
notifications only; durable replay remains authoritative after disconnects,
process failure, or signal-provider outages.


## Declared capabilities

### Lib Agent Collaboration

Capability ID: `package.lssm.tech.lib.agent.collaboration`

Tenant-safe multiplayer agent session collaboration primitives with deterministic replay.

Use cases:

- Adopt tenant-safe multiplayer agent session collaboration primitives with deterministic replay

Constraints:

```json
{
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "avoidWhen": [
    "The @lssm-tech/lib.agent-collaboration package constraints do not match the target runtime or platform."
  ],
  "requires": [
    "TypeScript"
  ]
}
```

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "contractspec",
    "agents",
    "collaboration",
    "multiplayer",
    "lib",
    "agent"
  ],
  "pythonEquivalents": [],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/lib.agent-collaboration",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.agent-collaboration/in-memory-store",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.agent-collaboration/policy",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.agent-collaboration/service",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.agent-collaboration/state",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.agent-collaboration/store",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.agent-collaboration/types",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "sharedLibs",
  "kind": "library",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./in-memory-store",
    "./policy",
    "./service",
    "./state",
    "./store",
    "./types"
  ],
  "examples": [],
  "replacements": []
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[
  {
    "capabilityId": "package.lssm.tech.lib.agent.collaboration",
    "from": "@lssm-tech/lib.agent-collaboration",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.agent.collaboration",
    "from": "@lssm-tech/lib.agent-collaboration/in-memory-store",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.agent.collaboration",
    "from": "@lssm-tech/lib.agent-collaboration/policy",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.agent.collaboration",
    "from": "@lssm-tech/lib.agent-collaboration/service",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.agent.collaboration",
    "from": "@lssm-tech/lib.agent-collaboration/state",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.agent.collaboration",
    "from": "@lssm-tech/lib.agent-collaboration/store",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.agent.collaboration",
    "from": "@lssm-tech/lib.agent-collaboration/types",
    "symbols": []
  }
]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/lib.agent-collaboration` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/src/index.ts); verified source file.

- `@lssm-tech/lib.agent-collaboration/in-memory-store` — subpath `./in-memory-store`
  - `unconditional`: `./src/in-memory-store.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/src/in-memory-store.ts); verified source file.

- `@lssm-tech/lib.agent-collaboration/policy` — subpath `./policy`
  - `unconditional`: `./src/policy.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/src/policy.ts); verified source file.

- `@lssm-tech/lib.agent-collaboration/service` — subpath `./service`
  - `unconditional`: `./src/service.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/src/service.ts); verified source file.

- `@lssm-tech/lib.agent-collaboration/state` — subpath `./state`
  - `unconditional`: `./src/state.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/src/state.ts); verified source file.

- `@lssm-tech/lib.agent-collaboration/store` — subpath `./store`
  - `unconditional`: `./src/store.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/src/store.ts); verified source file.

- `@lssm-tech/lib.agent-collaboration/types` — subpath `./types`
  - `unconditional`: `./src/types.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/agent-collaboration/src/types.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "dist",
    "README.md"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./in-memory-store": {
      "types": "./dist/in-memory-store.d.ts",
      "browser": "./dist/browser/in-memory-store.js",
      "bun": "./dist/in-memory-store.js",
      "node": "./dist/node/in-memory-store.js",
      "default": "./dist/in-memory-store.js"
    },
    "./policy": {
      "types": "./dist/policy.d.ts",
      "browser": "./dist/browser/policy.js",
      "bun": "./dist/policy.js",
      "node": "./dist/node/policy.js",
      "default": "./dist/policy.js"
    },
    "./service": {
      "types": "./dist/service.d.ts",
      "browser": "./dist/browser/service.js",
      "bun": "./dist/service.js",
      "node": "./dist/node/service.js",
      "default": "./dist/service.js"
    },
    "./state": {
      "types": "./dist/state.d.ts",
      "browser": "./dist/browser/state.js",
      "bun": "./dist/state.js",
      "node": "./dist/node/state.js",
      "default": "./dist/state.js"
    },
    "./store": {
      "types": "./dist/store.d.ts",
      "browser": "./dist/browser/store.js",
      "bun": "./dist/store.js",
      "node": "./dist/node/store.js",
      "default": "./dist/store.js"
    },
    "./types": {
      "types": "./dist/types.d.ts",
      "browser": "./dist/browser/types.js",
      "bun": "./dist/types.js",
      "node": "./dist/node/types.js",
      "default": "./dist/types.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

No declarations in the inspected manifest.

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.bun](https://lssm.co/docs/packages/tool.bun/): `workspace:*`
- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
  "publish:pkg:canary": "bun publish:pkg --tag canary",
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "dev": "contractspec-bun-build dev",
  "clean": "rimraf dist .turbo",
  "lint": "bun lint:fix",
  "lint:fix": "node ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .",
  "lint:check": "node ../../../../scripts/biome.cjs check .",
  "test": "bun test",
  "prebuild": "contractspec-bun-build prebuild",
  "typecheck": "tsgo --noEmit"
}
```

## Declared documentation links

- [Lib Agent Collaboration documentation](https://www.npmjs.com/package/%40lssm-tech%2Flib.agent-collaboration) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Flib.agent-collaboration",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/lib.agent-collaboration.txt",
  "route": "/llms/lib.agent-collaboration",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.agent-collaboration.txt",
  "blobSha": "fce67d119891e4abcdaadac2c341ef5df196601e",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
