@xfey/tutti 0.1.104 → 0.1.106
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 +2 -2
- package/dist/approvals/decision-command.d.ts +124 -0
- package/dist/approvals/decision-command.js +20 -0
- package/dist/approvals/index.d.ts +1 -0
- package/dist/approvals/index.js +1 -0
- package/dist/approvals/manager.d.ts +3 -1
- package/dist/approvals/manager.js +9 -0
- package/dist/collaboration-ingestion/index.d.ts +3 -0
- package/dist/collaboration-ingestion/index.js +3 -0
- package/dist/collaboration-ingestion/managed-reference-snapshots.d.ts +27 -0
- package/dist/collaboration-ingestion/managed-reference-snapshots.js +45 -0
- package/dist/collaboration-ingestion/managed-reference-sources.d.ts +20 -0
- package/dist/collaboration-ingestion/managed-reference-sources.js +250 -0
- package/dist/collaboration-ingestion/reference-attachments.d.ts +22 -0
- package/dist/collaboration-ingestion/reference-attachments.js +132 -0
- package/dist/collaboration-ingestion/reference-files.d.ts +3 -2
- package/dist/collaboration-ingestion/reference-files.js +1 -0
- package/dist/platform-outbound/coordinator.d.ts +5 -2
- package/dist/platform-outbound/coordinator.js +95 -2
- package/dist/platform-outbound/repository.d.ts +17 -0
- package/dist/platform-outbound/repository.js +190 -5
- package/dist/platform-outbound/types.d.ts +13 -3
- package/dist/platform-outbound/worker.js +30 -14
- package/dist/server-shell/cli/host-lifecycle.js +3 -0
- package/dist/server-shell/cli/host-server-runtime.d.ts +4 -1
- package/dist/server-shell/cli/host-server-runtime.js +128 -40
- package/dist/server-shell/cli/relay-registration.js +3 -0
- package/dist/server-shell/http/host-tunnel.d.ts +4 -1
- package/dist/server-shell/http/host-tunnel.js +174 -3
- package/dist/server-shell/http/routes/project-api/approval-routes.js +13 -20
- package/dist/server-shell/http/routes/project-api/staged-uploads.d.ts +6 -0
- package/dist/server-shell/http/routes/project-api/staged-uploads.js +9 -2
- package/dist/server-shell/local-console/project-service.d.ts +2 -0
- package/dist/server-shell/local-console/project-service.js +37 -0
- package/dist/server-shell/local-console/server.js +4 -0
- package/dist/workspace-ops/index.d.ts +2 -2
- package/dist/workspace-ops/index.js +1 -1
- package/dist/workspace-ops/reference-files.d.ts +14 -1
- package/dist/workspace-ops/reference-files.js +167 -2
- package/dist/workspace-ops/types.d.ts +24 -0
- package/migrations/0018_platform_outbound_events.sql +111 -0
- package/migrations/0019_platform_outbound_card_content.sql +76 -0
- package/migrations/0020_managed_reference_sources.sql +34 -0
- package/migrations/README.md +4 -1
- package/node_modules/@tutti/relay-client/dist/host-control.d.ts +5 -2
- package/node_modules/@tutti/relay-client/dist/host-control.js +3 -0
- package/node_modules/@tutti/shared/dist/schemas/api/index.d.ts +2 -2
- package/node_modules/@tutti/shared/dist/schemas/api/index.js +1 -1
- package/node_modules/@tutti/shared/dist/schemas/api/platform-sessions.d.ts +34 -0
- package/node_modules/@tutti/shared/dist/schemas/api/platform-sessions.js +37 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/feishu-user-credentials.d.ts +22 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/feishu-user-credentials.js +37 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/index.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/index.js +1 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/platform-integration.d.ts +1005 -49
- package/node_modules/@tutti/shared/dist/schemas/internal/platform-integration.js +434 -14
- package/package.json +1 -1
- package/prompts/skills/read-references/README.md +1 -1
- package/prompts/skills/read-references/SKILL.md +4 -2
- package/web/assets/{homepage-motion-scene-DEVrQ9aj.js → homepage-motion-scene-tfFEdV9Y.js} +1 -1
- package/web/assets/index-B7ZGIvOv.js +69 -0
- package/web/assets/{index-6i9Uk7fS.css → index-C2Mmj25S.css} +1 -1
- package/web/index.html +2 -2
- package/web/assets/index-Lxtst2sl.js +0 -69
|
@@ -2,12 +2,19 @@ import { Type } from "@sinclair/typebox";
|
|
|
2
2
|
import { IsoDateTimeStringSchema, RelayAccountRefSchema, RelayPlatformSessionRefSchema, RelayProjectRefSchema, } from "../domain/index.js";
|
|
3
3
|
export const FEISHU_H5_AUTHORIZATION_CODE_MAX_LENGTH = 2_048;
|
|
4
4
|
export const FEISHU_H5_REQUIRED_USER_SCOPE = "im:chat.members:read";
|
|
5
|
+
export const FEISHU_DOCX_REQUIRED_USER_SCOPE = "docx:document:readonly";
|
|
5
6
|
export const FEISHU_PLATFORM_STATE_LENGTH = 43;
|
|
7
|
+
export const FEISHU_BROWSER_HANDOFF_TOKEN_LENGTH = 43;
|
|
6
8
|
export const FeishuPlatformStateSchema = Type.String({
|
|
7
9
|
minLength: FEISHU_PLATFORM_STATE_LENGTH,
|
|
8
10
|
maxLength: FEISHU_PLATFORM_STATE_LENGTH,
|
|
9
11
|
pattern: "^[A-Za-z0-9_-]+$",
|
|
10
12
|
});
|
|
13
|
+
export const FeishuBrowserHandoffTokenSchema = Type.String({
|
|
14
|
+
minLength: FEISHU_BROWSER_HANDOFF_TOKEN_LENGTH,
|
|
15
|
+
maxLength: FEISHU_BROWSER_HANDOFF_TOKEN_LENGTH,
|
|
16
|
+
pattern: "^[A-Za-z0-9_-]+$",
|
|
17
|
+
});
|
|
11
18
|
export const FeishuPlatformSessionBootstrapBodySchema = Type.Object({ relay_project_ref: RelayProjectRefSchema }, { additionalProperties: false });
|
|
12
19
|
export const FeishuPlatformSessionBootstrapResponseSchema = Type.Object({
|
|
13
20
|
platform: Type.Literal("feishu"),
|
|
@@ -41,4 +48,34 @@ export const FeishuPlatformSessionProjectionSchema = Type.Object({
|
|
|
41
48
|
transport: Type.Literal("http_only_cookie"),
|
|
42
49
|
}, { additionalProperties: false }),
|
|
43
50
|
}, { additionalProperties: false });
|
|
51
|
+
export const FeishuDocumentAuthorizationBootstrapResponseSchema = Type.Object({
|
|
52
|
+
platform: Type.Literal("feishu"),
|
|
53
|
+
app_id: Type.String({ minLength: 1, maxLength: 128, pattern: "^cli_[A-Za-z0-9]+$" }),
|
|
54
|
+
state: FeishuPlatformStateSchema,
|
|
55
|
+
authorization_scopes: Type.Tuple([Type.Literal(FEISHU_DOCX_REQUIRED_USER_SCOPE)]),
|
|
56
|
+
expires_at: IsoDateTimeStringSchema,
|
|
57
|
+
}, { additionalProperties: false });
|
|
58
|
+
export const FeishuDocumentAuthorizationExchangeBodySchema = Type.Object({
|
|
59
|
+
state: FeishuPlatformStateSchema,
|
|
60
|
+
authorization_code: Type.String({
|
|
61
|
+
minLength: 1,
|
|
62
|
+
maxLength: FEISHU_H5_AUTHORIZATION_CODE_MAX_LENGTH,
|
|
63
|
+
pattern: "^[^\\u0000-\\u001f\\u007f]+$",
|
|
64
|
+
}),
|
|
65
|
+
}, { additionalProperties: false });
|
|
66
|
+
export const FeishuDocumentAuthorizationProjectionSchema = Type.Object({
|
|
67
|
+
platform: Type.Literal("feishu"),
|
|
68
|
+
status: Type.Literal("authorized"),
|
|
69
|
+
authorized_at: IsoDateTimeStringSchema,
|
|
70
|
+
}, { additionalProperties: false });
|
|
71
|
+
export const FeishuBrowserHandoffResponseSchema = Type.Object({
|
|
72
|
+
platform: Type.Literal("feishu"),
|
|
73
|
+
relay_project_ref: RelayProjectRefSchema,
|
|
74
|
+
handoff_token: FeishuBrowserHandoffTokenSchema,
|
|
75
|
+
expires_at: IsoDateTimeStringSchema,
|
|
76
|
+
}, { additionalProperties: false });
|
|
77
|
+
export const ConsumeFeishuBrowserHandoffBodySchema = Type.Object({
|
|
78
|
+
relay_project_ref: RelayProjectRefSchema,
|
|
79
|
+
handoff_token: FeishuBrowserHandoffTokenSchema,
|
|
80
|
+
}, { additionalProperties: false });
|
|
44
81
|
//# sourceMappingURL=platform-sessions.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Static } from "@sinclair/typebox";
|
|
2
|
+
export declare const FEISHU_USER_CREDENTIAL_HANDOFF_PATH = "/internal/v1/feishu-user-credentials";
|
|
3
|
+
export declare const FeishuUserCredentialRefSchema: import("@sinclair/typebox").TString;
|
|
4
|
+
export declare const FeishuUserCredentialHandoffSchema: import("@sinclair/typebox").TObject<{
|
|
5
|
+
version: import("@sinclair/typebox").TLiteral<1>;
|
|
6
|
+
installation_ref: import("@sinclair/typebox").TString;
|
|
7
|
+
external_subject_ref: import("@sinclair/typebox").TString;
|
|
8
|
+
access_token: import("@sinclair/typebox").TString;
|
|
9
|
+
refresh_token: import("@sinclair/typebox").TString;
|
|
10
|
+
access_expires_at: import("@sinclair/typebox").TString;
|
|
11
|
+
refresh_expires_at: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
|
+
scopes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
13
|
+
authorized_at: import("@sinclair/typebox").TString;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const FeishuUserCredentialHandoffResponseSchema: import("@sinclair/typebox").TObject<{
|
|
16
|
+
credential_ref: import("@sinclair/typebox").TString;
|
|
17
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
18
|
+
}>;
|
|
19
|
+
export type FeishuUserCredentialRef = Static<typeof FeishuUserCredentialRefSchema>;
|
|
20
|
+
export type FeishuUserCredentialHandoff = Static<typeof FeishuUserCredentialHandoffSchema>;
|
|
21
|
+
export type FeishuUserCredentialHandoffResponse = Static<typeof FeishuUserCredentialHandoffResponseSchema>;
|
|
22
|
+
//# sourceMappingURL=feishu-user-credentials.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { IsoDateTimeStringSchema } from "../domain/index.js";
|
|
3
|
+
export const FEISHU_USER_CREDENTIAL_HANDOFF_PATH = "/internal/v1/feishu-user-credentials";
|
|
4
|
+
const SecretValueSchema = Type.String({
|
|
5
|
+
minLength: 1,
|
|
6
|
+
maxLength: 4_096,
|
|
7
|
+
pattern: "^[^\\u0000-\\u001f\\u007f]+$",
|
|
8
|
+
});
|
|
9
|
+
export const FeishuUserCredentialRefSchema = Type.String({
|
|
10
|
+
minLength: 36,
|
|
11
|
+
maxLength: 36,
|
|
12
|
+
pattern: "^feishu_user_[a-f0-9]{24}$",
|
|
13
|
+
});
|
|
14
|
+
export const FeishuUserCredentialHandoffSchema = Type.Object({
|
|
15
|
+
version: Type.Literal(1),
|
|
16
|
+
installation_ref: Type.String({ minLength: 1, maxLength: 512 }),
|
|
17
|
+
external_subject_ref: Type.String({
|
|
18
|
+
minLength: 9,
|
|
19
|
+
maxLength: 508,
|
|
20
|
+
pattern: "^open_id:[A-Za-z0-9_-]{1,500}$",
|
|
21
|
+
}),
|
|
22
|
+
access_token: SecretValueSchema,
|
|
23
|
+
refresh_token: SecretValueSchema,
|
|
24
|
+
access_expires_at: IsoDateTimeStringSchema,
|
|
25
|
+
refresh_expires_at: Type.Optional(IsoDateTimeStringSchema),
|
|
26
|
+
scopes: Type.Array(Type.String({ minLength: 1, maxLength: 256 }), {
|
|
27
|
+
minItems: 1,
|
|
28
|
+
maxItems: 32,
|
|
29
|
+
uniqueItems: true,
|
|
30
|
+
}),
|
|
31
|
+
authorized_at: IsoDateTimeStringSchema,
|
|
32
|
+
}, { additionalProperties: false });
|
|
33
|
+
export const FeishuUserCredentialHandoffResponseSchema = Type.Object({
|
|
34
|
+
credential_ref: FeishuUserCredentialRefSchema,
|
|
35
|
+
updated_at: IsoDateTimeStringSchema,
|
|
36
|
+
}, { additionalProperties: false });
|
|
37
|
+
//# sourceMappingURL=feishu-user-credentials.js.map
|
|
@@ -72,4 +72,5 @@ export declare function parseRelaySessionContext(value: unknown): RelaySessionCo
|
|
|
72
72
|
export declare function isFeishuPlatformSessionContext(value: unknown): value is FeishuPlatformSessionContext;
|
|
73
73
|
export declare function parseFeishuPlatformSessionContext(value: unknown): FeishuPlatformSessionContext | null;
|
|
74
74
|
export * from "./platform-integration.js";
|
|
75
|
+
export * from "./feishu-user-credentials.js";
|
|
75
76
|
//# sourceMappingURL=index.d.ts.map
|