pi-dent-agent 0.2.0 → 0.2.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
@@ -1,7 +1,7 @@
1
1
  # pi-dent
2
2
 
3
3
  A generic coding agent, built as a pi extension: it registers the `Bash`, `Task`, `Agent`, `Fleet`,
4
- `Script`, `Plugin`, `Skill`, `Session`, `Schedule`, `Search`, `Markdown`, and `AskUserQuestion` tools and the `tasks`, `fleet`, and `pi-dent`
4
+ `Script`, `Plugin`, `Skill`, `Session`, `Schedule`, `Search`, `Markdown`, and `AskUserQuestion` tools and the `tasks`, `fleet`, and `dent`
5
5
  slash commands, replaces the host's built-in `bash` tool, and adds the task browser.
6
6
  Specifications live in [specs/](specs/AGENTS.md); the formal
7
7
  source of truth for every behavior.
@@ -37,7 +37,7 @@ Paths in a user-scope `packages` list resolve against `~/.pi/agent`, so `../../s
37
37
  `pi config` enables or disables the resources a package declares.
38
38
 
39
39
  Listing the package is the whole installation. It loads pi-dent and its bundled extensions, each
40
- as its own extension: `purse` (the billing service), `pi-dent-terms` (the `Terms` tool),
40
+ as its own extension: `pi-dent-purse` (the billing service), `pi-dent-terms` (the `Terms` tool),
41
41
  `pi-mcp-adapter`, `pi-anthropic-oauth`, and `pi-web-access`, per
42
42
  [specs/package.md](specs/package.md). Those extensions come from this package, so they must not
43
43
  also appear in `packages` — a second copy loads twice and its tools collide. Update them with
package/index.ts CHANGED
@@ -69,6 +69,9 @@ import { GUIDANCE_CUSTOM_TYPE, modelCatalog, parsedModelGuidance } from "./lib/m
69
69
  import { GuidanceController } from "./lib/guidance-controller.ts";
70
70
  import { renderGuidanceMessage } from "./lib/guidance-render.ts";
71
71
  import { readLocalZone } from "./lib/billing-text.ts";
72
+ import { localLinkDiagnostics } from "./lib/local-links.ts";
73
+ import { dirname } from "node:path";
74
+ import { fileURLToPath } from "node:url";
72
75
 
73
76
  /**
74
77
  * The boot snapshot is cached per process so one boot window (process start
@@ -205,6 +208,10 @@ export default function (pi: ExtensionAPI) {
205
208
  }
206
209
  heldDiagnostics.push(diagnostic);
207
210
  };
211
+ // package.md Section 5.3: a declared local link that is missing, or in use, is told at load.
212
+ for (const diagnostic of localLinkDiagnostics(dirname(fileURLToPath(import.meta.url)))) {
213
+ reportDiagnostic(diagnostic);
214
+ }
208
215
  // footer.md Section 1.1: the configuration is read once per boot window, and its diagnostics
209
216
  // hold until the session's UI shows them.
210
217
  const footerSettings = parseFooter(boot.config);
@@ -888,7 +895,7 @@ export default function (pi: ExtensionAPI) {
888
895
  }
889
896
  }
890
897
 
891
- pi.registerCommand("pi-dent", {
898
+ pi.registerCommand("dent", {
892
899
  description: "Confirm the pi-dent extension is loaded",
893
900
  handler: async (_args, ctx) => {
894
901
  ctx.ui.notify(
package/lib/bash-tool.ts CHANGED
@@ -62,7 +62,7 @@ export const bashParameterSchema = Type.Object(
62
62
  {
63
63
  command: Type.String({
64
64
  pattern: "\\S",
65
- description: `Shell command text: one line or several, passed to the shell unchanged. Run it plainly: long output is cut to its last lines and saved in full to a file. Do not pipe to head, tail or grep. At least one character that is not white space.`,
65
+ description: `Shell command text: one line or several, passed to the shell unchanged. Its output is captured to a file by default: do not cut it with \`| tail\`, \`| head\` or \`| grep\`. At least one character that is not white space.`,
66
66
  }),
