@ycodium-ai/plugin-pentest 0.2.3018 → 0.2.3020
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/index.js +8 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
definePlugin,
|
|
4
|
+
threadOrNull as threadOrNull2
|
|
5
|
+
} from "@ycodium-ai/plugin-api";
|
|
3
6
|
|
|
4
7
|
// locales/en.json
|
|
5
8
|
var en_default = {
|
|
@@ -537,9 +540,10 @@ function turnContext(input) {
|
|
|
537
540
|
}
|
|
538
541
|
|
|
539
542
|
// src/related.ts
|
|
543
|
+
import { threadOrNull } from "@ycodium-ai/plugin-api";
|
|
540
544
|
var RELATED_SESSION_LIMIT = 20;
|
|
541
545
|
async function relatedSessions(ctx, threadId) {
|
|
542
|
-
const current = await ctx.
|
|
546
|
+
const current = await threadOrNull(ctx.threads, threadId);
|
|
543
547
|
if (current === null) return [];
|
|
544
548
|
const page = await ctx.threads.list({
|
|
545
549
|
parentThreadId: threadId,
|
|
@@ -973,7 +977,7 @@ function submitFrom(args) {
|
|
|
973
977
|
// src/index.ts
|
|
974
978
|
var pentestPlugin = definePlugin({
|
|
975
979
|
id: "pentest",
|
|
976
|
-
apiVersion:
|
|
980
|
+
apiVersion: 9,
|
|
977
981
|
activate(ctx) {
|
|
978
982
|
const store = createStore(ctx.paths.dataDir);
|
|
979
983
|
ctx.sessionProjections.register({ name: GRAPH_PROJECTION });
|
|
@@ -1135,7 +1139,7 @@ async function snapshot(ctx, store, threadId) {
|
|
|
1135
1139
|
};
|
|
1136
1140
|
}
|
|
1137
1141
|
async function parentOf(ctx, threadId) {
|
|
1138
|
-
const thread = await ctx.
|
|
1142
|
+
const thread = await threadOrNull2(ctx.threads, threadId);
|
|
1139
1143
|
const parent = thread?.origin?.parentThreadId;
|
|
1140
1144
|
return parent === void 0 || parent.length === 0 ? null : parent;
|
|
1141
1145
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/plugin-pentest",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3020",
|
|
4
4
|
"description": "Records an assessment graph on a session: goal, intents, evidence, assets, and findings.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sessions",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react": "19.2.6",
|
|
25
25
|
"typescript": "~6.0.3",
|
|
26
26
|
"vite-plus": "0.2.2",
|
|
27
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
27
|
+
"@ycodium-ai/plugin-api": "0.2.3020"
|
|
28
28
|
},
|
|
29
29
|
"ycodium": {
|
|
30
30
|
"plugin": "./dist/index.js",
|