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
2 changes: 1 addition & 1 deletion libs/a2ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/a2ui",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/ag-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/ag-ui",
"version": "0.0.27",
"version": "0.0.28",
"peerDependencies": {
"@ngaf/chat": "*",
"@ngaf/licensing": "*",
Expand Down
2 changes: 1 addition & 1 deletion libs/chat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/chat",
"version": "0.0.27",
"version": "0.0.28",
"exports": {
".": {
"types": "./index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion libs/cockpit-docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/cockpit-docs",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/cockpit-registry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/cockpit-registry",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/cockpit-shell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/cockpit-shell",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/cockpit-testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/cockpit-testing",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/cockpit-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/cockpit-ui",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/db",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/design-tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/design-tokens",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/example-layouts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/example-layouts",
"version": "0.0.27",
"version": "0.0.28",
"peerDependencies": {
"@angular/core": "^20.0.0 || ^21.0.0",
"@angular/common": "^20.0.0 || ^21.0.0"
Expand Down
2 changes: 1 addition & 1 deletion libs/langgraph/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/langgraph",
"version": "0.0.27",
"version": "0.0.28",
"peerDependencies": {
"@ngaf/chat": "*",
"@ngaf/licensing": "*",
Expand Down
25 changes: 17 additions & 8 deletions libs/langgraph/src/lib/agent.fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@ import type { Observable } from 'rxjs';
import type { BaseMessage, AIMessage as CoreAIMessage } from '@langchain/core/messages';

/**
* Wire-shape of a `RemoveMessage` instruction — LangGraph's `add_messages`
* reducer recognises this plain-object shape and removes the matching
* message id from server state. Used by `regenerate()`. We construct the
* shape directly instead of importing the `RemoveMessage` class from
* `@langchain/core/messages` because that pulls in the full BaseMessage
* class hierarchy (~30-50 kB) which Cockpit's bundle-size budget rejects.
* Wire-shape of a `RemoveMessage` instruction. LangGraph's `add_messages`
* reducer (Python side) coerces incoming dicts via a strict check that
* expects `role` + `content` keys; without them, the dict-to-Message
* conversion throws and the whole `updateState` request 400s. Construct
* the shape directly with the required keys so we get correct semantics
* without importing the `RemoveMessage` class from `@langchain/core/messages`
* (the class import pulls in the full BaseMessage hierarchy, ~30-50 kB,
* which Cockpit's example-app bundle budget rejects).
*/
type RemoveMessageInstruction = { type: 'remove'; id: string };
type RemoveMessageInstruction = {
type: 'remove';
role: 'remove';
id: string;
content: '';
};
import type { Command, Interrupt, ToolCallWithResult } from '@langchain/langgraph-sdk';
import type { BagTemplate, InferBag } from '@langchain/langgraph-sdk';
import type {
Expand Down Expand Up @@ -296,7 +303,9 @@ export function agent<
.map(m => {
const raw = m as unknown as Record<string, unknown>;
const id = typeof raw['id'] === 'string' ? raw['id'] : undefined;
return id ? { type: 'remove' as const, id } : null;
return id
? { type: 'remove' as const, role: 'remove' as const, id, content: '' as const }
: null;
})
.filter((rm): rm is RemoveMessageInstruction => rm !== null);

Expand Down
2 changes: 1 addition & 1 deletion libs/licensing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/licensing",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/partial-json/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/partial-json",
"version": "0.0.27",
"version": "0.0.28",
"deprecated": "Replaced by @cacheplane/partial-json. No further versions will be published from this package.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion libs/render/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/render",
"version": "0.0.27",
"version": "0.0.28",
"peerDependencies": {
"@angular/core": "^20.0.0 || ^21.0.0",
"@angular/common": "^20.0.0 || ^21.0.0",
Expand Down
2 changes: 1 addition & 1 deletion libs/ui-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/ui-react",
"version": "0.0.27",
"version": "0.0.28",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
Loading