@procedures/git 0.1.0 → 0.2.1
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/CHANGELOG.md +38 -0
- package/README.md +22 -6
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/module.d.ts +7 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +82 -5
- package/dist/module.js.map +1 -1
- package/dist/procedures/git/index.d.ts +1 -1
- package/dist/procedures/git/index.d.ts.map +1 -1
- package/dist/procedures/git/index.js +1 -1
- package/dist/procedures/git/index.js.map +1 -1
- package/dist/procedures/git/remote.d.ts +7 -6
- package/dist/procedures/git/remote.d.ts.map +1 -1
- package/dist/procedures/git/remote.js +19 -20
- package/dist/procedures/git/remote.js.map +1 -1
- package/dist/register.d.ts +3 -4
- package/dist/register.d.ts.map +1 -1
- package/dist/register.js +4 -9
- package/dist/register.js.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +12 -2
- package/dist/types.js.map +1 -1
- package/package.json +7 -4
- package/src/index.ts +1 -1
- package/src/module.ts +90 -4
- package/src/procedures/git/index.ts +1 -1
- package/src/procedures/git/remote.ts +19 -21
- package/src/register.ts +4 -10
- package/src/types.ts +19 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @procedures/git
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a9dc8c8]
|
|
8
|
+
- @procedures/client@0.2.1
|
|
9
|
+
- @procedures/shell@0.2.1
|
|
10
|
+
|
|
11
|
+
## 0.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 0cf4bea: **Invocation capabilities** (packages/documentation/CAPABILITIES-2026-10.md, the guide is client/docs/CAPABILITIES.md). Each call operates with a capability: a clearance, permitted effects and a deadline. A nested call gets the same capability or a narrower one.
|
|
16
|
+
|
|
17
|
+
- Procedures declare `metadata.effects` (`reads`, `writes`, `destructive`, `idempotent`). Each procedure of these packages declares them.
|
|
18
|
+
- `hostPolicy({ capability, readOnly, clearanceOrder, resources, admitItem })`, and `new Client({ capability })`. A refused call gives `FORBIDDEN` (HTTP 403) with a reason.
|
|
19
|
+
- `ctx.capability` and `ctx.resources` are new required fields of `ProcedureContext`. A test that makes a context by hand adds `capability: {}` and `resources: {}`.
|
|
20
|
+
- An application gives its clearance and resource types by augmenting `Register`.
|
|
21
|
+
- The timeout interceptor sets the deadline of the capability, and a remote call sends the remaining time.
|
|
22
|
+
- The MCP tools have hints (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) from the effects. `mark mcp --read-only` (or `MCP_READ_ONLY=1`) serves only the tools that change nothing.
|
|
23
|
+
- **Breaking:** `git.remote` only reads the URL. `git.remote.set` sets it (before: `git.remote` with `url`).
|
|
24
|
+
- 76d0d64: **Breaking:** an import of a package registers nothing. The `./register` entry of a package registers its procedures, and the procedures of the modules that they need, in the global registry (ARCHITECTURE-PROPOSALS-2026-10, P9).
|
|
25
|
+
|
|
26
|
+
- `import "@procedures/git"` gives the exports and registers nothing. Use `import "@procedures/git/register"`, or give `gitModule` (`@procedures/git/module`) to `createRegistry()`.
|
|
27
|
+
- `import "@procedures/client/register"` registers the control flow (`client.chain` and the others) and `procedure.define`/`get`/`list`/`delete`. `createRegistry()` adds them to each new registry, as before. The new `registerClientProcedures(registry?)` does the same for any registry.
|
|
28
|
+
- Each `register<Name>Procedures(registry?)` function is in the module of its package, takes a registry (the global one by default) and registers the modules that the package requires. `registerBridge` (splay) and `register` (store) are now `registerSplayProcedures` and `registerStoreProcedures`. The old names stay for one version.
|
|
29
|
+
- `sideEffects` names only `./dist/register.js`, so a bundler can drop the rest of a package.
|
|
30
|
+
- The bundles require `clientModule`, so `@procedures/bundle-mcp/register` gives the whole tool surface.
|
|
31
|
+
- `lib new` makes `src/module.ts` and a root without side effects, and `procedure new` adds procedures to the module.
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [0cf4bea]
|
|
36
|
+
- Updated dependencies [44d3e30]
|
|
37
|
+
- Updated dependencies [76d0d64]
|
|
38
|
+
- @procedures/client@0.2.0
|
|
39
|
+
- @procedures/shell@0.2.0
|
|
40
|
+
|
|
3
41
|
## 0.1.0
|
|
4
42
|
|
|
5
43
|
The first release on npm. The packages of the client monorepo have one version together.
|
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ yarn add @procedures/git
|
|
|
73
73
|
|
|
74
74
|
```typescript
|
|
75
75
|
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
|
|
76
|
-
import "@procedures/git"; // registers its procedures
|
|
76
|
+
import "@procedures/git/register"; // registers its procedures
|
|
77
77
|
|
|
78
78
|
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
|
|
79
79
|
|
|
@@ -538,7 +538,7 @@ console.log(`Cloned to ${clone.path}`);
|
|
|
538
538
|
|
|
539
539
|
#### `git.remote`
|
|
540
540
|
|
|
541
|
-
Get
|
|
541
|
+
Get the URL of a remote. It changes nothing.
|
|
542
542
|
|
|
543
543
|
**Path:** `["git", "remote"]`
|
|
544
544
|
|
|
@@ -546,8 +546,6 @@ Get or set remote URLs.
|
|
|
546
546
|
interface GitRemoteInput {
|
|
547
547
|
/** Remote name (default: origin) */
|
|
548
548
|
name?: string;
|
|
549
|
-
/** New URL to set (if provided, sets the URL; otherwise gets it) */
|
|
550
|
-
url?: string;
|
|
551
549
|
/** Working directory */
|
|
552
550
|
cwd?: string;
|
|
553
551
|
}
|
|
@@ -560,6 +558,23 @@ interface GitRemoteOutput {
|
|
|
560
558
|
}
|
|
561
559
|
```
|
|
562
560
|
|
|
561
|
+
#### `git.remote.set`
|
|
562
|
+
|
|
563
|
+
Set the URL of a remote, or add the remote when it is missing. Before 0.2.0, `git.remote` with `url` did this.
|
|
564
|
+
|
|
565
|
+
**Path:** `["git", "remote", "set"]`
|
|
566
|
+
|
|
567
|
+
```typescript
|
|
568
|
+
interface GitRemoteSetInput {
|
|
569
|
+
/** Remote name (default: origin) */
|
|
570
|
+
name?: string;
|
|
571
|
+
/** The URL of the remote */
|
|
572
|
+
url: string;
|
|
573
|
+
/** Working directory */
|
|
574
|
+
cwd?: string;
|
|
575
|
+
}
|
|
576
|
+
```
|
|
577
|
+
|
|
563
578
|
### Predicate Procedures
|
|
564
579
|
|
|
565
580
|
These procedures return boolean predicates useful for conditional logic.
|
|
@@ -842,7 +857,8 @@ fs.writeFileSync("backup.patch", exported.patch);
|
|
|
842
857
|
| | `git.pull` | Pull from remote |
|
|
843
858
|
| | `git.fetch` | Fetch from remote |
|
|
844
859
|
| | `git.clone` | Clone repository |
|
|
845
|
-
| | `git.remote` |
|
|
860
|
+
| | `git.remote` | Get the URL of a remote |
|
|
861
|
+
| | `git.remote.set` | Set the URL of a remote |
|
|
846
862
|
| **Predicates** | `git.hasChanges` | Check for any changes |
|
|
847
863
|
| | `git.hasStagedChanges` | Check for staged changes |
|
|
848
864
|
| | `git.hasUnstagedChanges` | Check for unstaged changes |
|
|
@@ -969,7 +985,7 @@ graph LR
|
|
|
969
985
|
|
|
970
986
|
```typescript
|
|
971
987
|
// bundle-dev/src/register.ts
|
|
972
|
-
import "@procedures/git"; // registers its procedures
|
|
988
|
+
import "@procedures/git/register"; // registers its procedures
|
|
973
989
|
|
|
974
990
|
// client-lib uses git procedures internally
|
|
975
991
|
import { gitStatus, gitAdd, gitCommit } from "@procedures/git";
|