Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@

# Changelog

## 0.36.1 (2026-11-16)

- **A persisted Session keeps its version** (TypeScript). `PapSession.fromJson()` restores a
Session persisted without `protocol_version` (by an SDK before 0.36) at `0.4`, as Python's
`PapSession.from_json()` already did, instead of the new default `1.0` under the same `sid`,
which changed `Poppy-Version` mid-Session. A Session persisted with its version keeps it;
a new Session still defaults to `1.0`. Tests in both SDKs.

## 0.36.0 (2026-11-16)

The 1.0 draft (upstream `/docs/spec`, as of `c71f515`, 2026-11-11) becomes the **default** in
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/protocol/conformance-report.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Compatibility and conformance report

# Compatibility and conformance report

SDK version **0.36.0**, PAP profile **0.4** (as published 2026-11-10), Operations extension **v3**; the pairings run at protocol version **1.0**, the default (the 1.0 draft as of 2026-11-11). Each pairing runs every positive, negative and recovery fixture case over real TCP and TLS, the personal agent in one language and the reference company (Manzanita) in the other. A case is skipped, never passed, when a side lacks what it needs; the reason is listed below.
SDK version **0.36.1**, PAP profile **0.4** (as published 2026-11-10), Operations extension **v3**; the pairings run at protocol version **1.0**, the default (the 1.0 draft as of 2026-11-11). Each pairing runs every positive, negative and recovery fixture case over real TCP and TLS, the personal agent in one language and the reference company (Manzanita) in the other. A case is skipped, never passed, when a side lacks what it needs; the reason is listed below.

## Pairings

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/releases/compatibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Compatibility

# Compatibility

This page is versioned with the SDK: it describes **SDK 0.36.0**.
This page is versioned with the SDK: it describes **SDK 0.36.1**.

## The PAP version implemented

Expand Down Expand Up @@ -34,6 +34,7 @@ profile, never picked up from an unattended fetch.

