@agent-workspace/core 0.2.1 → 0.5.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.
- package/dist/constants.d.ts +23 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +35 -7
- package/dist/constants.js.map +1 -1
- package/dist/constants.test.d.ts +2 -0
- package/dist/constants.test.d.ts.map +1 -0
- package/dist/constants.test.js +73 -0
- package/dist/constants.test.js.map +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/types/contract.d.ts +49 -0
- package/dist/types/contract.d.ts.map +1 -0
- package/dist/types/contract.js +2 -0
- package/dist/types/contract.js.map +1 -0
- package/dist/types/project.d.ts +49 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +2 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/reputation.d.ts +60 -0
- package/dist/types/reputation.d.ts.map +1 -0
- package/dist/types/reputation.js +2 -0
- package/dist/types/reputation.js.map +1 -0
- package/dist/types/swarm.d.ts +55 -0
- package/dist/types/swarm.d.ts.map +1 -0
- package/dist/types/swarm.js +2 -0
- package/dist/types/swarm.js.map +1 -0
- package/dist/types/workspace.d.ts +68 -7
- package/dist/types/workspace.d.ts.map +1 -1
- package/package.json +6 -1
- package/schemas/delegation-contract.schema.json +139 -0
- package/schemas/experiment.schema.json +223 -0
- package/schemas/manifesto.schema.json +214 -0
- package/schemas/project.schema.json +106 -0
- package/schemas/reputation-profile.schema.json +132 -0
- package/schemas/society.schema.json +190 -0
- package/schemas/swarm.schema.json +126 -0
- package/schemas/task.schema.json +90 -0
package/dist/constants.d.ts
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
/** Current AWP specification version */
|
|
2
|
-
export declare const AWP_VERSION = "0.
|
|
2
|
+
export declare const AWP_VERSION = "0.4.0";
|
|
3
3
|
/** Current SMP protocol version */
|
|
4
4
|
export declare const SMP_VERSION = "1.0";
|
|
5
|
+
/** Current RDP protocol version */
|
|
6
|
+
export declare const RDP_VERSION = "1.0";
|
|
7
|
+
/** Current CDP protocol version */
|
|
8
|
+
export declare const CDP_VERSION = "1.0";
|
|
5
9
|
/** Required workspace files */
|
|
6
10
|
export declare const REQUIRED_FILES: readonly ["IDENTITY.md", "SOUL.md"];
|
|
7
11
|
/** Optional workspace files */
|
|
8
|
-
export declare const OPTIONAL_FILES: readonly ["AGENTS.md", "USER.md", "TOOLS.md", "HEARTBEAT.md", "
|
|
12
|
+
export declare const OPTIONAL_FILES: readonly ["AGENTS.md", "USER.md", "TOOLS.md", "HEARTBEAT.md", "MEMORY.md"];
|
|
9
13
|
/** All known workspace files */
|
|
10
|
-
export declare const ALL_WORKSPACE_FILES: readonly ["IDENTITY.md", "SOUL.md", "AGENTS.md", "USER.md", "TOOLS.md", "HEARTBEAT.md", "
|
|
14
|
+
export declare const ALL_WORKSPACE_FILES: readonly ["IDENTITY.md", "SOUL.md", "AGENTS.md", "USER.md", "TOOLS.md", "HEARTBEAT.md", "MEMORY.md"];
|
|
11
15
|
/** Workspace manifest path */
|
|
12
16
|
export declare const MANIFEST_PATH = ".awp/workspace.json";
|
|
13
17
|
/** Memory directory */
|
|
14
18
|
export declare const MEMORY_DIR = "memory";
|
|
15
19
|
/** Artifacts directory */
|
|
16
20
|
export declare const ARTIFACTS_DIR = "artifacts";
|
|
21
|
+
/** Reputation profiles directory */
|
|
22
|
+
export declare const REPUTATION_DIR = "reputation";
|
|
23
|
+
/** Delegation contracts directory */
|
|
24
|
+
export declare const CONTRACTS_DIR = "contracts";
|
|
25
|
+
/** Projects directory */
|
|
26
|
+
export declare const PROJECTS_DIR = "projects";
|
|
27
|
+
/** Swarms directory */
|
|
28
|
+
export declare const SWARMS_DIR = "swarms";
|
|
17
29
|
/** File type to filename mapping */
|
|
18
30
|
export declare const FILE_TYPE_MAP: Record<string, string>;
|
|
19
31
|
/**
|
|
@@ -27,4 +39,12 @@ export declare const SCHEMAS_DIR: string;
|
|
|
27
39
|
export declare function getSchemaPath(schemaFileName: string): string;
|
|
28
40
|
/** Schema file mapping */
|
|
29
41
|
export declare const SCHEMA_MAP: Record<string, string>;
|
|
42
|
+
/** EWMA learning rate for reputation updates */
|
|
43
|
+
export declare const REPUTATION_EWMA_ALPHA = 0.15;
|
|
44
|
+
/** Monthly decay rate for reputation scores */
|
|
45
|
+
export declare const REPUTATION_DECAY_RATE = 0.02;
|
|
46
|
+
/** Baseline score that scores decay toward (unknown state) */
|
|
47
|
+
export declare const REPUTATION_BASELINE = 0.5;
|
|
48
|
+
/** Milliseconds per average month (30.44 days) */
|
|
49
|
+
export declare const MS_PER_MONTH: number;
|
|
30
50
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAKA,wCAAwC;AACxC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,mCAAmC;AACnC,eAAO,MAAM,WAAW,QAAQ,CAAC;AAEjC,+BAA+B;AAC/B,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAElE,+BAA+B;AAC/B,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAKA,wCAAwC;AACxC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,mCAAmC;AACnC,eAAO,MAAM,WAAW,QAAQ,CAAC;AAEjC,mCAAmC;AACnC,eAAO,MAAM,WAAW,QAAQ,CAAC;AAEjC,mCAAmC;AACnC,eAAO,MAAM,WAAW,QAAQ,CAAC;AAEjC,+BAA+B;AAC/B,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAElE,+BAA+B;AAC/B,eAAO,MAAM,cAAc,4EAMjB,CAAC;AAEX,gCAAgC;AAChC,eAAO,MAAM,mBAAmB,sGAAkD,CAAC;AAEnF,8BAA8B;AAC9B,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,uBAAuB;AACvB,eAAO,MAAM,UAAU,WAAW,CAAC;AAEnC,0BAA0B;AAC1B,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,oCAAoC;AACpC,eAAO,MAAM,cAAc,eAAe,CAAC;AAE3C,qCAAqC;AACrC,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,yBAAyB;AACzB,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,uBAAuB;AACvB,eAAO,MAAM,UAAU,WAAW,CAAC;AAEnC,oCAAoC;AACpC,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAchD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,QAAmC,CAAC;AAE5D;;GAEG;AACH,wBAAgB,aAAa,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,0BAA0B;AAC1B,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAe7C,CAAC;AAMF,gDAAgD;AAChD,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,kDAAkD;AAClD,eAAO,MAAM,YAAY,QAA8B,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -2,9 +2,13 @@ import { dirname, join } from "node:path";
|
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
4
4
|
/** Current AWP specification version */
|
|
5
|
-
export const AWP_VERSION = "0.
|
|
5
|
+
export const AWP_VERSION = "0.4.0";
|
|
6
6
|
/** Current SMP protocol version */
|
|
7
7
|
export const SMP_VERSION = "1.0";
|
|
8
|
+
/** Current RDP protocol version */
|
|
9
|
+
export const RDP_VERSION = "1.0";
|
|
10
|
+
/** Current CDP protocol version */
|
|
11
|
+
export const CDP_VERSION = "1.0";
|
|
8
12
|
/** Required workspace files */
|
|
9
13
|
export const REQUIRED_FILES = ["IDENTITY.md", "SOUL.md"];
|
|
10
14
|
/** Optional workspace files */
|
|
@@ -13,20 +17,24 @@ export const OPTIONAL_FILES = [
|
|
|
13
17
|
"USER.md",
|
|
14
18
|
"TOOLS.md",
|
|
15
19
|
"HEARTBEAT.md",
|
|
16
|
-
"BOOTSTRAP.md",
|
|
17
20
|
"MEMORY.md",
|
|
18
21
|
];
|
|
19
22
|
/** All known workspace files */
|
|
20
|
-
export const ALL_WORKSPACE_FILES = [
|
|
21
|
-
...REQUIRED_FILES,
|
|
22
|
-
...OPTIONAL_FILES,
|
|
23
|
-
];
|
|
23
|
+
export const ALL_WORKSPACE_FILES = [...REQUIRED_FILES, ...OPTIONAL_FILES];
|
|
24
24
|
/** Workspace manifest path */
|
|
25
25
|
export const MANIFEST_PATH = ".awp/workspace.json";
|
|
26
26
|
/** Memory directory */
|
|
27
27
|
export const MEMORY_DIR = "memory";
|
|
28
28
|
/** Artifacts directory */
|
|
29
29
|
export const ARTIFACTS_DIR = "artifacts";
|
|
30
|
+
/** Reputation profiles directory */
|
|
31
|
+
export const REPUTATION_DIR = "reputation";
|
|
32
|
+
/** Delegation contracts directory */
|
|
33
|
+
export const CONTRACTS_DIR = "contracts";
|
|
34
|
+
/** Projects directory */
|
|
35
|
+
export const PROJECTS_DIR = "projects";
|
|
36
|
+
/** Swarms directory */
|
|
37
|
+
export const SWARMS_DIR = "swarms";
|
|
30
38
|
/** File type to filename mapping */
|
|
31
39
|
export const FILE_TYPE_MAP = {
|
|
32
40
|
identity: "IDENTITY.md",
|
|
@@ -35,9 +43,13 @@ export const FILE_TYPE_MAP = {
|
|
|
35
43
|
user: "USER.md",
|
|
36
44
|
tools: "TOOLS.md",
|
|
37
45
|
heartbeat: "HEARTBEAT.md",
|
|
38
|
-
bootstrap: "BOOTSTRAP.md",
|
|
39
46
|
"memory-longterm": "MEMORY.md",
|
|
40
47
|
"knowledge-artifact": "artifacts/",
|
|
48
|
+
"reputation-profile": "reputation/",
|
|
49
|
+
"delegation-contract": "contracts/",
|
|
50
|
+
project: "projects/",
|
|
51
|
+
task: "projects/",
|
|
52
|
+
swarm: "swarms/",
|
|
41
53
|
};
|
|
42
54
|
/**
|
|
43
55
|
* Absolute path to the schemas directory bundled with @agent-workspace/core.
|
|
@@ -61,5 +73,21 @@ export const SCHEMA_MAP = {
|
|
|
61
73
|
"memory-daily": "memory-daily.schema.json",
|
|
62
74
|
"memory-longterm": "memory-longterm.schema.json",
|
|
63
75
|
"knowledge-artifact": "knowledge-artifact.schema.json",
|
|
76
|
+
"reputation-profile": "reputation-profile.schema.json",
|
|
77
|
+
"delegation-contract": "delegation-contract.schema.json",
|
|
78
|
+
project: "project.schema.json",
|
|
79
|
+
task: "task.schema.json",
|
|
80
|
+
swarm: "swarm.schema.json",
|
|
64
81
|
};
|
|
82
|
+
// ============================================================================
|
|
83
|
+
// Reputation Constants (RDP)
|
|
84
|
+
// ============================================================================
|
|
85
|
+
/** EWMA learning rate for reputation updates */
|
|
86
|
+
export const REPUTATION_EWMA_ALPHA = 0.15;
|
|
87
|
+
/** Monthly decay rate for reputation scores */
|
|
88
|
+
export const REPUTATION_DECAY_RATE = 0.02;
|
|
89
|
+
/** Baseline score that scores decay toward (unknown state) */
|
|
90
|
+
export const REPUTATION_BASELINE = 0.5;
|
|
91
|
+
/** Milliseconds per average month (30.44 days) */
|
|
92
|
+
export const MS_PER_MONTH = 30.44 * 24 * 60 * 60 * 1000;
|
|
65
93
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,C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AI,EAAE,kBAAkB;IACxB,UAAU,EAAE,wBAAwB;IACpC,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,uBAAuB;IAClC,cAAc,EAAE,0BAA0B;IAC1C,iBAAiB,EAAE,6BAA6B;IAChD,oBAAoB,EAAE,gCAAgC;IACtD,oBAAoB,EAAE,gCAAgC;IACtD,qBAAqB,EAAE,iCAAiC;IACxD,OAAO,EAAE,qBAAqB;IAC9B,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,mBAAmB;CAC3B,CAAC;AAEF,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E,gDAAgD;AAChD,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C,+CAA+C;AAC/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEvC,kDAAkD;AAClD,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.test.d.ts","sourceRoot":"","sources":["../src/constants.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { AWP_VERSION, SMP_VERSION, RDP_VERSION, REQUIRED_FILES, OPTIONAL_FILES, ALL_WORKSPACE_FILES, MANIFEST_PATH, MEMORY_DIR, ARTIFACTS_DIR, REPUTATION_DIR, CONTRACTS_DIR, FILE_TYPE_MAP, SCHEMA_MAP, getSchemaPath, } from "./constants.js";
|
|
3
|
+
describe("AWP constants", () => {
|
|
4
|
+
describe("version constants", () => {
|
|
5
|
+
it("has valid semver AWP version", () => {
|
|
6
|
+
expect(AWP_VERSION).toMatch(/^\d+\.\d+\.\d+$/);
|
|
7
|
+
});
|
|
8
|
+
it("has valid SMP version", () => {
|
|
9
|
+
expect(SMP_VERSION).toMatch(/^\d+\.\d+$/);
|
|
10
|
+
});
|
|
11
|
+
it("has valid RDP version", () => {
|
|
12
|
+
expect(RDP_VERSION).toMatch(/^\d+\.\d+$/);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
describe("file constants", () => {
|
|
16
|
+
it("has required files", () => {
|
|
17
|
+
expect(REQUIRED_FILES).toContain("IDENTITY.md");
|
|
18
|
+
expect(REQUIRED_FILES).toContain("SOUL.md");
|
|
19
|
+
expect(REQUIRED_FILES).toHaveLength(2);
|
|
20
|
+
});
|
|
21
|
+
it("has optional files", () => {
|
|
22
|
+
expect(OPTIONAL_FILES).toContain("AGENTS.md");
|
|
23
|
+
expect(OPTIONAL_FILES).toContain("USER.md");
|
|
24
|
+
expect(OPTIONAL_FILES).toContain("MEMORY.md");
|
|
25
|
+
});
|
|
26
|
+
it("ALL_WORKSPACE_FILES combines required and optional", () => {
|
|
27
|
+
expect(ALL_WORKSPACE_FILES).toHaveLength(REQUIRED_FILES.length + OPTIONAL_FILES.length);
|
|
28
|
+
for (const file of REQUIRED_FILES) {
|
|
29
|
+
expect(ALL_WORKSPACE_FILES).toContain(file);
|
|
30
|
+
}
|
|
31
|
+
for (const file of OPTIONAL_FILES) {
|
|
32
|
+
expect(ALL_WORKSPACE_FILES).toContain(file);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
describe("path constants", () => {
|
|
37
|
+
it("has expected manifest path", () => {
|
|
38
|
+
expect(MANIFEST_PATH).toBe(".awp/workspace.json");
|
|
39
|
+
});
|
|
40
|
+
it("has expected directory paths", () => {
|
|
41
|
+
expect(MEMORY_DIR).toBe("memory");
|
|
42
|
+
expect(ARTIFACTS_DIR).toBe("artifacts");
|
|
43
|
+
expect(REPUTATION_DIR).toBe("reputation");
|
|
44
|
+
expect(CONTRACTS_DIR).toBe("contracts");
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe("FILE_TYPE_MAP", () => {
|
|
48
|
+
it("maps identity type to IDENTITY.md", () => {
|
|
49
|
+
expect(FILE_TYPE_MAP["identity"]).toBe("IDENTITY.md");
|
|
50
|
+
});
|
|
51
|
+
it("maps soul type to SOUL.md", () => {
|
|
52
|
+
expect(FILE_TYPE_MAP["soul"]).toBe("SOUL.md");
|
|
53
|
+
});
|
|
54
|
+
it("maps operations type to AGENTS.md", () => {
|
|
55
|
+
expect(FILE_TYPE_MAP["operations"]).toBe("AGENTS.md");
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
describe("SCHEMA_MAP", () => {
|
|
59
|
+
it("maps type names to schema files", () => {
|
|
60
|
+
expect(SCHEMA_MAP["identity"]).toBe("identity.schema.json");
|
|
61
|
+
expect(SCHEMA_MAP["soul"]).toBe("soul.schema.json");
|
|
62
|
+
expect(SCHEMA_MAP["knowledge-artifact"]).toBe("knowledge-artifact.schema.json");
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
describe("getSchemaPath", () => {
|
|
66
|
+
it("returns absolute path to schema file", () => {
|
|
67
|
+
const path = getSchemaPath("identity.schema.json");
|
|
68
|
+
expect(path).toContain("schemas");
|
|
69
|
+
expect(path).toContain("identity.schema.json");
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=constants.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.test.js","sourceRoot":"","sources":["../src/constants.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,G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QAChD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;YAC3C,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QAC1B,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;YACzC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YAC5D,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACpD,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QAClF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;YAC9C,MAAM,IAAI,GAAG,aAAa,CAAC,sBAAsB,CAAC,CAAC;YACnD,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YAClC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export type { WorkspaceManifest, BaseFrontmatter, IdentityFrontmatter, SoulFrontmatter, SoulValue, SoulBoundary, SoulGovernance, UserFrontmatter, OperationsFrontmatter, ToolsFrontmatter, HeartbeatFrontmatter, HeartbeatTask, MemoryDailyFrontmatter, MemoryEntry, MemoryLongtermFrontmatter, AnyFrontmatter, WorkspaceFile, } from "./types/workspace.js";
|
|
2
|
-
export type { ArtifactFrontmatter, ProvenanceEntry
|
|
3
|
-
export type { AgentCard, AgentSkill, DIDDocument, VerificationMethod
|
|
4
|
-
export {
|
|
2
|
+
export type { ArtifactFrontmatter, ProvenanceEntry } from "./types/artifact.js";
|
|
3
|
+
export type { AgentCard, AgentSkill, DIDDocument, VerificationMethod } from "./types/identity.js";
|
|
4
|
+
export type { ReputationProfileFrontmatter, ReputationDimension, ReputationSignal, } from "./types/reputation.js";
|
|
5
|
+
export type { DelegationContractFrontmatter, ContractTask, ContractScope, ContractConstraints, ContractEvaluation, } from "./types/contract.js";
|
|
6
|
+
export type { ProjectFrontmatter, ProjectMember, TaskFrontmatter } from "./types/project.js";
|
|
7
|
+
export type { SwarmFrontmatter, SwarmRole, SwarmGovernance } from "./types/swarm.js";
|
|
8
|
+
export { AWP_VERSION, SMP_VERSION, RDP_VERSION, CDP_VERSION, REQUIRED_FILES, OPTIONAL_FILES, ALL_WORKSPACE_FILES, MANIFEST_PATH, MEMORY_DIR, ARTIFACTS_DIR, REPUTATION_DIR, CONTRACTS_DIR, PROJECTS_DIR, SWARMS_DIR, FILE_TYPE_MAP, SCHEMA_MAP, SCHEMAS_DIR, getSchemaPath, REPUTATION_EWMA_ALPHA, REPUTATION_DECAY_RATE, REPUTATION_BASELINE, MS_PER_MONTH, } from "./constants.js";
|
|
5
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAC;AAE9B,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEhF,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAElG,YAAY,EACV,4BAA4B,EAC5B,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,6BAA6B,EAC7B,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE7F,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,EAEb,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,GACb,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { AWP_VERSION, SMP_VERSION, REQUIRED_FILES, OPTIONAL_FILES, ALL_WORKSPACE_FILES, MANIFEST_PATH, MEMORY_DIR, ARTIFACTS_DIR, FILE_TYPE_MAP, SCHEMA_MAP, SCHEMAS_DIR, getSchemaPath,
|
|
1
|
+
export { AWP_VERSION, SMP_VERSION, RDP_VERSION, CDP_VERSION, REQUIRED_FILES, OPTIONAL_FILES, ALL_WORKSPACE_FILES, MANIFEST_PATH, MEMORY_DIR, ARTIFACTS_DIR, REPUTATION_DIR, CONTRACTS_DIR, PROJECTS_DIR, SWARMS_DIR, FILE_TYPE_MAP, SCHEMA_MAP, SCHEMAS_DIR, getSchemaPath,
|
|
2
|
+
// Reputation constants
|
|
3
|
+
REPUTATION_EWMA_ALPHA, REPUTATION_DECAY_RATE, REPUTATION_BASELINE, MS_PER_MONTH, } from "./constants.js";
|
|
2
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA0CA,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa;AACb,uBAAuB;AACvB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,GACb,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { BaseFrontmatter } from "./workspace.js";
|
|
2
|
+
/**
|
|
3
|
+
* Task definition within a delegation contract
|
|
4
|
+
*/
|
|
5
|
+
export interface ContractTask {
|
|
6
|
+
description: string;
|
|
7
|
+
outputFormat?: string;
|
|
8
|
+
outputSlug?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Scope constraints for a delegation contract
|
|
12
|
+
*/
|
|
13
|
+
export interface ContractScope {
|
|
14
|
+
include?: string[];
|
|
15
|
+
exclude?: string[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Behavioral constraints for a delegation contract
|
|
19
|
+
*/
|
|
20
|
+
export interface ContractConstraints {
|
|
21
|
+
requireCitations?: boolean;
|
|
22
|
+
confidenceThreshold?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Evaluation criteria and results
|
|
26
|
+
*/
|
|
27
|
+
export interface ContractEvaluation {
|
|
28
|
+
criteria: Record<string, number>;
|
|
29
|
+
result: Record<string, number> | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Delegation contract frontmatter (contracts/<slug>.md)
|
|
33
|
+
*/
|
|
34
|
+
export interface DelegationContractFrontmatter extends BaseFrontmatter {
|
|
35
|
+
type: "delegation-contract";
|
|
36
|
+
rdp: string;
|
|
37
|
+
id: string;
|
|
38
|
+
status: "draft" | "active" | "completed" | "evaluated";
|
|
39
|
+
delegator: string;
|
|
40
|
+
delegate: string;
|
|
41
|
+
delegateSlug: string;
|
|
42
|
+
created: string;
|
|
43
|
+
deadline?: string;
|
|
44
|
+
task: ContractTask;
|
|
45
|
+
scope?: ContractScope;
|
|
46
|
+
constraints?: ContractConstraints;
|
|
47
|
+
evaluation: ContractEvaluation;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/types/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,eAAe;IACpE,IAAI,EAAE,qBAAqB,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,UAAU,EAAE,kBAAkB,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/types/contract.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { BaseFrontmatter } from "./workspace.js";
|
|
2
|
+
/**
|
|
3
|
+
* A project member with role and optional reputation gates
|
|
4
|
+
*/
|
|
5
|
+
export interface ProjectMember {
|
|
6
|
+
did: string;
|
|
7
|
+
role: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
minReputation?: Record<string, number>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Project frontmatter (projects/<slug>.md)
|
|
13
|
+
*/
|
|
14
|
+
export interface ProjectFrontmatter extends BaseFrontmatter {
|
|
15
|
+
type: "project";
|
|
16
|
+
cdp: string;
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
status: "draft" | "active" | "paused" | "completed" | "archived";
|
|
20
|
+
owner: string;
|
|
21
|
+
created: string;
|
|
22
|
+
deadline?: string;
|
|
23
|
+
members: ProjectMember[];
|
|
24
|
+
tags?: string[];
|
|
25
|
+
taskCount: number;
|
|
26
|
+
completedCount: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Task frontmatter (projects/<project-slug>/tasks/<task-slug>.md)
|
|
30
|
+
*/
|
|
31
|
+
export interface TaskFrontmatter extends BaseFrontmatter {
|
|
32
|
+
type: "task";
|
|
33
|
+
cdp: string;
|
|
34
|
+
id: string;
|
|
35
|
+
projectId: string;
|
|
36
|
+
title: string;
|
|
37
|
+
status: "pending" | "in-progress" | "blocked" | "review" | "completed" | "cancelled";
|
|
38
|
+
assignee?: string;
|
|
39
|
+
assigneeSlug?: string;
|
|
40
|
+
priority: "low" | "medium" | "high" | "critical";
|
|
41
|
+
created: string;
|
|
42
|
+
deadline?: string;
|
|
43
|
+
blockedBy: string[];
|
|
44
|
+
blocks: string[];
|
|
45
|
+
outputArtifact?: string;
|
|
46
|
+
contractSlug?: string;
|
|
47
|
+
tags?: string[];
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/types/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;A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C;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/types/project.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { BaseFrontmatter } from "./workspace.js";
|
|
2
|
+
/**
|
|
3
|
+
* A single reputation dimension score with confidence tracking.
|
|
4
|
+
* Scores are updated via EWMA (Exponentially Weighted Moving Average)
|
|
5
|
+
* and decay toward 0.5 (baseline) over time without new signals.
|
|
6
|
+
*/
|
|
7
|
+
export interface ReputationDimension {
|
|
8
|
+
/** Current score (0.0 to 1.0, decays toward 0.5) */
|
|
9
|
+
score: number;
|
|
10
|
+
/** Confidence level based on sample size (0.0 to 1.0) */
|
|
11
|
+
confidence: number;
|
|
12
|
+
/** Number of signals received for this dimension */
|
|
13
|
+
sampleSize: number;
|
|
14
|
+
/** ISO 8601 timestamp of the last signal */
|
|
15
|
+
lastSignal: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* An atomic reputation observation from one agent about another.
|
|
19
|
+
* Signals are the raw data that feed into reputation scores.
|
|
20
|
+
*/
|
|
21
|
+
export interface ReputationSignal {
|
|
22
|
+
/** DID of the agent providing this signal */
|
|
23
|
+
source: string;
|
|
24
|
+
/** Dimension being evaluated (e.g., "reliability", "epistemic-hygiene") */
|
|
25
|
+
dimension: string;
|
|
26
|
+
/** Optional domain for domain-specific competence */
|
|
27
|
+
domain?: string;
|
|
28
|
+
/** Score for this observation (0.0 to 1.0) */
|
|
29
|
+
score: number;
|
|
30
|
+
/** ISO 8601 timestamp when signal was recorded */
|
|
31
|
+
timestamp: string;
|
|
32
|
+
/** Reference to evidence (e.g., artifact ID, contract ID) */
|
|
33
|
+
evidence?: string;
|
|
34
|
+
/** Human-readable explanation */
|
|
35
|
+
message?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Reputation profile frontmatter (reputation/<slug>.md).
|
|
39
|
+
* Tracks multi-dimensional reputation for an agent using RDP (Reputation & Delegation Protocol).
|
|
40
|
+
*/
|
|
41
|
+
export interface ReputationProfileFrontmatter extends BaseFrontmatter {
|
|
42
|
+
type: "reputation-profile";
|
|
43
|
+
/** RDP protocol version */
|
|
44
|
+
rdp: string;
|
|
45
|
+
/** Profile identifier (format: "reputation:<slug>") */
|
|
46
|
+
id: string;
|
|
47
|
+
/** DID of the agent this profile tracks */
|
|
48
|
+
agentDid: string;
|
|
49
|
+
/** Display name of the tracked agent */
|
|
50
|
+
agentName: string;
|
|
51
|
+
/** ISO 8601 timestamp of last update */
|
|
52
|
+
lastUpdated: string;
|
|
53
|
+
/** Standard reputation dimensions (reliability, epistemic-hygiene, coordination) */
|
|
54
|
+
dimensions?: Record<string, ReputationDimension>;
|
|
55
|
+
/** Domain-specific competence scores */
|
|
56
|
+
domainCompetence?: Record<string, ReputationDimension>;
|
|
57
|
+
/** Full history of reputation signals */
|
|
58
|
+
signals: ReputationSignal[];
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=reputation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reputation.d.ts","sourceRoot":"","sources":["../../src/types/reputation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,eAAe;IACnE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACjD,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACvD,yCAAyC;IACzC,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reputation.js","sourceRoot":"","sources":["../../src/types/reputation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { BaseFrontmatter } from "./workspace.js";
|
|
2
|
+
/**
|
|
3
|
+
* Human governance settings for a swarm
|
|
4
|
+
*/
|
|
5
|
+
export interface SwarmGovernance {
|
|
6
|
+
/** User ID of the human lead (e.g., 'user:marc') */
|
|
7
|
+
humanLead?: string;
|
|
8
|
+
/** Whether the human lead can veto decisions */
|
|
9
|
+
vetoPower?: boolean;
|
|
10
|
+
/** Auto-escalate to human if confidence below this threshold (0.0-1.0) */
|
|
11
|
+
escalationThreshold?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A role definition within a swarm with reputation requirements
|
|
15
|
+
*/
|
|
16
|
+
export interface SwarmRole {
|
|
17
|
+
/** Role name (e.g., 'researcher', 'writer') */
|
|
18
|
+
name: string;
|
|
19
|
+
/** Number of agents needed for this role */
|
|
20
|
+
count: number;
|
|
21
|
+
/** Map of dimension/domain to minimum score threshold */
|
|
22
|
+
minReputation?: Record<string, number>;
|
|
23
|
+
/** DIDs of agents assigned to this role */
|
|
24
|
+
assigned: string[];
|
|
25
|
+
/** Reputation profile slugs of assigned agents */
|
|
26
|
+
assignedSlugs?: string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Swarm frontmatter (swarms/<slug>.md)
|
|
30
|
+
* Multi-agent composition with dynamic role recruitment
|
|
31
|
+
*/
|
|
32
|
+
export interface SwarmFrontmatter extends BaseFrontmatter {
|
|
33
|
+
type: "swarm";
|
|
34
|
+
/** CDP protocol version */
|
|
35
|
+
cdp: string;
|
|
36
|
+
/** Unique identifier (swarm:<slug>) */
|
|
37
|
+
id: string;
|
|
38
|
+
/** Human-readable swarm name */
|
|
39
|
+
name: string;
|
|
40
|
+
/** The objective this swarm is working toward */
|
|
41
|
+
goal: string;
|
|
42
|
+
/** Swarm lifecycle state */
|
|
43
|
+
status: "recruiting" | "active" | "completed" | "disbanded";
|
|
44
|
+
/** Swarm creation timestamp (ISO 8601) */
|
|
45
|
+
created: string;
|
|
46
|
+
/** Optional human governance settings */
|
|
47
|
+
governance?: SwarmGovernance;
|
|
48
|
+
/** Roles needed for this swarm */
|
|
49
|
+
roles: SwarmRole[];
|
|
50
|
+
/** Optional linked project ID */
|
|
51
|
+
projectId?: string;
|
|
52
|
+
/** Classification tags */
|
|
53
|
+
tags?: string[];
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=swarm.d.ts.map
|
|
@@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