@hotmeshio/long-tail 0.5.5 → 0.5.6
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/README.md +6 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Long Tail
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Durable workflow for humans in the loop.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install @hotmeshio/long-tail
|
|
@@ -8,7 +8,7 @@ npm install @hotmeshio/long-tail
|
|
|
8
8
|
|
|
9
9
|
## How it works
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Route work to machines or people interchangeably with ease.
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { Durable } from '@hotmeshio/hotmesh';
|
|
@@ -18,15 +18,14 @@ import * as activities from './activities';
|
|
|
18
18
|
const { analyzeContent } = Durable.workflow.proxyActivities<typeof activities>({ activities });
|
|
19
19
|
|
|
20
20
|
export async function reviewContent(envelope: LTEnvelope) {
|
|
21
|
-
//
|
|
21
|
+
// method calls are checkpointed and crash safe
|
|
22
22
|
const analysis = await analyzeContent(envelope.data.content);
|
|
23
23
|
|
|
24
24
|
if (analysis.confidence >= 0.85) {
|
|
25
|
-
return {
|
|
25
|
+
return { data: { approved: true, analysis } };
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
//
|
|
29
|
-
// row — assigned to a role, claimable and resolvable from the dashboard, API, or MCP.
|
|
28
|
+
//role-based escalations are baked-in. create HITL escalations with one call
|
|
30
29
|
const { workflowId } = Durable.workflow.workflowInfo();
|
|
31
30
|
const decision = await Durable.workflow.condition<{ approved: boolean; notes?: string }>(
|
|
32
31
|
`review-${workflowId}`,
|
|
@@ -40,7 +39,7 @@ export async function reviewContent(envelope: LTEnvelope) {
|
|
|
40
39
|
},
|
|
41
40
|
);
|
|
42
41
|
|
|
43
|
-
return {
|
|
42
|
+
return { data: { approved: decision.approved, analysis } };
|
|
44
43
|
}
|
|
45
44
|
```
|
|
46
45
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/long-tail",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "Long Tail Workflows — Durable AI workflows with human-in-the-loop escalation. Powered by PostgreSQL.",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@anthropic-ai/sdk": "^0.92.0",
|
|
71
71
|
"@aws-sdk/client-s3": "^3.1017.0",
|
|
72
72
|
"@aws-sdk/s3-request-presigner": "^3.1045.0",
|
|
73
|
-
"@hotmeshio/hotmesh": "^0.22.
|
|
73
|
+
"@hotmeshio/hotmesh": "^0.22.7",
|
|
74
74
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
75
75
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.215.0",
|
|
76
76
|
"@opentelemetry/resources": "^2.5.1",
|