@north-light/cli 0.3.447 → 0.3.449
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/api/contract.d.ts +1 -1
- package/dist/api/contract.js +1 -1
- package/dist/api/dto/nodes.d.ts +5 -0
- package/dist/api/dto/objects.d.ts +33 -2
- package/dist/api/error-codes.d.ts +15 -0
- package/dist/api/error-codes.js +1 -1
- package/dist/clients/attach/viewer.js +498 -498
- package/dist/commands/canvas/list.js +3 -3
- package/dist/commands/canvas/read.js +4 -4
- package/dist/commands/node/inspect.js +8 -8
- package/dist/commands/sys/sync-shared.js +1 -1
- package/dist/commands/sys/update.js +1 -1
- package/dist/core/feed/inbox.js +1 -1
- package/dist/core/graph/events.js +8 -8
- package/dist/core/peer/client.d.ts +2 -0
- package/dist/core/peer/client.js +1 -1
- package/dist/core/peer/directory.js +1 -1
- package/dist/core/peer/home.d.ts +40 -0
- package/dist/core/peer/home.js +2 -0
- package/dist/core/peer/names.d.ts +3 -0
- package/dist/core/peer/names.js +1 -0
- package/dist/core/peer/stubs.d.ts +2 -0
- package/dist/core/peer/stubs.js +1 -1
- package/dist/core/peer/version.d.ts +2 -2
- package/dist/core/peer/version.js +1 -1
- package/dist/core/runtime/broker/inbox.js +1 -1
- package/dist/core/scoped-state/settings.js +1 -1
- package/dist/daemon/api/handlers/messages.js +2 -2
- package/dist/daemon/api/handlers/nodes.js +1 -1
- package/dist/daemon/api/handlers/objects.d.ts +4 -0
- package/dist/daemon/api/handlers/objects.js +2 -2
- package/dist/daemon/peer/forward.d.ts +69 -0
- package/dist/daemon/peer/forward.js +1 -0
- package/dist/daemon/peer/handlers.d.ts +2 -0
- package/dist/daemon/peer/handlers.js +1 -1
- package/dist/shared/generated-context.d.ts +8 -0
- package/dist/shared/generated-context.js +4 -4
- package/dist/shared/inbox-entry-body.js +5 -5
- package/package.json +2 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +12 -12
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/crtr-commands/tree-cache.json +0 -728
package/dist/api/contract.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
|
|
2
|
-
export declare const CONTRACT_LEVEL = "1.
|
|
2
|
+
export declare const CONTRACT_LEVEL = "1.2";
|
|
3
3
|
/** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
|
|
4
4
|
export declare const REQUIRED_CONTRACT_HEADER = "Crouter-Required-Contract";
|
|
5
5
|
/** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
|
package/dist/api/contract.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const f="1.
|
|
1
|
+
var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const f="1.2",i="Crouter-Required-Contract",p="Crouter-Contract";function l(r){const t=/^(\d+)\.(\d+)$/.exec(r.trim());return t===null?null:{major:Number(t[1]),minor:Number(t[2])}}e(l,"parseContractLevel");function a(r){return r==null?[]:r.split(",").map(t=>l(t)).filter(t=>t!==null)}e(a,"parseServedContracts");function s(r,t){const n=l(r);return n===null?!1:(typeof t=="string"||t===null||t===void 0?a(t):t).some(u=>u.major===n.major&&u.minor>=n.minor)}e(s,"contractSatisfies");function C(r,t,n={}){if(r===void 0)return null;if(l(r)===null)return{status:400,code:"invalid_request",param:i,message:`${i} must be a contract level like 1.0.`};if(s(r,t))return null;const o=r.trim();return{status:426,code:"runtime_version_unsupported",message:t===null||a(t).length===0?`The runtime did not name its contract level; the caller requires contract ${o} or later. Roll the runtime forward.`:`The runtime serves contract ${t}; the caller requires contract ${o} or later within the same major. Roll the runtime forward, or pin an SDK whose crouterContract the runtime serves.`,details:{sdk_version:(n.legacyMinimum??"").trim(),runtime_version:n.runtimeVersion??null,required_contract:o,runtime_contract:t}}}e(C,"contractRefusal");export{p as CONTRACT_HEADER,f as CONTRACT_LEVEL,i as REQUIRED_CONTRACT_HEADER,C as contractRefusal,s as contractSatisfies,l as parseContractLevel,a as parseServedContracts};
|
package/dist/api/dto/nodes.d.ts
CHANGED
|
@@ -210,6 +210,11 @@ export interface NodeFaultDTO {
|
|
|
210
210
|
/** The full node view — summary ∪ identity extras ∪ edges ∪ paths. Returned by
|
|
211
211
|
* `GET /v1/nodes/{id}` and by the create/lifecycle actions that yield a node. */
|
|
212
212
|
export interface NodeDetailDTO extends Omit<NodeSummaryDTO, 'outcome'> {
|
|
213
|
+
/** Set when another of your machines homes this node and answered: `{id, name}` of that machine. */
|
|
214
|
+
machine?: {
|
|
215
|
+
id: string;
|
|
216
|
+
name: string;
|
|
217
|
+
};
|
|
213
218
|
outcome: NodeOutcomeDTO | null;
|
|
214
219
|
/** Node that created this node, or null when an external process did. */
|
|
215
220
|
creator: NodeIdDTO | null;
|
|
@@ -74,6 +74,8 @@ export interface OwnerReadData {
|
|
|
74
74
|
* structured fields (for the built-in kinds, the `*ReadData` shapes above). */
|
|
75
75
|
export interface ObjectLiveReadDTO {
|
|
76
76
|
state: 'object';
|
|
77
|
+
/** Set when another of your machines homes the object and answered: `{id, name}` of that machine. */
|
|
78
|
+
machine?: MachineRefDTO;
|
|
77
79
|
type: string;
|
|
78
80
|
object: ObjectDTO;
|
|
79
81
|
text: string;
|
|
@@ -83,15 +85,28 @@ export interface ObjectLiveReadDTO {
|
|
|
83
85
|
export interface ObjectDeletedDTO {
|
|
84
86
|
state: 'deleted';
|
|
85
87
|
deleted: ObjectDTO;
|
|
88
|
+
machine?: MachineRefDTO;
|
|
89
|
+
}
|
|
90
|
+
/** A machine of your account, as an answer names it. */
|
|
91
|
+
export interface MachineRefDTO {
|
|
92
|
+
id: string;
|
|
93
|
+
name: string;
|
|
94
|
+
}
|
|
95
|
+
/** No machine answered for `ref`, and the ones that could not answer are listed: the object may be on one of them. Never a "missing". */
|
|
96
|
+
export interface ObjectUnknownDTO {
|
|
97
|
+
state: 'unknown';
|
|
98
|
+
ref: string;
|
|
99
|
+
unreachable: string[];
|
|
86
100
|
}
|
|
87
101
|
/** The name's first segment is no handle on this runtime; the object may live on another runtime. */
|
|
88
102
|
export interface ObjectRemoteDTO {
|
|
89
103
|
state: 'remote';
|
|
90
104
|
remote: string;
|
|
91
105
|
}
|
|
92
|
-
export type ObjectReadDTO = ObjectLiveReadDTO | ObjectDeletedDTO | ObjectRemoteDTO;
|
|
106
|
+
export type ObjectReadDTO = ObjectLiveReadDTO | ObjectDeletedDTO | ObjectRemoteDTO | ObjectUnknownDTO;
|
|
93
107
|
export interface ObjectReadQuery {
|
|
94
|
-
fields?: boolean;
|
|
108
|
+
fields?: boolean; /** Read on this machine (`runtime:<id>`), as a merged listing or inbox entry names it. */
|
|
109
|
+
machine?: string;
|
|
95
110
|
}
|
|
96
111
|
export interface ObjectListRequest {
|
|
97
112
|
/** A kind name. */
|
|
@@ -105,15 +120,29 @@ export interface ObjectListRequest {
|
|
|
105
120
|
deleted?: boolean;
|
|
106
121
|
limit?: number;
|
|
107
122
|
cursor?: string;
|
|
123
|
+
/** List only this machine (`runtime:<id>`), paging through its cursor. `self` lists only this machine without labels. */
|
|
124
|
+
machine?: string;
|
|
108
125
|
}
|
|
109
126
|
export interface ObjectListItemDTO extends ObjectDTO {
|
|
127
|
+
/** The machine of your account that homes the row; set on a merged or `--machine` listing. */
|
|
128
|
+
machine?: MachineRefDTO;
|
|
110
129
|
summary?: string | null;
|
|
111
130
|
/** A document's rule count. */
|
|
112
131
|
rules?: number;
|
|
113
132
|
}
|
|
133
|
+
export type MachineListState = 'ok' | 'unreachable' | 'too_old';
|
|
134
|
+
/** How one machine answered a merged listing; `more` says its first page was not all of it (page it with `--machine`). */
|
|
135
|
+
export interface MachineListEntryDTO {
|
|
136
|
+
machine_id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
state: MachineListState;
|
|
139
|
+
more: boolean;
|
|
140
|
+
}
|
|
141
|
+
/** `machines` is present when this runtime belongs to an account; `next_cursor` is always this machine's (or, with `machine`, that machine's). */
|
|
114
142
|
export interface ObjectListDTO {
|
|
115
143
|
items: ObjectListItemDTO[];
|
|
116
144
|
next_cursor: string | null;
|
|
145
|
+
machines?: MachineListEntryDTO[];
|
|
117
146
|
}
|
|
118
147
|
export interface ObjectSearchRequest {
|
|
119
148
|
text: string;
|
|
@@ -151,10 +180,12 @@ export interface UnwatchQuery {
|
|
|
151
180
|
export interface WatchResultDTO {
|
|
152
181
|
object: ObjectDTO;
|
|
153
182
|
patterns: string[];
|
|
183
|
+
machine?: MachineRefDTO;
|
|
154
184
|
}
|
|
155
185
|
export interface UnwatchResultDTO {
|
|
156
186
|
object: ObjectDTO;
|
|
157
187
|
removed: number;
|
|
188
|
+
machine?: MachineRefDTO;
|
|
158
189
|
}
|
|
159
190
|
export type EdgeTypeName = 'acted-on' | 'links-to' | 'watches';
|
|
160
191
|
export interface EdgesQuery {
|
|
@@ -89,6 +89,11 @@ export declare const errorCodes: {
|
|
|
89
89
|
readonly status: 403;
|
|
90
90
|
readonly retryable: false;
|
|
91
91
|
};
|
|
92
|
+
readonly app_not_granted: {
|
|
93
|
+
readonly type: "permission_error";
|
|
94
|
+
readonly status: 403;
|
|
95
|
+
readonly retryable: false;
|
|
96
|
+
};
|
|
92
97
|
readonly isolated_run: {
|
|
93
98
|
readonly type: "permission_error";
|
|
94
99
|
readonly status: 403;
|
|
@@ -114,6 +119,16 @@ export declare const errorCodes: {
|
|
|
114
119
|
readonly status: 416;
|
|
115
120
|
readonly retryable: false;
|
|
116
121
|
};
|
|
122
|
+
readonly not_here: {
|
|
123
|
+
readonly type: "invalid_request_error";
|
|
124
|
+
readonly status: 404;
|
|
125
|
+
readonly retryable: false;
|
|
126
|
+
};
|
|
127
|
+
readonly peer_version_too_old: {
|
|
128
|
+
readonly type: "invalid_request_error";
|
|
129
|
+
readonly status: 426;
|
|
130
|
+
readonly retryable: false;
|
|
131
|
+
};
|
|
117
132
|
readonly conflict: {
|
|
118
133
|
readonly type: "invalid_request_error";
|
|
119
134
|
readonly status: 409;
|
package/dist/api/error-codes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={unauthorized:{type:"authentication_error",status:401,retryable:!1},machine_revoked:{type:"authentication_error",status:401,retryable:!1},grant_revoked:{type:"authentication_error",status:401,retryable:!1},grant_removed:{type:"authentication_error",status:401,retryable:!1},grant_suspended:{type:"authentication_error",status:401,retryable:!1},refresh_token_expired:{type:"authentication_error",status:401,retryable:!1},refresh_token_reused:{type:"authentication_error",status:401,retryable:!1},scope_missing:{type:"permission_error",status:403,retryable:!1},owner_only:{type:"permission_error",status:403,retryable:!1},other_app_run:{type:"permission_error",status:403,retryable:!1},payer_not_app:{type:"permission_error",status:403,retryable:!1},approval_pending:{type:"permission_error",status:403,retryable:!1},user_denied:{type:"permission_error",status:403,retryable:!1},provider_refused:{type:"permission_error",status:403,retryable:!1},provider_not_connected:{type:"permission_error",status:403,retryable:!1},provider_setup_pending:{type:"permission_error",status:403,retryable:!1},question_pages_off:{type:"permission_error",status:403,retryable:!1},unsandboxed_machine:{type:"permission_error",status:403,retryable:!1},isolated_run:{type:"permission_error",status:403,retryable:!1},provider_version_retired:{type:"permission_error",status:403,retryable:!1},invalid_scope:{type:"invalid_request_error",status:400,retryable:!1},invalid_request:{type:"invalid_request_error",status:400,retryable:!1},range_not_satisfiable:{type:"invalid_request_error",status:416,retryable:!1},conflict:{type:"invalid_request_error",status:409,retryable:!1},not_found:{type:"invalid_request_error",status:404,retryable:!1},model_unavailable:{type:"invalid_request_error",status:404,retryable:!1},upstream_model_unavailable:{type:"server_error",status:503,retryable:!0},substitution_refused:{type:"invalid_request_error",status:400,retryable:!1},idempotency_conflict:{type:"invalid_request_error",status:409,retryable:!1},run_settled:{type:"invalid_request_error",status:409,retryable:!1},cap_exhausted:{type:"rate_limit_error",status:402,retryable:!1},concurrency_limit:{type:"rate_limit_error",status:429,retryable:!0},all_routes_exhausted:{type:"rate_limit_error",status:429,retryable:!0},provider_rate_limited:{type:"rate_limit_error",status:429,retryable:!0},rate_limited:{type:"rate_limit_error",status:429,retryable:!0},runtime_unreachable:{type:"server_error",status:503,retryable:!0},isolated_unavailable:{type:"server_error",status:503,retryable:!0},runtime_starting:{type:"server_error",status:503,retryable:!0},runtime_provisioning:{type:"server_error",status:503,retryable:!0},provider_unavailable:{type:"server_error",status:503,retryable:!0},upstream_refused:{type:"server_error",status:502,retryable:!1},provider_bad_response:{type:"server_error",status:502,retryable:!1},service_unavailable:{type:"server_error",status:503,retryable:!0},not_implemented:{type:"server_error",status:501,retryable:!1},permission_error:{type:"permission_error",status:403,retryable:!1},storage_unavailable:{type:"server_error",status:503,retryable:!0},server_error:{type:"server_error",status:500,retryable:!0},server_failure:{type:"server_error",status:500,retryable:!1},wake_timeout:{type:"server_error",status:504,retryable:!0}};export{e as errorCodes};
|
|
1
|
+
const e={unauthorized:{type:"authentication_error",status:401,retryable:!1},machine_revoked:{type:"authentication_error",status:401,retryable:!1},grant_revoked:{type:"authentication_error",status:401,retryable:!1},grant_removed:{type:"authentication_error",status:401,retryable:!1},grant_suspended:{type:"authentication_error",status:401,retryable:!1},refresh_token_expired:{type:"authentication_error",status:401,retryable:!1},refresh_token_reused:{type:"authentication_error",status:401,retryable:!1},scope_missing:{type:"permission_error",status:403,retryable:!1},owner_only:{type:"permission_error",status:403,retryable:!1},other_app_run:{type:"permission_error",status:403,retryable:!1},payer_not_app:{type:"permission_error",status:403,retryable:!1},approval_pending:{type:"permission_error",status:403,retryable:!1},user_denied:{type:"permission_error",status:403,retryable:!1},provider_refused:{type:"permission_error",status:403,retryable:!1},provider_not_connected:{type:"permission_error",status:403,retryable:!1},provider_setup_pending:{type:"permission_error",status:403,retryable:!1},question_pages_off:{type:"permission_error",status:403,retryable:!1},unsandboxed_machine:{type:"permission_error",status:403,retryable:!1},app_not_granted:{type:"permission_error",status:403,retryable:!1},isolated_run:{type:"permission_error",status:403,retryable:!1},provider_version_retired:{type:"permission_error",status:403,retryable:!1},invalid_scope:{type:"invalid_request_error",status:400,retryable:!1},invalid_request:{type:"invalid_request_error",status:400,retryable:!1},range_not_satisfiable:{type:"invalid_request_error",status:416,retryable:!1},not_here:{type:"invalid_request_error",status:404,retryable:!1},peer_version_too_old:{type:"invalid_request_error",status:426,retryable:!1},conflict:{type:"invalid_request_error",status:409,retryable:!1},not_found:{type:"invalid_request_error",status:404,retryable:!1},model_unavailable:{type:"invalid_request_error",status:404,retryable:!1},upstream_model_unavailable:{type:"server_error",status:503,retryable:!0},substitution_refused:{type:"invalid_request_error",status:400,retryable:!1},idempotency_conflict:{type:"invalid_request_error",status:409,retryable:!1},run_settled:{type:"invalid_request_error",status:409,retryable:!1},cap_exhausted:{type:"rate_limit_error",status:402,retryable:!1},concurrency_limit:{type:"rate_limit_error",status:429,retryable:!0},all_routes_exhausted:{type:"rate_limit_error",status:429,retryable:!0},provider_rate_limited:{type:"rate_limit_error",status:429,retryable:!0},rate_limited:{type:"rate_limit_error",status:429,retryable:!0},runtime_unreachable:{type:"server_error",status:503,retryable:!0},isolated_unavailable:{type:"server_error",status:503,retryable:!0},runtime_starting:{type:"server_error",status:503,retryable:!0},runtime_provisioning:{type:"server_error",status:503,retryable:!0},provider_unavailable:{type:"server_error",status:503,retryable:!0},upstream_refused:{type:"server_error",status:502,retryable:!1},provider_bad_response:{type:"server_error",status:502,retryable:!1},service_unavailable:{type:"server_error",status:503,retryable:!0},not_implemented:{type:"server_error",status:501,retryable:!1},permission_error:{type:"permission_error",status:403,retryable:!1},storage_unavailable:{type:"server_error",status:503,retryable:!0},server_error:{type:"server_error",status:500,retryable:!0},server_failure:{type:"server_error",status:500,retryable:!1},wake_timeout:{type:"server_error",status:504,retryable:!0}};export{e as errorCodes};
|