67
67
  timeout: Type.Optional(
68
68
  Type.Integer({
@@ -852,7 +852,7 @@ export function makeBashTool(deps: BashToolDeps) {
852
852
  name: "Bash",
853
853
  label: "Bash",
854
854
  description:
855
- "Run a shell command as a task, in the foreground or, with `background: true`, as a background task that returns at once with a task ID and keeps running. Output is written to a file and to the task's output feed; long output shows a bounded excerpt of its last lines. An omitted `timeout` gives a foreground call 600000 ms and imposes none on a background call. Do not start processes with & or nohup: use background: true. Run commands plainly, without piping to head, tail or grep or redirecting to a file: full output is saved for Read or rg. Temporary files go under $TMPDIR, the session's tmp folder, never /tmp; create them with mktemp \"$TMPDIR/name.XXXXXX\", since a bare mktemp may ignore $TMPDIR.",
855
+ "`Bash` output is captured to a file by default: never cut it with `| tail`, `| head` or `| grep` or redirect it, and `Read` or `rg` that file instead of rerunning the command. Run a shell command as a task, in the foreground or, with `background: true`, as a background task that returns at once with a task ID and keeps running. Output is written to a file and to the task's output feed; long output shows a bounded excerpt of its last lines. An omitted `timeout` gives a foreground call 600000 ms and imposes none on a background call. Do not start processes with & or nohup: use background: true. Temporary files go under $TMPDIR, the session's tmp folder, never /tmp; create them with mktemp \"$TMPDIR/name.XXXXXX\", since a bare mktemp may ignore $TMPDIR.",
856
856
  promptSnippet: "Run a shell command as a task, in the foreground or background",
857
857
  parameters: bashParameterSchema,
858
858
  async execute(
package/lib/engine.ts CHANGED
@@ -656,6 +656,10 @@ const SESSION_NOTE_LINES: readonly (readonly [tools: readonly string[], line: st
656
656
  ["Bash"],
657
657
  "Run a long-running command with `Bash` and `background: true`, never with `&` or `nohup`.",
658
658
  ],
659
+ [
660
+ ["Bash"],
661
+ "Before every `Bash` call, check the command: if it ends in `| tail`, `| head`, `| grep` or `> file`, delete that ending. `Bash` already returns only the last 50 lines and saves the full output to a file the result names.",
662
+ ],
659
663
  [["Skill"], "Load a `Skill` when the task matches one in `<available_skills>`."],
660
664
  [
661
665
  // A child that can dispatch an agent needs the transcript it can look back into.
@@ -757,44 +761,33 @@ export function readBootSnapshot(cwd = process.cwd()): BootSnapshot {
757
761
  }
758
762
 
759
763
  /**
760
- * The latest modification time (ms) among `dir`, every entry inside it at any
761
- * depth, and `extra` paths. Symlinks are not followed.
764
+ * Whether any of `dir`, every entry inside it at any depth, or `extra` paths has a
765
+ * modification time of `cutoff` or later. Stops at the first one; symlinks are not
766
+ * followed; unreadable entries count as old.
762
767
  */
763
- function lastActivity(dir: string, extra: string[] = []): number {
764
- let latest = 0;
765
- const visit = (path: string) => {
768
+ function isActiveSince(dir: string, cutoff: number, extra: readonly string[] = []): boolean {
769
+ const recent = (path: string): boolean => {
766
770
  try {
767
- latest = Math.max(latest, lstatSync(path).mtimeMs);
771
+ return lstatSync(path).mtimeMs >= cutoff;
768
772
  } catch {
769
- return;
773
+ return false;
770
774
  }
775
+ };
776
+ const visit = (path: string): boolean => {
777
+ if (recent(path)) return true;
771
778
  let entries;
772
779
  try {
773
780
  entries = readdirSync(path, { withFileTypes: true });
774
781
  } catch {
775
- return;
782
+ return false;
776
783
  }
777
- for (const entry of entries) {
784
+ return entries.some((entry) => {
778
785
  const child = join(path, entry.name);
779
- if (entry.isDirectory()) visit(child);
780
- else {
781
- try {
782
- latest = Math.max(latest, lstatSync(child).mtimeMs);
783
- } catch {
784
- // Best effort.
785
- }
786
- }
787
- }
786
+ return entry.isDirectory() ? visit(child) : recent(child);
787
+ });
788
788
  };
789
- visit(dir);
790
- for (const path of extra) {
791
- try {
792
- latest = Math.max(latest, lstatSync(path).mtimeMs);
793
- } catch {
794
- // Absent.
795
- }
796
- }
797
- return latest;
789
+ if (visit(dir)) return true;
790
+ return extra.some(recent);
798
791
  }
799
792
 
800
793
  /**
@@ -815,7 +808,7 @@ export function retentionSweep(ttlDays: number, liveDirs: readonly string[] | un
815
808
  const top = resolve(path);
816
809
  if (live.some((dir) => dir === top || dir.startsWith(top + sep))) return;
817
810
  try {
818
- if (lastActivity(path, sessionFile ? [sessionFile] : []) < cutoff) {
811
+ if (!isActiveSince(path, cutoff, sessionFile ? [sessionFile] : [])) {
819
812
  rmSync(path, { recursive: true, force: true });
820
813
  }
821
814
  } catch {
@@ -0,0 +1,115 @@
1
+ // Local links (specs/package.md, Section 5): symlinks in node_modules to sibling checkouts,
2
+ // declared in the gitignored .local-links file of the package root.
3
+ import { existsSync, mkdirSync, readFileSync, realpathSync, rmSync, symlinkSync } from "node:fs";
4
+ import { dirname, isAbsolute, join } from "node:path";
5
+ import { type Diagnostic, errorMessage, isPlainObject } from "./util.ts";
6
+
7
+ export const LOCAL_LINKS_FILE = ".local-links";
8
+ const LINK_COMMAND = "node scripts/link-local.ts";
9
+ const PACKAGE_NAME = /^(@[a-z0-9~-][a-z0-9._~-]*\/)?[a-z0-9~-][a-z0-9._~-]*$/;
10
+
11
+ export interface LocalLink {
12
+ name: string;
13
+ path: string;
14
+ }
15
+
16
+ function namesPackage(path: string, name: string): boolean {
17
+ let manifest: unknown;
18
+ try {
19
+ manifest = JSON.parse(readFileSync(join(path, "package.json"), "utf8"));
20
+ } catch {
21
+ // Missing, unreadable or not JSON: the caller reports the line as invalid.
22
+ return false;
23
+ }
24
+ return isPlainObject(manifest) && manifest.name === name;
25
+ }
26
+
27
+ /** The links `text` declares; throws the Section 5.1 error message of the first invalid line. */
28
+ export function parseLocalLinks(text: string): LocalLink[] {
29
+ const links: LocalLink[] = [];
30
+ for (const [index, raw] of text.split("\n").entries()) {
31
+ const line = raw.trim();
32
+ if (line === "" || line.startsWith("#")) continue;
33
+ const where = `${LOCAL_LINKS_FILE} line ${index + 1}`;
34
+ const cut = line.indexOf("=");
35
+ const name = cut === -1 ? "" : line.slice(0, cut).trim();
36
+ const path = cut === -1 ? "" : line.slice(cut + 1).trim();
37
+ if (path === "" || !PACKAGE_NAME.test(name)) {
38
+ throw new Error(`${where}: expected <package name>=<absolute path>`);
39
+ }
40
+ if (links.some((link) => link.name === name)) {
41
+ throw new Error(`${where}: duplicate package ${name}`);
42
+ }
43
+ if (!isAbsolute(path)) throw new Error(`${where}: path is not absolute: ${path}`);
44
+ if (!namesPackage(path, name)) {
45
+ throw new Error(`${where}: ${path} is not a directory whose package.json names ${name}`);
46
+ }
47
+ links.push({ name, path });
48
+ }
49
+ return links;
50
+ }
51
+
52
+ /** The links declared in `root`, undefined without a .local-links file; throws when it is invalid. */
53
+ export function readLocalLinks(root: string): LocalLink[] | undefined {
54
+ const file = join(root, LOCAL_LINKS_FILE);
55
+ if (!existsSync(file)) return undefined;
56
+ let text: string;
57
+ try {
58
+ text = readFileSync(file, "utf8");
59
+ } catch (error) {
60
+ throw new Error(`${LOCAL_LINKS_FILE}: ${errorMessage(error)}`, { cause: error });
61
+ }
62
+ return parseLocalLinks(text);
63
+ }
64
+
65
+ function resolved(path: string): string | undefined {
66
+ try {
67
+ return realpathSync(path);
68
+ } catch {
69
+ // Absent or dangling: resolves to nothing, so the link is not in place.
70
+ return undefined;
71
+ }
72
+ }
73
+
74
+ export function linkInPlace(root: string, link: LocalLink): boolean {
75
+ const target = resolved(link.path);
76
+ return target !== undefined && resolved(join(root, "node_modules", link.name)) === target;
77
+ }
78
+
79
+ /** Puts every declared link of `root` in place; returns the lines to print. Throws on an invalid file. */
80
+ export function applyLocalLinks(root: string): string[] {
81
+ const lines: string[] = [];
82
+ for (const link of readLocalLinks(root) ?? []) {
83
+ if (linkInPlace(root, link)) {
84
+ lines.push(`already linked ${link.name} -> ${link.path}`);
85
+ continue;
86
+ }
87
+ const at = join(root, "node_modules", link.name);
88
+ rmSync(at, { recursive: true, force: true });
89
+ mkdirSync(dirname(at), { recursive: true });
90
+ symlinkSync(link.path, at, "dir");
91
+ lines.push(`linked ${link.name} -> ${link.path}`);
92
+ }
93
+ return lines;
94
+ }
95
+
96
+ /** The load-time check of Section 5.3. */
97
+ export function localLinkDiagnostics(root: string): Diagnostic[] {
98
+ let links: LocalLink[];
99
+ try {
100
+ links = readLocalLinks(root) ?? [];
101
+ } catch (error) {
102
+ const message = `local links: ${errorMessage(error)}; correct ${LOCAL_LINKS_FILE}, then run ${LINK_COMMAND}`;
103
+ return [{ level: "warning", message }];
104
+ }
105
+ if (links.length === 0) return [];
106
+ const missing = links.filter((link) => !linkInPlace(root, link));
107
+ if (missing.length === 0) {
108
+ const names = links.map((link) => link.name).join(", ");
109
+ return [{ level: "info", message: `local links in use: ${names}` }];
110
+ }
111
+ return missing.map(({ name, path }) => ({
112
+ level: "warning",
113
+ message: `local link ${name} is not in place: node_modules/${name} does not resolve to ${path}; run ${LINK_COMMAND}`,
114
+ }));
115
+ }
@@ -11,6 +11,27 @@ const wh = new Webhook(base64_secret);
11
11
  wh.verify(webhook_payload, webhook_headers);
12
12
  ```
13
13
 
14
+ `webhook_payload` must be the raw request body exactly as received, before any JSON parsing.
15
+ Pass it as a `Buffer` or `Uint8Array` to verify the bytes as sent, including bodies that aren't
16
+ valid UTF-8. A string is verified as its UTF-8 encoding.
17
+
18
+ Responding to [endpoint verification](../../spec/extensions/endpoint-verification.md):
19
+
20
+ ```javascript
21
+ const challenge = webhook_headers["webhook-challenge"];
22
+ if (challenge) {
23
+ response_headers["webhook-challenge-response"] = wh.endpointVerificationResponse(challenge);
24
+ // Not a webhook delivery: respond (e.g. with 204 No Content) without processing the body
25
+ return;
26
+ }
27
+ ```
28
+
29
+ Verifying the response as a producer (throws `WebhookVerificationError` if it doesn't match):
30
+
31
+ ```javascript
32
+ wh.verifyEndpointVerificationResponse(challenge, response_headers["webhook-challenge-response"]);
33
+ ```
34
+
14
35
  # Development
15
36
 
16
37
  ## Requirements
@@ -19,8 +19,10 @@ export declare class Webhook {
19
19
  private static prefix;
20
20
  private readonly key;
21
21
  constructor(secret: string | Uint8Array, options?: WebhookOptions);
22
- verify(payload: string | Buffer, headers: WebhookUnbrandedRequiredHeaders | Record<string, string>, options?: VerifyOptions): unknown;
23
- sign(msgId: string, timestamp: Date, payload: string | Buffer): string;
22
+ verify(payload: string | Uint8Array, headers: WebhookUnbrandedRequiredHeaders | Record<string, string>, options?: VerifyOptions): unknown;
23
+ sign(msgId: string, timestamp: Date, payload: string | Uint8Array): string;
24
+ endpointVerificationResponse(challenge: string): string;
25
+ verifyEndpointVerificationResponse(challenge: string, header: string): void;
24
26
  private verifyTimestamp;
25
27
  }
26
28
  export {};
@@ -21,6 +21,15 @@ class WebhookVerificationError extends ExtendableError {
21
21
  }
22
22
  }
23
23
  exports.WebhookVerificationError = WebhookVerificationError;
24
+ function payloadBytes(payload) {
25
+ if (typeof payload === "string") {
26
+ return new TextEncoder().encode(payload);
27
+ }
28
+ if (ArrayBuffer.isView(payload) && payload.BYTES_PER_ELEMENT === 1) {
29
+ return new Uint8Array(payload.buffer, payload.byteOffset, payload.byteLength);
30
+ }
31
+ throw new Error("Expected payload to be of type string, Buffer or Uint8Array.");
32
+ }
24
33
  class Webhook {
25
34
  constructor(secret, options) {
26
35
  if ((options === null || options === void 0 ? void 0 : options.format) === "raw") {
@@ -58,45 +67,49 @@ class Webhook {
58
67
  throw new WebhookVerificationError("Missing required headers");
59
68
  }
60
69
  const timestamp = this.verifyTimestamp(msgTimestamp);
61
- const computedSignature = this.sign(msgId, timestamp, payload);
62
- const expectedSignature = computedSignature.split(",")[1];
63
- const passedSignatures = msgSignature.split(" ");
70
+ const bytes = payloadBytes(payload);
64
71
  const encoder = new globalThis.TextEncoder();
65
- for (const versionedSignature of passedSignatures) {
66
- const [version, signature] = versionedSignature.split(",");
67
- if (version !== "v1") {
68
- continue;
69
- }
70
- if ((0, timing_safe_equal_1.timingSafeEqual)(encoder.encode(signature), encoder.encode(expectedSignature))) {
71
- const payloadString = payload.toString();
72
- if (payloadString === "") {
73
- return undefined;
74
- }
75
- if (jsonParse) {
76
- return JSON.parse(payloadString);
77
- }
78
- else {
79
- return undefined;
80
- }
81
- }
72
+ const expectedSignature = encoder.encode(this.sign(msgId, timestamp, bytes));
73
+ const passedSignatures = msgSignature.split(" ");
74
+ if (!passedSignatures.some((versionedSignature) => (0, timing_safe_equal_1.timingSafeEqual)(encoder.encode(versionedSignature), expectedSignature))) {
75
+ throw new WebhookVerificationError("No matching signature found");
82
76
  }
83
- throw new WebhookVerificationError("No matching signature found");
84
- }
85
- sign(msgId, timestamp, payload) {
86
- if (typeof payload === "string") {
77
+ if (bytes.length === 0) {
78
+ return undefined;
87
79
  }
88
- else if (payload.constructor.name === "Buffer") {
89
- payload = payload.toString();
80
+ if (jsonParse) {
81
+ return JSON.parse(typeof payload === "string" ? payload : new TextDecoder().decode(bytes));
90
82
  }
91
83
  else {
92
- throw new Error("Expected payload to be of type string or Buffer.");
84
+ return undefined;
93
85
  }
94
- const encoder = new TextEncoder();
86
+ }
87
+ sign(msgId, timestamp, payload) {
88
+ const bytes = payloadBytes(payload);
95
89
  const timestampNumber = Math.floor(timestamp.getTime() / 1000);
96
- const toSign = encoder.encode(`${msgId}.${timestampNumber}.${payload}`);
90
+ const prefix = new TextEncoder().encode(`${msgId}.${timestampNumber}.`);
91
+ const toSign = new Uint8Array(prefix.length + bytes.length);
92
+ toSign.set(prefix);
93
+ toSign.set(bytes, prefix.length);
97
94
  const expectedSignature = base64.encode(sha256.hmac(this.key, toSign));
98
95
  return `v1,${expectedSignature}`;
99
96
  }
97
+ endpointVerificationResponse(challenge) {
98
+ const encoder = new TextEncoder();
99
+ const verificationKey = sha256.hmac(this.key, encoder.encode("wev-v1"));
100
+ const signature = base64.encode(sha256.hmac(verificationKey, encoder.encode(challenge)));
101
+ return `v1,${signature}`;
102
+ }
103
+ verifyEndpointVerificationResponse(challenge, header) {
104
+ if (!header) {
105
+ throw new WebhookVerificationError("Missing challenge response");
106
+ }
107
+ const encoder = new globalThis.TextEncoder();
108
+ const expectedSignature = encoder.encode(this.endpointVerificationResponse(challenge));
109
+ if (!(0, timing_safe_equal_1.timingSafeEqual)(encoder.encode(header), expectedSignature)) {
110
+ throw new WebhookVerificationError("No matching signature found");
111
+ }
112
+ }
100
113
  verifyTimestamp(timestampHeader) {
101
114
  const now = Math.floor(Date.now() / 1000);
102
115
  const timestamp = parseInt(timestampHeader, 10);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,sCAAsC;AACtC,2DAAsD;AAEtD,MAAM,4BAA4B,GAAG,CAAC,GAAG,EAAE,CAAC;AAE5C,MAAM,eAAgB,SAAQ,KAAK;IACjC,YAAY,OAAY;QACtB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,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AChD,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;QAClE,CAAC;QAED,IAAI,GAAG,GAAG,SAAS,GAAG,4BAA4B,EAAE,CAAC;YACnD,MAAM,IAAI,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;QAClE,CAAC;QACD,IAAI,SAAS,GAAG,GAAG,GAAG,4BAA4B,EAAE,CAAC;YACnD,MAAM,IAAI,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;;AAlJH,0BAmJC;AAlJgB,cAAM,GAAG,QAAQ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "standardwebhooks",
3
- "version": "1.1.1",
3
+ "version": "1.3.0",
4
4
  "description": "Standard Webhooks for TypeScript",
5
5
  "author": "Standard Webhooks",
6
6
  "repository": "https://github.com/standard-webhooks/standard-webhooks",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-dent-agent",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "A generic coding agent as a pi extension: Bash, Task, Agent, Fleet, Script, Search, Markdown and more tools, with billing and terms extensions bundled",
5
5
  "keywords": [
6
6
  "coding-agent",