@hy-sde-org/dsh-git 0.1.1-rc.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.
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Shared types for the git service and its commit/review tools.
3
+ * Port of the omp (oh-my-pi) commit data shapes — see port_omp.md item: commit.
4
+ * @module @hy-sde-org/dsh-git/types
5
+ */
6
+ /** Conventional-commit type vocabulary. */
7
+ export type CommitType = 'feat' | 'fix' | 'refactor' | 'perf' | 'docs' | 'test' | 'build' | 'ci' | 'chore' | 'style' | 'revert';
8
+ /** One conventional-commit type list entry. */
9
+ export interface ConventionalDetail {
10
+ text: string;
11
+ /** Optional changelog category (kept for shape parity with omp). */
12
+ changelogCategory?: string;
13
+ /** Whether this line is user-visible. */
14
+ userVisible: boolean;
15
+ }
16
+ /** Parsed conventional analysis for one commit. */
17
+ export interface ConventionalAnalysis {
18
+ type: CommitType;
19
+ scope: string | null;
20
+ details: ConventionalDetail[];
21
+ issueRefs: string[];
22
+ }
23
+ /** Per-file add/delete counts from `git diff --numstat`. */
24
+ export interface NumstatEntry {
25
+ path: string;
26
+ additions: number;
27
+ deletions: number;
28
+ }
29
+ /** One file section of a `diff --git` stream. */
30
+ export interface FileDiff {
31
+ filename: string;
32
+ content: string;
33
+ additions: number;
34
+ deletions: number;
35
+ isBinary: boolean;
36
+ }
37
+ /** One `@@` hunk of a file diff. */
38
+ export interface DiffHunk {
39
+ /** Zero-based position among the file's hunks. */
40
+ index: number;
41
+ /** The raw `@@ … @@` header line. */
42
+ header: string;
43
+ oldStart: number;
44
+ oldLines: number;
45
+ newStart: number;
46
+ newLines: number;
47
+ /** The hunk header plus body, without the file header. */
48
+ content: string;
49
+ }
50
+ /** A file diff with its hunks parsed out (empty hunks for binary files). */
51
+ export interface FileHunks {
52
+ filename: string;
53
+ isBinary: boolean;
54
+ hunks: DiffHunk[];
55
+ }
56
+ /** How much of one file a split-commit group selects. */
57
+ export type HunkSelector = {
58
+ type: 'all';
59
+ } | {
60
+ type: 'indices';
61
+ indices: number[];
62
+ } | {
63
+ type: 'lines';
64
+ start: number;
65
+ end: number;
66
+ };
67
+ /** One file selection inside a split-commit group. */
68
+ export interface FileChange {
69
+ path: string;
70
+ hunks: HunkSelector;
71
+ }
72
+ /** One commit group in a split plan. */
73
+ export interface SplitCommitGroup {
74
+ changes: FileChange[];
75
+ type: CommitType;
76
+ scope: string | null;
77
+ summary: string;
78
+ details: ConventionalDetail[];
79
+ issueRefs: string[];
80
+ /** Human rationale the model writes (advisory, not validated). */
81
+ rationale?: string;
82
+ /** Indices of groups this group depends on (must be acyclic). */
83
+ dependencies: number[];
84
+ }
85
+ /** A complete split-commit plan. */
86
+ export interface SplitCommitPlan {
87
+ commits: SplitCommitGroup[];
88
+ warnings: string[];
89
+ }
90
+ /** Plain `git status --porcelain` summary counts. */
91
+ export interface GitStatusSummary {
92
+ staged: number;
93
+ unstaged: number;
94
+ untracked: number;
95
+ }
96
+ /** One recent-commit entry from `git log`. */
97
+ export interface GitLogEntry {
98
+ hash: string;
99
+ shortHash: string;
100
+ subject: string;
101
+ authorName: string;
102
+ authorEmail: string;
103
+ date: string;
104
+ }
105
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,KAAK,GACL,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,OAAO,GACP,OAAO,GACP,QAAQ,CAAA;AAEZ,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,yCAAyC;IACzC,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,mDAAmD;AACnD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D;AACtD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,YAAY,CAAA;CACpB;AAED,wCAAwC;AACxC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iEAAiE;IACjE,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,8CAA8C;AAC9C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb"}
package/dist/types.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shared types for the git service and its commit/review tools.
3
+ * Port of the omp (oh-my-pi) commit data shapes — see port_omp.md item: commit.
4
+ * @module @hy-sde-org/dsh-git/types
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,21 @@
1
+ # User agent preset for @hy-sde-org/dsh-git on OFFICIAL DeepSeek Harness
2
+ # releases (dsh-v0.1.1-rc.2 and later).
3
+ #
4
+ # Install: copy this directory to ~/.dsh/.agent-presets/<id>/ (pick any id),
5
+ # then select the preset in the Web UI preset picker (or `dsh agent` CLI).
6
+ #
7
+ # The `git` SERVICE row is added host-wide by the plugin's own
8
+ # cordis.patch.yml when you run `dsh plugin add`; this preset contributes
9
+ # ONLY the model-facing tool row. `@hy-sde-org/dsh-tool-git` registers no
10
+ # service of its own — it resolves the host instance across the plane
11
+ # boundary, so no realm/isolate is needed here.
12
+ #
13
+ # Copy any other rows from the preset you normally use (persona, bash, todo,
14
+ # ask-user, skills, ...) next to these; only the git row is special. If
15
+ # the package isn't installed, the loader reports the missing plugin on boot.
16
+
17
+ - id: tool-git
18
+ name: '@hy-sde-org/dsh-tool-git'
19
+ config:
20
+ reviewProvider: spawn
21
+ maxReviewers: 4
@@ -0,0 +1,3 @@
1
+ name: Agentic Git
2
+ description: Coding agent with agentic git commit + review — commit / commit_apply / review tools over the host ctx.git service. For stock DeepSeek Harness releases (rc.2+).
3
+ order: 7
package/package.json ADDED
@@ -0,0 +1,96 @@
1
+ {
2
+ "name": "@hy-sde-org/dsh-git",
3
+ "version": "0.1.1-rc.2",
4
+ "description": "Agentic git plumbing for DeepSeek Harness: the host ctx.git service (diff capture/parsing, hunk staging, commit/push/log over the subprocess seam) backing the commit and review tools in @hy-sde-org/dsh-tool-git — a standalone plugin with no upstream harness changes required.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./types": {
14
+ "types": "./dist/types.d.ts",
15
+ "default": "./dist/types.js"
16
+ },
17
+ "./service": {
18
+ "types": "./dist/service.d.ts",
19
+ "default": "./dist/service.js"
20
+ },
21
+ "./diff": {
22
+ "types": "./dist/diff.d.ts",
23
+ "default": "./dist/diff.js"
24
+ },
25
+ "./topo-sort": {
26
+ "types": "./dist/topo-sort.d.ts",
27
+ "default": "./dist/topo-sort.js"
28
+ },
29
+ "./lock-files": {
30
+ "types": "./dist/lock-files.d.ts",
31
+ "default": "./dist/lock-files.js"
32
+ },
33
+ "./invariant": {
34
+ "types": "./dist/invariant.d.ts",
35
+ "default": "./dist/invariant.js"
36
+ },
37
+ "./cordis.patch.yml": "./cordis.patch.yml",
38
+ "./package.json": "./package.json"
39
+ },
40
+ "files": [
41
+ "dist",
42
+ "cordis.patch.yml",
43
+ "examples/agent-preset/agent.cordis.yml",
44
+ "examples/agent-preset/preset.yml",
45
+ "README.md",
46
+ "LICENSE"
47
+ ],
48
+ "engines": {
49
+ "node": ">=22.19.0"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "git+https://github.com/hy-sde/dsh-git.git"
57
+ },
58
+ "license": "MIT",
59
+ "dsh": {
60
+ "bundle": {
61
+ "patch": "./cordis.patch.yml"
62
+ }
63
+ },
64
+ "dependencies": {
65
+ "@deepseek-ai/cordis": "^4.0.1"
66
+ },
67
+ "peerDependencies": {
68
+ "@deepseek-ai/cordis": "^4.0.1",
69
+ "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
70
+ "@deepseek-ai/dsh-subprocess": "^0.1.1-rc.2"
71
+ },
72
+ "devDependencies": {
73
+ "@deepseek-ai/cordis": "^4.0.1",
74
+ "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
75
+ "@deepseek-ai/dsh-subprocess": "^0.1.1-rc.2",
76
+ "@deepseek-ai/dsh-subprocess-local": "^0.1.1-rc.2",
77
+ "@types/node": "^24.0.0",
78
+ "typescript": "^5.9.3",
79
+ "vitest": "^3.2.7"
80
+ },
81
+ "keywords": [
82
+ "deepseek",
83
+ "agent",
84
+ "harness",
85
+ "dsh-plugin",
86
+ "git",
87
+ "commit",
88
+ "review"
89
+ ],
90
+ "scripts": {
91
+ "clean": "rm -rf dist",
92
+ "build": "tsc -p tsconfig.build.json",
93
+ "check": "tsc -p tsconfig.json --noEmit",
94
+ "test": "vitest run"
95
+ }
96
+ }