@hotmeshio/long-tail 0.4.1 → 0.4.2

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.
@@ -46,7 +46,8 @@ export interface ActivityIdentity {
46
46
  toolContext: ToolContext;
47
47
  }
48
48
  /**
49
- * Returns the identity context for the current proxy activity.
50
- * @throws Error if called outside an interceptor-wrapped activity.
49
+ * Returns the identity context for the current proxy activity,
50
+ * or `null` when called outside an interceptor-wrapped context
51
+ * (e.g., cron-invoked or agent-triggered workflows).
51
52
  */
52
- export declare function getActivityIdentity(): ActivityIdentity;
53
+ export declare function getActivityIdentity(): ActivityIdentity | null;
@@ -33,14 +33,14 @@ exports.getActivityIdentity = getActivityIdentity;
33
33
  const context_1 = require("./context");
34
34
  const credentials_1 = require("./credentials");
35
35
  /**
36
- * Returns the identity context for the current proxy activity.
37
- * @throws Error if called outside an interceptor-wrapped activity.
36
+ * Returns the identity context for the current proxy activity,
37
+ * or `null` when called outside an interceptor-wrapped context
38
+ * (e.g., cron-invoked or agent-triggered workflows).
38
39
  */
39
40
  function getActivityIdentity() {
40
41
  const ctx = (0, context_1.getToolContext)();
41
- if (!ctx) {
42
- throw new Error('No IAM context available. Is this running inside a proxy activity with the LT interceptor?');
43
- }
42
+ if (!ctx)
43
+ return null;
44
44
  return {
45
45
  principal: ctx.principal,
46
46
  initiatingPrincipal: ctx.initiatingPrincipal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/long-tail",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
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.19.0",
73
+ "@hotmeshio/hotmesh": "^0.19.1",
74
74
  "@modelcontextprotocol/sdk": "^1.27.1",
75
75
  "@opentelemetry/exporter-trace-otlp-proto": "^0.215.0",
76
76
  "@opentelemetry/resources": "^2.5.1",