@agent-os-lab/agent-game-sdk 0.1.9 → 0.1.10
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/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/office/core/types.ts +18 -0
- package/src/office/layout/config.ts +234 -25
- package/src/office/layout/index.ts +1 -0
- package/src/office/layout/navigation.ts +168 -0
- package/src/office/layout/resolver.ts +644 -13
- package/src/office/mount.ts +12 -0
- package/src/office/react/AgentGameOfficeView.ts +20 -4
- package/src/office/renderers/three/agent-body-instancing.ts +16 -8
- package/src/office/renderers/three/agent-effect-instancing.ts +26 -12
- package/src/office/renderers/three/agent-route.ts +220 -0
- package/src/office/renderers/three/mount.ts +108 -21
- package/src/office/renderers/three/scene.ts +652 -18
- package/src/runtime-agent-list.ts +15 -0
|
@@ -48,6 +48,17 @@ export function formatAgentPresenceStatus(status: AgentPresenceStatus): string {
|
|
|
48
48
|
return AGENT_PRESENCE_STATUS_LABELS[status];
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
export function formatAgentPresenceActivitySummary(agent: AgentPresence): string | undefined {
|
|
52
|
+
if (!isActiveAgentPresenceStatus(agent.status)) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (agent.activity?.kind === "completed") {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
const summary = agent.activity?.summary.trim();
|
|
59
|
+
return summary || undefined;
|
|
60
|
+
}
|
|
61
|
+
|
|
51
62
|
export async function subscribeAgentPresenceList(
|
|
52
63
|
client: AgentPresenceListClient,
|
|
53
64
|
options: SubscribeAgentPresenceListOptions = {},
|
|
@@ -84,3 +95,7 @@ export async function subscribeAgentPresenceList(
|
|
|
84
95
|
},
|
|
85
96
|
};
|
|
86
97
|
}
|
|
98
|
+
|
|
99
|
+
function isActiveAgentPresenceStatus(status: AgentPresenceStatus): boolean {
|
|
100
|
+
return status === "working" || status === "thinking";
|
|
101
|
+
}
|