@ziggs-ai/contracts 0.7.7 → 0.8.0

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/dist/inbox.d.ts CHANGED
@@ -47,6 +47,53 @@ export interface DecisionRef {
47
47
  /** Signed-in review page. Following it does not approve or mark anything seen. */
48
48
  reviewUrl?: string;
49
49
  decideVia: DecideVia;
50
+ /**
51
+ * Present when what is being asked for is ACCESS to one thing.
52
+ *
53
+ * A grant request already arrives as an ordinary pending proposal, so the
54
+ * button was there; the card was not. `title` is the request's own prose,
55
+ * which leaves the person to work out what they are being asked to open, for
56
+ * whom, and for how long. These are the fields that answer that, taken from
57
+ * the request the agent actually filed — nothing here is inferred.
58
+ */
59
+ access?: AccessAsk;
60
+ }
61
+ /**
62
+ * What an access ask is asking for, as the person answering needs to read it.
63
+ *
64
+ * One resource. `scope` is the whole of what a yes opens: there is no arm here
65
+ * that widens to a container or to a second row, and the card says so rather
66
+ * than leaving the reader to assume it.
67
+ */
68
+ export interface AccessAsk {
69
+ /** The one thing. `name` is absent when nothing readable resolves. */
70
+ scope: {
71
+ kind: string;
72
+ id: string;
73
+ name?: string | null;
74
+ };
75
+ /**
76
+ * The agent that would read it. A label, never an agent id.
77
+ *
78
+ * Who it reads FOR is the row's own `requestedByDisplayName` /
79
+ * `requestedByOrgName`: the asking side is the side the agent acts for, and
80
+ * repeating it here would be a second answer to one question.
81
+ */
82
+ holderDisplayName: string | null;
83
+ /** Why, in the requester's own words. */
84
+ reason: string | null;
85
+ /**
86
+ * How long a yes lasts, in hours, counted FROM the yes rather than from the
87
+ * ask. Null when the request names no lifetime.
88
+ */
89
+ durationHours: number | null;
90
+ /**
91
+ * The grant's real expiry, once there is one. Absent while the ask is still
92
+ * pending — a card must not show an expiry for access that does not exist.
93
+ */
94
+ grantedUntil?: string | null;
95
+ /** `from-now` reads what arrives next; `from-start` reads the history too. */
96
+ temporal?: 'from-now' | 'from-start' | null;
50
97
  }
51
98
  /**
52
99
  * One row in the reader's merged view. A reference, never content — following
@@ -33,7 +33,12 @@ export type ChatAddressKind = (typeof CHAT_ADDRESS_KINDS)[number];
33
33
  export declare const RESOURCE_KINDS: readonly ["message", "artifact", "task-state", "agreement", "request"];
34
34
  export type ResourceKind = (typeof RESOURCE_KINDS)[number];
35
35
  /** What kind of thing is waiting on a person. */
36
- export type DecisionKind = 'proposal' | 'connection_request' | 'spend_approval';
36
+ /**
37
+ * What a card in the decision list is. Not an approval kind: `chat_admission`
38
+ * names the card for an approval the chat rail has had since ZIG-426, which
39
+ * was answerable all along and simply never reached this list.
40
+ */
41
+ export type DecisionKind = 'proposal' | 'connection_request' | 'spend_approval' | 'chat_admission';
37
42
  /** Which mailbox a delivery copy lives in. */
38
43
  export type InboxPartyKind = 'human' | 'org';
39
44
  /** How a principal is party to an agreement. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/contracts",
3
- "version": "0.7.7",
3
+ "version": "0.8.0",
4
4
  "description": "Wire contracts for the Ziggs API — response shapes, error body, and socket events, shared by every client.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",