@aliyunrds/ctxdb 1.0.11-beta.1 → 1.0.12-beta.0

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.
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  captureTurn
4
- } from "../chunk-CA7XEF4X.js";
4
+ } from "../chunk-4GYXLFNU.js";
5
5
  import "../chunk-SR3M7AL5.js";
6
- import "../chunk-XWJAZAMN.js";
6
+ import "../chunk-7CZIQG6Z.js";
7
7
  import {
8
8
  HttpClient,
9
9
  agentFromArgvWithFallback,
@@ -13,7 +13,7 @@ import {
13
13
  sessionBinding,
14
14
  setDebug,
15
15
  skillStop
16
- } from "../chunk-TZFDXKLJ.js";
16
+ } from "../chunk-HUX2XS5P.js";
17
17
  import "../chunk-5ITT5GSP.js";
18
18
  import {
19
19
  shouldSkipHooks
@@ -67,7 +67,12 @@ async function main() {
67
67
  return 0;
68
68
  }
69
69
  const client = new HttpClient({ baseUrl: cfg.baseUrl, credential, timeoutMs: 5e3 });
70
- const result = await captureTurn(transcriptPath, cfg, client, agent, sessionId);
70
+ if (event.stop_hook_active === true || event.isSidechain === true || event.is_subagent === true) return 0;
71
+ const result = await captureTurn(transcriptPath, cfg, client, agent, sessionId, {
72
+ sessionId,
73
+ turnId: typeof event.turn_id === "string" ? event.turn_id : void 0,
74
+ lastAssistantMessage: typeof event.last_assistant_message === "string" ? event.last_assistant_message : void 0
75
+ });
71
76
  if (result.captured) {
72
77
  debug("capture", `ok (${result.messageCount} msgs)`, result);
73
78
  process.stderr.write(
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  composeUserPromptSubmit,
4
4
  formatUserPromptSubmitStdout
5
- } from "../chunk-5HPYYOPH.js";
6
- import "../chunk-VMBCSFGF.js";
7
- import "../chunk-SZ3AZDMU.js";
5
+ } from "../chunk-BRCQTX2M.js";
6
+ import "../chunk-C66FQHNI.js";
7
+ import "../chunk-EX6SM7I3.js";
8
8
  import {
9
9
  isCircuitOpen
10
- } from "../chunk-XWJAZAMN.js";
10
+ } from "../chunk-7CZIQG6Z.js";
11
11
  import {
12
12
  HttpClient,
13
13
  agentFromArgvWithFallback,
@@ -16,7 +16,7 @@ import {
16
16
  resolveDataApiCredential,
17
17
  setDebug,
18
18
  skillPromptContext
19
- } from "../chunk-TZFDXKLJ.js";
19
+ } from "../chunk-HUX2XS5P.js";
20
20
  import "../chunk-5ITT5GSP.js";
21
21
  import {
22
22
  shouldSkipHooks