| SDK (PyPI and npm) | PAP profile | Specification revision | Operations | Breaking changes |
| --- | --- | --- | --- | --- |
| `0.36.1` | `0.4` | 2026-11-10 | v3 | none: a Session persisted without its version (before 0.36) restores at 0.4 in TypeScript too, as in Python |
| `0.36.0` | `0.4` | 2026-11-10 | v3 | [0.35 → 0.36](/releases/migration/#035--036): the 1.0 draft is the default in both SDKs and both reference companies; 0.4 is used only when named (`protocol_versions`) |
| `0.35.0` | `0.4` | 2026-11-10 | v3 | none: [0.34 → 0.35](/releases/migration/#034--035) adds the 1.0 draft as an opt-in second version (`protocol_versions`) and shows a company's domain beside its name |
| `0.34.0` | `0.4` | 2026-11-10 | v3 | none: [0.33 → 0.34](/releases/migration/#033--034) adds operations on websites (`Poppy-Operation`, the operations `endpoint`) and the Browser Control extension, version 1 |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datalayer/personal-agent-protocol",
"version": "0.36.0",
"version": "0.36.1",
"description": "TypeScript SDK for Personal Agent Protocol 0.4 (2026-11-10) and its Operations extension v3",
"repository": {
"type": "git",
Expand Down
22 changes: 22 additions & 0 deletions personal_agent_protocol/__tests__/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,28 @@ def handler(request: httpx.Request) -> httpx.Response:
assert PapSession.from_json(first.to_json()) == first


def test_a_persisted_session_without_its_version_restores_as_0_4() -> None:
persisted: dict[str, object] = {
"sid": "AAECAwQFBgcICQoLDA0ODw",
"sub": PAIRWISE,
"issuer": ISSUER,
"client_id": CLIENT_ID,
"tenant_id": "tenant-one",
"agent_id": None,
}
assert PapSession.from_json(persisted).protocol_version == "0.4"
assert PapSession.from_json({**persisted, "protocol_version": "1.0"}).protocol_version == "1.0"
assert PapSession.from_json({**persisted, "protocol_version": "0.4"}).protocol_version == "0.4"
fresh = PapSession(
sid="AAECAwQFBgcICQoLDA0ODw",
sub=PAIRWISE,
issuer=ISSUER,
client_id=CLIENT_ID,
tenant_id="tenant-one",
)
assert fresh.protocol_version == "1.0"


def test_a_session_id_is_at_least_128_random_bits() -> None:
assert new_session_id(fixed_random) == "AAECAwQFBgcICQoLDA0ODw"
with pytest.raises(ValueError, match="128 random bits"):
Expand Down
2 changes: 1 addition & 1 deletion personal_agent_protocol/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

"""Personal Agent Protocol."""

__version__ = "0.36.0"
__version__ = "0.36.1"
2 changes: 1 addition & 1 deletion personal_agent_protocol/company/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def build_company(
reactor.register_plugin(
PluginManifest(
name="personal-agent-protocol.company",
version="0.36.0",
version="0.36.1",
contribution_points=[
COMPANY_STORES.id,
COMPANY_ACCOUNTS.id,
Expand Down
2 changes: 1 addition & 1 deletion personal_agent_protocol/reactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ def build_pap_reactor(
platform.register_plugin(
PluginManifest(
name="personal-agent-protocol.core",
version="0.36.0",
version="0.36.1",
contribution_points=[
DISCOVERY_TRANSPORTS.id,
URL_SAFETY_POLICIES.id,
Expand Down
19 changes: 19 additions & 0 deletions src/__tests__/sessions.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,25 @@ test("a Session starts with no request and a new random sid", async () => {
assert.deepEqual(PapSession.fromJson(first.toJson()).toJson(), first.toJson());
});

test("a persisted Session without its version restores as 0.4, one with it keeps it", () => {
const persisted = {
sid: "AAECAwQFBgcICQoLDA0ODw",
sub: PAIRWISE,
issuer: ISSUER,
client_id: CLIENT_ID,
tenant_id: "tenant-one",
agent_id: null,
};
assert.equal(PapSession.fromJson(persisted).protocolVersion, "0.4");
assert.equal(PapSession.fromJson({ ...persisted, protocol_version: "1.0" }).protocolVersion, "1.0");
assert.equal(PapSession.fromJson({ ...persisted, protocol_version: "0.4" }).protocolVersion, "0.4");
assert.equal(
new PapSession({ sid: persisted.sid, sub: PAIRWISE, issuer: ISSUER, clientId: CLIENT_ID, tenantId: "tenant-one" })
.protocolVersion,
"1.0",
);
});

test("a Session ID is at least 128 random bits", () => {
assert.equal(newSessionId(fixedRandom), "AAECAwQFBgcICQoLDA0ODw");
assert.throws(() => newSessionId(() => new Uint8Array(5)), /128 random bits/);
Expand Down
2 changes: 1 addition & 1 deletion src/company/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function createCompanyDefaultsPlugin(
) {
return definePlugin({
name: "personal-agent-protocol.company",
version: "0.36.0",
version: "0.36.1",
contributionPoints: [
CompanyStores,
CompanyAccounts,
Expand Down
2 changes: 1 addition & 1 deletion src/reactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export function createPapCorePlugin(options: PapCoreOptions = {}) {
}
return definePlugin({
name: "@datalayer/personal-agent-protocol-core",
version: "0.36.0",
version: "0.36.1",
contributionPoints: [
DiscoveryTransports,
UrlSafetyPolicies,
Expand Down
6 changes: 4 additions & 2 deletions src/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
companySessionVersion,
type DiscoveredCompany,
} from "./models.js";
import { DEFAULT_PROTOCOL_VERSION } from "./profile.js";
import { DEFAULT_PROTOCOL_VERSION, PROTOCOL_PROFILE } from "./profile.js";
import {
Clocks,
DpopProvers,
Expand Down Expand Up @@ -300,7 +300,9 @@ export class PapSession {
clientId: value.client_id,
tenantId: value.tenant_id,
...(value.agent_id === null ? {} : { agentId: value.agent_id }),
...(value.protocol_version === undefined ? {} : { protocolVersion: value.protocol_version }),
// A Session persisted before it named its version was a 0.4 Session: it keeps 0.4
// (as Python's PapSession.from_json), never the newer default under the same sid.
protocolVersion: value.protocol_version || PROTOCOL_PROFILE,
...(value.extensions === undefined ? {} : { extensions: value.extensions }),
});
}
Expand Down
Loading