Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/setup/setup-WSL2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This is a list of step-by-step instructions to set up a WSL2 environment from _s
- `\. "$HOME/.nvm/nvm.sh"`
- Install Node
- `nvm install --lts`
- Setup Node native module build tools:
- `sudo apt install -y make build-essential`
- Clone and build:
- `git clone https://github.com/microsoft/TypeAgent ~/src/TypeAgent` (Note: you can clone this to any location and does not have to be ~/src)
- `cd ~/src/TypeAgent/ts`
Expand Down
23 changes: 23 additions & 0 deletions ts/packages/actionGrammar/bin/generate-grammar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env node
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { existsSync } from "node:fs";
import { fileURLToPath } from "node:url";
import path from "node:path";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const cliPath = path.resolve(
__dirname,
"../dist/generation/generate-grammar-cli.js",
);

if (!existsSync(cliPath)) {
console.error("action-grammar has not been built yet.");
console.error(
"Run `pnpm -C ts/packages/actionGrammar build` or `pnpm -C ts run build` first.",
);
process.exit(1);
}

await import(cliPath);
23 changes: 23 additions & 0 deletions ts/packages/actionGrammar/bin/test-grammar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env node
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { existsSync } from "node:fs";
import { fileURLToPath } from "node:url";
import path from "node:path";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const cliPath = path.resolve(
__dirname,
"../dist/generation/test-grammar-cli.js",
);

if (!existsSync(cliPath)) {
console.error("action-grammar has not been built yet.");
console.error(
"Run `pnpm -C ts/packages/actionGrammar build` or `pnpm -C ts run build` first.",
);
process.exit(1);
}

await import(cliPath);
4 changes: 2 additions & 2 deletions ts/packages/actionGrammar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"./generation": "./dist/generation/index.js"
},
"bin": {
"generate-grammar": "./dist/generation/generate-grammar-cli.js",
"test-grammar": "./dist/generation/test-grammar-cli.js"
"generate-grammar": "./bin/generate-grammar.js",
"test-grammar": "./bin/test-grammar.js"
},
"files": [
"dist",
Expand Down
20 changes: 20 additions & 0 deletions ts/packages/coderWrapper/bin/coder-wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { existsSync } from "node:fs";
import { fileURLToPath } from "node:url";
import path from "node:path";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const cliPath = path.resolve(__dirname, "../dist/cli.js");

if (!existsSync(cliPath)) {
console.error("coder-wrapper has not been built yet.");
console.error(
"Run `pnpm -C ts/packages/coderWrapper build` or `pnpm -C ts run build` first.",
);
process.exit(1);
}

await import(cliPath);
2 changes: 1 addition & 1 deletion ts/packages/coderWrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"types": "./dist/index.d.ts",
"bin": {
"coder-wrapper": "./dist/cli.js"
"coder-wrapper": "./bin/coder-wrapper.js"
},
"scripts": {
"build": "npm run tsc",
Expand Down
20 changes: 20 additions & 0 deletions ts/packages/kp/bin/kp-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { existsSync } from "node:fs";
import { fileURLToPath } from "node:url";
import path from "node:path";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const cliPath = path.resolve(__dirname, "../dist/testDriver.js");

if (!existsSync(cliPath)) {
console.error("kp has not been built yet.");
console.error(
"Run `pnpm -C ts/packages/kp build` or `pnpm -C ts run build` first.",
);
process.exit(1);
}

await import(cliPath);
2 changes: 1 addition & 1 deletion ts/packages/kp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"types": "./dist/index.d.ts",
"bin": {
"kp-test": "./dist/testDriver.js"
"kp-test": "./bin/kp-test.js"
},
"files": [
"dist",
Expand Down
20 changes: 20 additions & 0 deletions ts/packages/security/mcpValidation/bin/mcp-plan-validation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { existsSync } from "node:fs";
import { fileURLToPath } from "node:url";
import path from "node:path";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const cliPath = path.resolve(__dirname, "../dist/cli.js");

if (!existsSync(cliPath)) {
console.error("mcp-plan-validation has not been built yet.");
console.error(
"Run `pnpm -C ts/packages/security/mcpValidation build` or `pnpm -C ts run build` first.",
);
process.exit(1);
}

await import(cliPath);
2 changes: 1 addition & 1 deletion ts/packages/security/mcpValidation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"mcp-plan-validation": "dist/cli.js"
"mcp-plan-validation": "./bin/mcp-plan-validation.js"
},
"files": [
"dist",
Expand Down
Loading