@plainconceptsplatform/workflows 0.1.1 → 0.1.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/README.md
CHANGED
|
@@ -4,6 +4,18 @@ Install and update shared GitHub Agentic Workflows for Plain Concepts Platform r
|
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
+
Before installing workflows, install and configure [`PlainConceptsPlatform/opencode-onboard`](https://github.com/PlainConceptsPlatform/opencode-onboard) in the consumer repository. Loop workers invoke the skills and commands it provides. Verify the required skills and commands are available before compiling workflows.
|
|
8
|
+
|
|
9
|
+
For one-off use, prefer:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @plainconceptsplatform/workflows@latest platform-workflows init
|
|
13
|
+
npx @plainconceptsplatform/workflows@latest platform-workflows add
|
|
14
|
+
npx @plainconceptsplatform/workflows@latest platform-workflows update
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For a project-local development dependency:
|
|
18
|
+
|
|
7
19
|
```bash
|
|
8
20
|
pnpm add -D @plainconceptsplatform/workflows
|
|
9
21
|
pnpm exec platform-workflows init
|
|
@@ -7,6 +7,6 @@ export interface CatalogInstallOptions {
|
|
|
7
7
|
readonly force?: boolean;
|
|
8
8
|
readonly sourcePath?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function catalogSourcePath(): string;
|
|
10
|
+
export declare function catalogSourcePath(modulePath?: string): string;
|
|
11
11
|
export declare function installCatalog(repositoryPath: string, options?: CatalogInstallOptions): Promise<CatalogInstallResult>;
|
|
12
12
|
export { repositoryConfigRelativePath };
|
|
@@ -3,14 +3,13 @@ import { constants } from "node:fs";
|
|
|
3
3
|
import { dirname, join, relative, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { repositoryConfigRelativePath } from "./repository-state.js";
|
|
6
|
-
const packageDirectory = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
7
6
|
const sourceMappings = [
|
|
8
7
|
["actions", ".github/actions"],
|
|
9
8
|
["workflows", ".github/workflows"],
|
|
10
9
|
["scripts", "scripts"],
|
|
11
10
|
];
|
|
12
|
-
export function catalogSourcePath() {
|
|
13
|
-
return
|
|
11
|
+
export function catalogSourcePath(modulePath = fileURLToPath(import.meta.url)) {
|
|
12
|
+
return resolve(dirname(modulePath), "..", "loops");
|
|
14
13
|
}
|
|
15
14
|
export async function installCatalog(repositoryPath, options = {}) {
|
|
16
15
|
const sourcePath = options.sourcePath ?? catalogSourcePath();
|
|
@@ -2,12 +2,19 @@ import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { afterEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { installCatalog, repositoryConfigRelativePath } from "./catalog-installation.js";
|
|
5
|
+
import { catalogSourcePath, installCatalog, repositoryConfigRelativePath } from "./catalog-installation.js";
|
|
6
6
|
const temporaryDirectories = [];
|
|
7
7
|
afterEach(async () => {
|
|
8
8
|
await Promise.all(temporaryDirectories.splice(0).map((directory) => rm(directory, { force: true, recursive: true })));
|
|
9
9
|
});
|
|
10
10
|
describe("catalog installation", () => {
|
|
11
|
+
it("resolves loops beside built package files", async () => {
|
|
12
|
+
const packageDirectory = await createDirectory({
|
|
13
|
+
"dist/catalog-installation.js": "export {};\n",
|
|
14
|
+
"loops/workflows/agent-check.md": "# Check\n",
|
|
15
|
+
});
|
|
16
|
+
expect(catalogSourcePath(join(packageDirectory, "dist", "catalog-installation.js"))).toBe(join(packageDirectory, "loops"));
|
|
17
|
+
});
|
|
11
18
|
it("installs package-owned loops files and initializes repository config", async () => {
|
|
12
19
|
const sourcePath = await createDirectory({
|
|
13
20
|
"actions/check/action.yml": "name: Check\n",
|
package/package.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@plainconceptsplatform/workflows",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Install and update Platform GitHub agentic workflows.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"github-actions",
|
|
7
|
-
"agentic-workflows",
|
|
8
|
-
"plain-concepts"
|
|
9
|
-
],
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/PlainConceptsPlatform/Agentic-Workflows.git"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/PlainConceptsPlatform/Agentic-Workflows/issues"
|
|
16
|
-
},
|
|
17
|
-
"homepage": "https://github.com/PlainConceptsPlatform/Agentic-Workflows#readme",
|
|
18
|
-
"license": "UNLICENSED",
|
|
19
|
-
"type": "module",
|
|
20
|
-
"bin": {
|
|
21
|
-
"platform-workflows": "./dist/index.js"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"dist",
|
|
25
|
-
"loops",
|
|
26
|
-
"README.md"
|
|
27
|
-
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "tsc --project tsconfig.json",
|
|
30
|
-
"test": "vitest run",
|
|
31
|
-
"typecheck": "tsc --noEmit --project tsconfig.json",
|
|
32
|
-
"release": "pnpm build && pnpm test && npm publish --access public",
|
|
33
|
-
"prepack": "node ./scripts/copy-loops.mjs"
|
|
34
|
-
},
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": ">=20.19"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@types/node": "^22.0.0",
|
|
40
|
-
"typescript": "^5.8.0",
|
|
41
|
-
"vitest": "^3.0.0"
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@plainconceptsplatform/workflows",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Install and update Platform GitHub agentic workflows.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"github-actions",
|
|
7
|
+
"agentic-workflows",
|
|
8
|
+
"plain-concepts"
|
|
9
|
+
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/PlainConceptsPlatform/Agentic-Workflows.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/PlainConceptsPlatform/Agentic-Workflows/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/PlainConceptsPlatform/Agentic-Workflows#readme",
|
|
18
|
+
"license": "UNLICENSED",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"bin": {
|
|
21
|
+
"platform-workflows": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"loops",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsc --project tsconfig.json",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"typecheck": "tsc --noEmit --project tsconfig.json",
|
|
32
|
+
"release": "pnpm build && pnpm test && npm publish --access public",
|
|
33
|
+
"prepack": "node ./scripts/copy-loops.mjs"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=20.19"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^22.0.0",
|
|
40
|
+
"typescript": "^5.8.0",
|
|
41
|
+
"vitest": "^3.0.0"
|
|
42
|
+
}
|
|
43
43
|
}
|