@xera-ai/core 0.9.1 → 0.9.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.
- package/dist/bin/internal.js +19 -6
- package/dist/src/index.js +13 -3
- package/package.json +3 -3
- package/src/bin-internal/fetch.ts +3 -2
- package/src/bin-internal/report.ts +3 -2
- package/src/index.ts +1 -1
- package/src/versions.ts +15 -0
package/dist/bin/internal.js
CHANGED
|
@@ -9543,6 +9543,19 @@ async function createJiraClient(opts) {
|
|
|
9543
9543
|
return createRestBackend(opts.baseUrl, opts.rest);
|
|
9544
9544
|
}
|
|
9545
9545
|
|
|
9546
|
+
// src/versions.ts
|
|
9547
|
+
import { createRequire } from "module";
|
|
9548
|
+
var _require = createRequire(import.meta.url);
|
|
9549
|
+
var XERA_VERSION = _require("../package.json").version;
|
|
9550
|
+
function loadPromptsVersion() {
|
|
9551
|
+
try {
|
|
9552
|
+
return _require("@xera-ai/prompts/version.json").prompts;
|
|
9553
|
+
} catch {
|
|
9554
|
+
return "unknown";
|
|
9555
|
+
}
|
|
9556
|
+
}
|
|
9557
|
+
var PROMPTS_VERSION = loadPromptsVersion();
|
|
9558
|
+
|
|
9546
9559
|
// src/bin-internal/fetch.ts
|
|
9547
9560
|
async function fetchCmd(argv, opts = {}) {
|
|
9548
9561
|
const cwd = opts.cwd ?? process.cwd();
|
|
@@ -9578,8 +9591,8 @@ async function fetchCmd(argv, opts = {}) {
|
|
|
9578
9591
|
writeMeta(paths.metaPath, {
|
|
9579
9592
|
ticket,
|
|
9580
9593
|
adapter: "web",
|
|
9581
|
-
xera_version:
|
|
9582
|
-
prompts_version:
|
|
9594
|
+
xera_version: XERA_VERSION,
|
|
9595
|
+
prompts_version: PROMPTS_VERSION,
|
|
9583
9596
|
...existing ?? {},
|
|
9584
9597
|
story_hash: storyHash,
|
|
9585
9598
|
fetched_at: new Date().toISOString()
|
|
@@ -10104,8 +10117,8 @@ import { join as join19 } from "path";
|
|
|
10104
10117
|
import { scrubFreeText } from "@xera-ai/web";
|
|
10105
10118
|
|
|
10106
10119
|
// ../../node_modules/fflate/esm/index.mjs
|
|
10107
|
-
import { createRequire } from "module";
|
|
10108
|
-
var require2 =
|
|
10120
|
+
import { createRequire as createRequire2 } from "module";
|
|
10121
|
+
var require2 = createRequire2("/");
|
|
10109
10122
|
var _a;
|
|
10110
10123
|
var Worker;
|
|
10111
10124
|
var isMarkedAsUntransferable;
|
|
@@ -11508,8 +11521,8 @@ async function reportCmd(argv) {
|
|
|
11508
11521
|
overall: reAggregated.overall,
|
|
11509
11522
|
overallConfidence: reAggregated.overallConfidence,
|
|
11510
11523
|
scenarios: reAggregated.scenarios,
|
|
11511
|
-
xeraVersion:
|
|
11512
|
-
promptsVersion:
|
|
11524
|
+
xeraVersion: XERA_VERSION,
|
|
11525
|
+
promptsVersion: PROMPTS_VERSION
|
|
11513
11526
|
});
|
|
11514
11527
|
const draftPath = join23(paths.ticketDir, "jira-comment.draft.md");
|
|
11515
11528
|
writeFileSync14(draftPath, md);
|
package/dist/src/index.js
CHANGED
|
@@ -680,8 +680,18 @@ function scrubBodyJson(body) {
|
|
|
680
680
|
function scrubFreeText(s) {
|
|
681
681
|
return s.replace(JWT_RE_G, REDACTED).replace(CREDIT_CARD_RE_G, REDACTED).replace(EMAIL_RE_G, REDACTED).replace(PHONE_RE_G, REDACTED);
|
|
682
682
|
}
|
|
683
|
-
// src/
|
|
684
|
-
|
|
683
|
+
// src/versions.ts
|
|
684
|
+
import { createRequire } from "module";
|
|
685
|
+
var _require = createRequire(import.meta.url);
|
|
686
|
+
var XERA_VERSION = _require("../package.json").version;
|
|
687
|
+
function loadPromptsVersion() {
|
|
688
|
+
try {
|
|
689
|
+
return _require("@xera-ai/prompts/version.json").prompts;
|
|
690
|
+
} catch {
|
|
691
|
+
return "unknown";
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
var PROMPTS_VERSION = loadPromptsVersion();
|
|
685
695
|
export {
|
|
686
696
|
writeStatus,
|
|
687
697
|
writeMeta,
|
|
@@ -716,7 +726,7 @@ export {
|
|
|
716
726
|
appendHistory,
|
|
717
727
|
acquireLock,
|
|
718
728
|
XeraConfigSchema,
|
|
719
|
-
|
|
729
|
+
XERA_VERSION as VERSION,
|
|
720
730
|
StatusJsonSchema,
|
|
721
731
|
SENSITIVE_HEADERS,
|
|
722
732
|
SENSITIVE_BODY_KEYS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xera-ai/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"zod": "4.4.3",
|
|
34
|
-
"@xera-ai/web": "^0.9.
|
|
35
|
-
"@xera-ai/http": "^0.9.
|
|
34
|
+
"@xera-ai/web": "^0.9.2",
|
|
35
|
+
"@xera-ai/http": "^0.9.2",
|
|
36
36
|
"@playwright/test": "1.60.0",
|
|
37
37
|
"fflate": "0.8.3",
|
|
38
38
|
"yaml": "2.9.0"
|
|
@@ -6,6 +6,7 @@ import { resolveArtifactPaths } from '../artifact/paths';
|
|
|
6
6
|
import { loadConfig } from '../config/load';
|
|
7
7
|
import { createJiraClient } from '../jira/client';
|
|
8
8
|
import type { JiraTicket } from '../jira/types';
|
|
9
|
+
import { PROMPTS_VERSION, XERA_VERSION } from '../versions';
|
|
9
10
|
|
|
10
11
|
export interface FetchCmdOpts {
|
|
11
12
|
cwd?: string;
|
|
@@ -54,8 +55,8 @@ export async function fetchCmd(argv: string[], opts: FetchCmdOpts = {}): Promise
|
|
|
54
55
|
writeMeta(paths.metaPath, {
|
|
55
56
|
ticket,
|
|
56
57
|
adapter: 'web',
|
|
57
|
-
xera_version:
|
|
58
|
-
prompts_version:
|
|
58
|
+
xera_version: XERA_VERSION,
|
|
59
|
+
prompts_version: PROMPTS_VERSION,
|
|
59
60
|
...(existing ?? {}),
|
|
60
61
|
// Re-stamp the just-fetched fields:
|
|
61
62
|
story_hash: storyHash,
|
|
@@ -14,6 +14,7 @@ import { enhanceClassification } from '../graph/classify';
|
|
|
14
14
|
import { deriveSnapshot, loadAllEvents } from '../graph/store';
|
|
15
15
|
import { buildJiraComment } from '../reporter/jira-comment';
|
|
16
16
|
import { writeStatusFromClassification } from '../reporter/status-writer';
|
|
17
|
+
import { PROMPTS_VERSION, XERA_VERSION } from '../versions';
|
|
17
18
|
|
|
18
19
|
interface ReportInput {
|
|
19
20
|
scenarios: ScenarioClassification[];
|
|
@@ -187,8 +188,8 @@ export async function reportCmd(argv: string[]): Promise<number> {
|
|
|
187
188
|
overall: reAggregated.overall,
|
|
188
189
|
overallConfidence: reAggregated.overallConfidence,
|
|
189
190
|
scenarios: reAggregated.scenarios,
|
|
190
|
-
xeraVersion:
|
|
191
|
-
promptsVersion:
|
|
191
|
+
xeraVersion: XERA_VERSION,
|
|
192
|
+
promptsVersion: PROMPTS_VERSION,
|
|
192
193
|
});
|
|
193
194
|
const draftPath = join(paths.ticketDir, 'jira-comment.draft.md');
|
|
194
195
|
writeFileSync(draftPath, md);
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export const VERSION = '0.1.0';
|
|
2
1
|
export type * from './adapter/types';
|
|
3
2
|
export * from './artifact/hash';
|
|
4
3
|
export * from './artifact/meta';
|
|
@@ -19,3 +18,4 @@ export * from './jira/types';
|
|
|
19
18
|
export * from './lock/file-lock';
|
|
20
19
|
export * from './logging/ndjson-logger';
|
|
21
20
|
export * from './scrub';
|
|
21
|
+
export { XERA_VERSION as VERSION } from './versions';
|
package/src/versions.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
|
|
3
|
+
const _require = createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
export const XERA_VERSION = (_require('../package.json') as { version: string }).version;
|
|
6
|
+
|
|
7
|
+
function loadPromptsVersion(): string {
|
|
8
|
+
try {
|
|
9
|
+
return (_require('@xera-ai/prompts/version.json') as { prompts: string }).prompts;
|
|
10
|
+
} catch {
|
|
11
|
+
return 'unknown';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const PROMPTS_VERSION = loadPromptsVersion();
|